NO-ISSUE: Match operator lifecycle versions by major.minor only#16698
NO-ISSUE: Match operator lifecycle versions by major.minor only#16698joelanford wants to merge 1 commit into
Conversation
|
@joelanford: 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: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThe operator lifecycle status lookup now matches lifecycle entries by parsed minor version only, and tests cover unparseable operator version inputs for compatibility and support phase results. ChangesOperator lifecycle version matching
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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
`@frontend/packages/operator-lifecycle-manager/src/components/operator-lifecycle-status.tsx`:
- Around line 57-58: The version lookup in operator-lifecycle-status is too
permissive when parseMinorVersion(operatorVersion) returns undefined, because
versions.find with parseMinorVersion(v.name) === minor can incorrectly match
another malformed entry. Update the logic around parseMinorVersion and the
versions.find predicate to first check that minor is defined, and return
undefined immediately when operatorVersion cannot be parsed so only valid
MAJOR.MINOR comparisons are performed.
🪄 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: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 0c9e7caa-5346-4893-8dc2-11caef4b08d6
📒 Files selected for processing (1)
frontend/packages/operator-lifecycle-manager/src/components/operator-lifecycle-status.tsx
48d1480 to
0cf9127
Compare
|
/test backend |
|
/lgtm |
|
Docs Approver: PX Approver: |
|
/label px-approved |
jseseCCS
left a comment
There was a problem hiding this comment.
1 comment. please review, apply; conditionally approved!
|
/label docs-approved |
|
/hold to address docs review comments |
The lifecycle data spec (REQ-VER-01) requires version names to be MAJOR.MINOR format only. Remove the unnecessary exact-match path in findVersionEntry and match solely on major.minor. See: https://github.com/release-engineering/fbc-update-planner/blob/main/docs/VALIDATION_RULES.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0cf9127 to
1759484
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: joelanford, jseseCCS, perdasilva The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@joelanford: The following test failed, say
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. |
Analysis / Root cause:
findVersionEntrytried an exact version string match before falling back to major.minor matching. The lifecycle data spec (REQ-VER-01) requires version names to be strictlyMAJOR.MINORformat, so the exact-match path was unnecessary — the minor version match always did the real work.Solution description:
Simplified
findVersionEntryinoperator-lifecycle-status.tsxto match solely onmajor.minorusingparseMinorVersion(), removing the redundant exact-match attempt. This aligns the implementation with the lifecycle data spec.Screenshots / screen recording:
N/A — logic-only change with no visual impact.
Test setup:
No special setup required.
Test cases:
operator-lifecycle-status.spec.tsxcontinue to pass1.0.5matches lifecycle version1.0)Browser conformance:
Additional info:
N/A
Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests