NO-JIRA: Fix issues collection when CVO handles the risks - #2352
NO-JIRA: Fix issues collection when CVO handles the risks#2352hongkailiu wants to merge 2 commits into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@hongkailiu: This pull request explicitly references no jira issue. 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughCVO risk detection now evaluates only risks named by the requested conditional update. The recommendation logic adds a risk lookup helper. The related expected output no longer lists ChangesCVO risk filtering
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/cli/admin/upgrade/recommend/recommend.go (1)
460-467: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd a comment for
findRiskByName.Line 460 adds an unexported function without a descriptive comment. Add a comment that states that the function returns the matching conditional-update risk, or
nil.Proposed fix
+// findRiskByName returns the conditional-update risk with name, or nil. func findRiskByName(risks []configv1.ConditionalUpdateRisk, name string) *configv1.ConditionalUpdateRisk {As per coding guidelines, "Add descriptive comments to all exported and unexported Go types, functions, and methods."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/cli/admin/upgrade/recommend/recommend.go` around lines 460 - 467, Add a descriptive Go comment immediately before findRiskByName stating that it returns the matching conditional-update risk by name, or nil when no match exists.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pkg/cli/admin/upgrade/recommend/recommend.go`:
- Around line 460-467: Add a descriptive Go comment immediately before
findRiskByName stating that it returns the matching conditional-update risk by
name, or nil when no match exists.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: c1bbdf65-def3-4c9d-a33a-978e192e45de
📒 Files selected for processing (9)
pkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-cv.yamlpkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-featuregate.yamlpkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks-infrastructure.yamlpkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks.jsonpkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks.outputpkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks.show-outdated-releases-outputpkg/cli/admin/upgrade/recommend/examples/5.0.0-includes-graph-and-alert-risks.version-5.0.0-ec.5-outputpkg/cli/admin/upgrade/recommend/examples_test.gopkg/cli/admin/upgrade/recommend/recommend.go
84f9c98 to
959a235
Compare
|
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. |
|
@hongkailiu: 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. |
The issues are used only for printing and attached to a specific version whose value is taken from `--to`. The version was not used when the issues are collected in the case of `cvoChecking`. This change fixes that.
We plan to deprecate `cv.status.ConditionalUpdates.Risks` [OCPSTRAT-3492] and thus should not introduce any new usage of it.
959a235 to
c4a856c
Compare
|
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. |
|
/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 |
|
/hold cancel |
|
/payload-job periodic-ci-openshift-release-main-ci-5.0-e2e-aws-ovn-techpreview-serial-1of3 periodic-ci-openshift-release-main-ci-5.0-e2e-aws-ovn-techpreview-serial-2of3 periodic-ci-openshift-release-main-ci-5.0-e2e-aws-ovn-techpreview-serial-3of3 |
|
@hongkailiu: trigger 3 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/44a95850-91d0-11f1-90f5-45624aa54c3d-0 |
Follow up #2349 (comment)
The issues are used only for printing and attached to a specific version whose value is taken from
--to. The version was not used when the issues are collected in the case ofcvoChecking. This change fixes that./hold
I will rebase after #2349 gets in.
Summary by CodeRabbit
SyntheticRiskC.