OTA-1959: Case 1 - oc adm upgrade recommend shows both Cincinnati-sourced and alert-sourced risks in output - #2349
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@nbottari9: This pull request references OTA-1959 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughChangesUpgrade recommendation risk fixtures
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
8a6bb16 to
c84a084
Compare
|
/verified by TestExamples @nbottari9 |
|
@nbottari9: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
hongkailiu
left a comment
There was a problem hiding this comment.
The case looks good.
Could you record the steps of the testing to get the yamls (and json) in the commit msg (so that the next person can repeat)?
Like the command to create a cluster bot cluster.
Modification to connect it to fauxinnati.
Trigger the alert.
etc and etc.
You do not need to re-doc the steps in the readme tho.
Reference to it is fine.
|
|
||
| Updates to 5.1: | ||
| VERSION ISSUES | ||
| 5.1.0 MultipleReasons |
There was a problem hiding this comment.
No action is required.
Just a remark.
This does not look ideal but I guess we need to save space for all the "outdated" versions.
2c17302 to
601de10
Compare
|
@nbottari9: This pull request references OTA-1959 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
d7b878d to
e92993b
Compare
Replace "[CHANNEL]" with the channel name?
Do |
…` correctly filters out accepted alert-sourced risks steps to reproduce: 1) Create a cluster bot cluster: `launch 5.0.0-ec.2 gcp,techpreview` 2) Modify the ClusterVersion manifest to point at an upstream OSUS server. See [fauxinnati](https://fauxinnati-fauxinnati.apps.ota-stage.q2z4.p1.openshiftapps.com/) for more info on mock Cincinnati graph data endpoints. `oc edit clusterversion version` -> add `spec.upstream` with the URL 3) Set update channel. `oc adm upgrade channel risks-always` At this point, you have configured enough for OSUS/Cincinnati risks to show up with `oc adm upgrade recommend`. Running this, you should see some risks that apply to upgrading the cluster. Further steps will be for setting up test alerts. 4) Create TestAlert within the cluster. `TestAlert` manifest: apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: test-update-alert namespace: openshift-monitoring spec: groups: - name: test rules: - alert: TestAlert expr: vector(1) labels: severity: warning openShiftUpdatePrecheck: "true" annotations: summary: "Test alert for updates" description: "Test alert for updates" Save this to a file in ~/Downloads, then run `oc apply -f ~/Downloads/alert.yaml` After a bit, you should see BOTH graph-sourced and alert-sourced risks show up when you run `oc adm upgrade recommend` 5) Gather the manifests needed for a full test fixture. Namely `clusterVersion`, `infrastructure`, `featureGate`, and `alerts`. clusterVersion (the anchor): `oc get -o yaml clusterversion version >./pkg/cli/admin/upgrade/recommend/examples/[FIXTURE_NAME]-cv.yaml` infrastructure: `oc get -o yaml infrastructure cluster >./pkg/cli/admin/upgrade/recommend/examples/[FIXTURE_NAME]-infrastructure.yaml` featureGate: `oc get -o yaml featuregate cluster >./pkg/cli/admin/upgrade/recommend/examples/[FIXTURE_NAME]-featuregate.yaml` alerts: `oc adm inspect-alerts >./pkg/cli/admin/upgrade/recommend/examples/[FIXTURE_NAME]-alerts.json` Note: may need `OC_ENABLE_CMD_INSPECT_ALERTS=true` for `oc adm inspect-alerts` to work correctly 6) Modify `examples_test.go` to include an entry for the "specific version" variant. 7) Run the tests and confirm output matches desired results: `go test -v ./pkg/cli/admin/upgrade/recommend...` Note: to actually create new output files, use `UPDATE=true go test -v ./pkg/cli/admin/upgrade/recommend...` Signed-off-by: Nicholas Bottari <nbottari9@gmail.com>
4bca7db to
9f2cec7
Compare
|
/verified by @nbottari9 |
|
@nbottari9: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
@nbottari9: This pull request references OTA-1959 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/lgtm |
|
Scheduling required tests: |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hongkailiu, nbottari9 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
|
||
| Test alert for updates. https://github.com/openshift/runbooks/tree/master/alerts?runbook=notfound | ||
|
|
||
| error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskB,SyntheticRiskC,TestAlert |
There was a problem hiding this comment.
This looks like a bug. I will follow up.
| error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskB,SyntheticRiskC,TestAlert | |
| error: There are issues that apply to this cluster and have not been accepted. `oc adm upgrade accept` can be used to accept them: SyntheticRiskA,SyntheticRiskB,TestAlert |
|
/test e2e-aws-ovn-serial-1of2 |
1 similar comment
|
/test e2e-aws-ovn-serial-1of2 |
|
@nbottari9: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Added a new test fixture to ensure that when there are both OSUS/Cincinnati risks and alert risks present, both types of risks are present in the output of
oc adm upgrade recommendandoc adm upgrade recommend --version [VERSION]Summary by CodeRabbit
5.0.0-ec.5recommendations and CLI output.