OCPBUGS-59142: fix ValidReleaseImage condition message to show minor version#8519
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Skipping CI for Draft Pull Request. |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-59142, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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)
📝 WalkthroughWalkthroughThe Suggested reviewers
🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8519 +/- ##
=======================================
Coverage 40.00% 40.00%
=======================================
Files 751 751
Lines 92863 92863
=======================================
Hits 37147 37147
Misses 53024 53024
Partials 2692 2692
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@support/supportedversion/version.go`:
- Around line 184-186: Update the test "versions > LatestSupportedVersion are
not supported" to assert the error message formatting when the condition
normalizedVersion.Minor > normalizedMax.Minor triggers: after verifying err is
non-nil, also assert that err.Error() contains "the latest version supported
is:" (ensuring the message includes the supported version) and that the
supported version string uses the trimVersion(displayMax.String()) formatting
(i.e., without a trailing .0) so the test verifies the code path that constructs
the message in the normalizedVersion.Minor > normalizedMax.Minor branch.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: faff9f76-2e23-440f-a412-54708709707f
📒 Files selected for processing (7)
control-plane-operator/controllers/hostedcontrolplane/infra/infra.gocontrol-plane-operator/controllers/hostedcontrolplane/infra/infra_test.gocontrol-plane-operator/controllers/hostedcontrolplane/ingress/router.gocontrol-plane-operator/controllers/hostedcontrolplane/ingress/router_test.gocontrol-plane-operator/controllers/hostedcontrolplane/kas/service.gocontrol-plane-operator/controllers/hostedcontrolplane/kas/service_test.gosupport/supportedversion/version.go
66f096e to
b245bb9
Compare
b245bb9 to
64b2c39
Compare
64b2c39 to
94dccaa
Compare
…essages Use trimVersion() to strip the .0 patch suffix so error messages show e.g. 4.18 instead of 4.18.0, making it clear that any patch version within the minor release is valid.
94dccaa to
cb015c0
Compare
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
/jira refresh |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-59142, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (yli2@redhat.com), skipping review request. 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 tests matching the |
Test Resultse2e-aws
e2e-aks
|
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: muraee, vsolanki12 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 |
|
/verified by me on local env |
|
@vsolanki12: 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. |
|
Before fix: After fix: |
|
@vsolanki12: 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. |
|
@vsolanki12: Jira Issue Verification Checks: Jira Issue OCPBUGS-59142 Jira Issue OCPBUGS-59142 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 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. |
What this PR does / why we need it:
The ValidReleaseImage condition error messages displayed the full semver version (e.g. "4.18.0") for the max and min supported versions, misleading users into thinking only that specific patch version was supported. This change uses
trimVersion()to strip the ".0" patch suffix so the message shows "4.18" instead, making it clear that any patch version within the minor release is valid.Before:
the latest version supported is: "4.18.0". Attempting to use: "4.19.0"After:
the latest version supported is: "4.18". Attempting to use: "4.19.0"Which issue(s) this PR fixes:
Fixes https://issues.redhat.com/browse/OCPBUGS-59142
Special notes for your reviewer:
The fix applies
trimVersion()(which already exists in the same file) to two error messages inIsValidReleaseVersion():Tested on a ROSA cluster by lowering
LatestSupportedVersionto 4.18.0, creating a HostedCluster with a 4.19 release image, and confirming the updated message.Checklist:
🤖 Generated with Claude Code via
/jira:solve OCPBUGS-59142Summary by CodeRabbit