-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
Product / Portfolio Work
-
False
-
-
False
-
None
-
None
-
None
-
None
Ref. Symptoms / observations / job analysis feature
Context: This step focuses on automating the process of applying symptom labels to job runs when they are finished running. This part extends previous work that identified symptoms and applied labels in LoadJobRunData.
Within the cloud function, when applying a label, also create a json file under artifacts/job_labels recording:
- the symptom and label applied
- the file against which it applied
- the text that matched the symptom
The file written should be named so as to be easily human-recognizable but unique, as follows:
artifacts/job_labels/{label_id}-{final file segment}-{hash of full file path}.json
For example, if a file path /prow/logs/foo/132456/artifacts/bar/baz.txt resulted in label with ID Quux, this would result in writing a file
/prow/logs/foo/132456/artifacts/job_labels/Quux-baz.txt-<shasum>.json
Also: add logic to identify these files when triggered in the cloud function and not process them for symptom inputs (to prevent an endless loop of creation and processing).
As much as possible, logic for determining labels and writing them should be located in the sippy codebase (and imported by the cloud function), to facilitate reuse by other tools doing the same things in different contexts.