transient risk analysis #657
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new path through the risk_analysis API where we do not need to have the prow job run already imported into sippy. This will allow us to run a risk analysis at the end of a prow job run, and store it's result as an artifact.
The previous path of getting analysis by ID will soon be adjusted to return the risk analysis at the point in time we imported the job. This will come in a future PR.
Caller needs make a GET request with a json request body containing something like:
{ "ProwJob": { "Name": "periodic-ci-openshift-release-master-nightly-4.12-console-aws" }, "URL": "", "Tests": [ { "Test": { "Name": "[sig-arch] Managed cluster should set requests but not limits [Suite:openshift/conformance/parallel]" }, "Suite": { "Name": "openshift-tests-upgrade" }, "Status": 12 }, { "Test": { "Name": "[sig-arch] events should not repeat pathologically" }, "Suite": { "Name": "openshift-tests-upgrade" }, "Status": 12 } ] }These files will soon be written out by openshift-tests in a PR that I will link shortly. A new openshift-tests risk-analysis command will also be added to handle the semantics of merging the above json files (there are often two), and making the HTTP request to sippy, then storing the resulting risk-analysis.json as an artifact.
For posterity, risk analysis looks as follows:
{ "ProwJobName": "periodic-ci-openshift-release-master-nightly-4.12-console-aws", "ProwJobRunID": 0, "Tests": [ { "Name": "[sig-arch] Managed cluster should set requests but not limits [Suite:openshift/conformance/parallel]", "Risk": { "Level": { "Name": "Unknown", "Level": 7 }, "Reasons": [ "Unable to find matching test results for variants: [amd64 aws ha ovn]" ] }, "OpenBugs": [ { "id": 14863787, "key": "OCPBUGS-1801", "created_at": "2022-09-28T14:47:31.323454-03:00", "updated_at": "2022-10-23T20:40:23.681878-03:00", "deleted_at": null, "status": "ON_QA", "last_change_time": "2022-10-13T04:38:22-03:00", "summary": "ibm-powervs-block-csi-driver-controller does not set resource requests", "affects_versions": [ "4.12.0" ], "fix_versions": [], "components": [ "Storage" ], "url": "https://issues.redhat.com/browse/OCPBUGS-1801" } ] }, { "Name": "[sig-arch] events should not repeat pathologically", "Risk": { "Level": { "Name": "Unknown", "Level": 7 }, "Reasons": [ "Unable to find matching test results for variants: [amd64 aws ha ovn]" ] }, "OpenBugs": [ { "id": 14814726, "key": "OCPBUGS-587", "created_at": "2022-10-18T11:30:25.302407-03:00", "updated_at": "2022-10-23T20:40:22.303217-03:00", "deleted_at": null, "status": "ASSIGNED", "last_change_time": "2022-10-21T11:17:23-03:00", "summary": "FailedToUpdateEndpointSlices Error updating Endpoint Slices for Service ", "affects_versions": [ "4.12" ], "fix_versions": [], "components": [ "kube-apiserver" ], "url": "https://issues.redhat.com/browse/OCPBUGS-587" } ] }, { "Name": "[sig-arch][bz-storage][Late] Alerts alert/KubePersistentVolumeErrors should not be at or above pending [Suite:openshift/conformance/parallel]", "Risk": { "Level": { "Name": "Medium", "Level": 5 }, "Reasons": [ "This test has passed 93.94% of 33 runs on release 4.12 [amd64 aws ha ovn] in the last week." ] }, "OpenBugs": [] } ], "OverallRisk": { "Level": { "Name": "Unknown", "Level": 7 }, "Reasons": [ "Maximum failed test risk: Unknown" ] }, "OpenBugs": [] }TRT-603