Skip to content

NO-ISSUE: Match operator lifecycle versions by major.minor only#16698

Open
joelanford wants to merge 1 commit into
openshift:mainfrom
joelanford:lifecycle-version-minor-match
Open

NO-ISSUE: Match operator lifecycle versions by major.minor only#16698
joelanford wants to merge 1 commit into
openshift:mainfrom
joelanford:lifecycle-version-minor-match

Conversation

@joelanford

@joelanford joelanford commented Jul 1, 2026

Copy link
Copy Markdown
Member

Analysis / Root cause:
findVersionEntry tried an exact version string match before falling back to major.minor matching. The lifecycle data spec (REQ-VER-01) requires version names to be strictly MAJOR.MINOR format, so the exact-match path was unnecessary — the minor version match always did the real work.

Solution description:
Simplified findVersionEntry in operator-lifecycle-status.tsx to match solely on major.minor using parseMinorVersion(), 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:

  • Existing tests in operator-lifecycle-status.spec.tsx continue to pass
  • Version matching by minor version (e.g., operator version 1.0.5 matches lifecycle version 1.0)

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:
N/A

Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Lifecycle status matching now consistently resolves the applicable lifecycle entry using the operator’s minor version.
    • For unparseable operator versions, compatibility now reports “no-data” and the support phase returns “No Data,” preventing misleading results.
  • Tests

    • Added test coverage for unparseable operator version inputs to validate the expected “no-data” and “No Data” behavior.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 1, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@joelanford: This pull request explicitly references no jira issue.

Details

In response to this:

Analysis / Root cause:
findVersionEntry tried an exact version string match before falling back to major.minor matching. The lifecycle data spec (REQ-VER-01) requires version names to be strictly MAJOR.MINOR format, so the exact-match path was unnecessary — the minor version match always did the real work.

Solution description:
Simplified findVersionEntry in operator-lifecycle-status.tsx to match solely on major.minor using parseMinorVersion(), 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:

  • Existing tests in operator-lifecycle-status.spec.tsx continue to pass
  • Version matching by minor version (e.g., operator version 1.0.5 matches lifecycle version 1.0)

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:
N/A

Generated with Claude Code

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.

@openshift-ci openshift-ci Bot requested review from Leo6Leo and TheRealJon July 1, 2026 18:58
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f6793924-ca96-47b1-bd02-51571617cd89

📥 Commits

Reviewing files that changed from the base of the PR and between 0cf9127 and 1759484.

📒 Files selected for processing (2)
  • frontend/packages/operator-lifecycle-manager/src/components/__tests__/operator-lifecycle-status.spec.tsx
  • frontend/packages/operator-lifecycle-manager/src/components/operator-lifecycle-status.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • frontend/packages/operator-lifecycle-manager/src/components/operator-lifecycle-status.tsx
  • frontend/packages/operator-lifecycle-manager/src/components/tests/operator-lifecycle-status.spec.tsx

Walkthrough

The 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.

Changes

Operator lifecycle version matching

Layer / File(s) Summary
Minor-version matching and invalid input handling
frontend/packages/operator-lifecycle-manager/src/components/operator-lifecycle-status.tsx, frontend/packages/operator-lifecycle-manager/src/components/__tests__/operator-lifecycle-status.spec.tsx
findVersionEntry now returns undefined when the operator version cannot be parsed and otherwise matches entries by parsed minor version; tests assert "no-data" and SupportPhaseStatus.NoData for unparseable versions.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: TheRealJon, jseseCCS

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: matching operator lifecycle versions by major.minor only.
Description check ✅ Passed The description covers the required sections and explains the root cause, solution, tests, and non-visual impact.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The added Ginkgo/Jest test titles are static and descriptive; none include dynamic values like dates, UUIDs, node/namespace names, or generated suffixes.
Test Structure And Quality ✅ Passed PASS: The modified spec is plain Jest unit tests for pure helper functions; no Ginkgo, cluster resources, waits, or cleanup concerns are present.
Microshift Test Compatibility ✅ Passed PR only changes frontend TypeScript logic and Jest unit tests; no new Ginkgo e2e tests or MicroShift-unsupported APIs/features were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The only added tests are Jest unit tests in a frontend component file; no Ginkgo/e2e tests or SNO/HA assumptions were introduced.
Topology-Aware Scheduling Compatibility ✅ Passed Only lifecycle version parsing and tests changed; no manifests, controllers, or scheduling/topology logic were added.
Ote Binary Stdout Contract ✅ Passed Changed files only adjust version matching and add unit tests; no main/init/TestMain/BeforeSuite stdout writes or stdout logging APIs were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The changed test file is a Jest unit spec, not a Ginkgo e2e test, and it adds no IPv4 hardcoding or external network calls.
No-Weak-Crypto ✅ Passed The PR only changes lifecycle version matching/tests; no weak crypto, custom crypto, or non-constant-time secret comparisons were introduced.
Container-Privileges ✅ Passed The PR only changes TSX component/test files; no K8s/container manifests or privilege settings like privileged, hostPID, or allowPrivilegeEscalation are present.
No-Sensitive-Data-In-Logs ✅ Passed Touched files contain no console/log statements or sensitive-data patterns; the PR only changes version matching and adds tests.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot added the component/olm Related to OLM label Jul 1, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between c49aa59 and 48d1480.

📒 Files selected for processing (1)
  • frontend/packages/operator-lifecycle-manager/src/components/operator-lifecycle-status.tsx

@joelanford joelanford force-pushed the lifecycle-version-minor-match branch from 48d1480 to 0cf9127 Compare July 1, 2026 20:10
@joelanford

Copy link
Copy Markdown
Member Author

/test backend

@perdasilva

Copy link
Copy Markdown

/lgtm

@perdasilva

Copy link
Copy Markdown

Docs Approver:
cc @jseseCCS

PX Approver:
cc @rh-joshbeverly

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2026
@rh-joshbeverly

Copy link
Copy Markdown

/label px-approved

@openshift-ci openshift-ci Bot added the px-approved Signifies that Product Support has signed off on this PR label Jul 2, 2026

@jseseCCS jseseCCS left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 comment. please review, apply; conditionally approved!

@jseseCCS

jseseCCS commented Jul 2, 2026

Copy link
Copy Markdown

/label docs-approved

@openshift-ci openshift-ci Bot added the docs-approved Signifies that Docs has signed off on this PR label Jul 2, 2026
@perdasilva

Copy link
Copy Markdown

/hold to address docs review comments

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 2, 2026
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>
@joelanford joelanford force-pushed the lifecycle-version-minor-match branch from 0cf9127 to 1759484 Compare July 2, 2026 14:51
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2026
@perdasilva

Copy link
Copy Markdown

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2026
@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: joelanford, jseseCCS, perdasilva
Once this PR has been reviewed and has the lgtm label, please assign vikram-raj for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@joelanford: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-console 1759484 link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/olm Related to OLM do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants