Skip to content

Fix candidate stanza resolution for stable streams - #809

Open
hoxhaeris wants to merge 1 commit into
openshift:mainfrom
hoxhaeris:hoxhaeris/fix-stable-stream-resolution
Open

Fix candidate stanza resolution for stable streams#809
hoxhaeris wants to merge 1 commit into
openshift:mainfrom
hoxhaeris:hoxhaeris/fix-stable-stream-resolution

Conversation

@hoxhaeris

@hoxhaeris hoxhaeris commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

The candidate stanza in resolveUpgradeRelease constructs stream names as X.Y.0-0.<stream>, which works for nightly and CI streams but not for stable streams, which use the N-stable naming convention.

When openshift/release#82640 set stream: "stable" in the 5-dev-preview config, upgrade-major verification jobs got stuck at Pending because the release-controller looked up 4.22.0-0.stable instead of 4-stable.

This PR extracts a candidateStreamName helper that returns N-stable with a version prefix filter for stable streams, preserving the existing behavior for nightly and CI streams.

Summary by CodeRabbit

  • Bug Fixes
    • Improved candidate upgrade detection for stable release streams using major-version naming.
    • Added version-prefix filtering to help select the correct candidate releases.
    • Preserved existing stream resolution for nightly and continuous-integration releases.
    • Improved error reporting when a matching upgrade release cannot be found.

The candidate stanza in resolveUpgradeRelease constructs stream names as
"X.Y.0-0.<stream>", which works for nightly and CI streams but not for
stable streams, which use the "N-stable" naming convention. When PR 82640
in openshift/release set `stream: "stable"` in the 5-dev-preview config,
lookups failed with "no release configuration exists with the requested
name" because it searched for "4.22.0-0.stable" instead of "4-stable".

Extract candidateStreamName helper that returns "N-stable" with a version
prefix filter for stable streams, preserving the existing behavior for
nightly and CI streams.
@openshift-ci
openshift-ci Bot requested a review from AlexNPavel July 31, 2026 11:34
@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hoxhaeris

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

The pull request process is described 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 requested a review from bradmwilliams July 31, 2026 11:34
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 16f7279e-a898-4951-9904-00f32ef09f18

📥 Commits

Reviewing files that changed from the base of the PR and between c99f3af and 7d3a839.

📒 Files selected for processing (2)
  • cmd/release-controller/sync_verify.go
  • cmd/release-controller/sync_verify_test.go

📝 Walkthrough

Walkthrough

Candidate upgrade resolution now derives stream names and version prefixes for stable, nightly, and CI streams. Release lookup uses these values. Tests cover version changes, prefixes, and architecture suffixes.

Changes

Candidate stream resolution

Layer / File(s) Summary
Candidate stream name derivation
cmd/release-controller/sync_verify.go
Added candidateStreamName for stable, nightly, and CI streams. Stable streams include the requested minor-version prefix.
Stream lookup integration and validation
cmd/release-controller/sync_verify.go, cmd/release-controller/sync_verify_test.go
resolveUpgradeRelease passes the derived stream name and prefix to LatestForStream. Tests cover stream naming across release types, major-version changes, and arm64 suffixes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: alexnpavel, bradmwilliams

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the fix for candidate stanza resolution in stable streams.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@hoxhaeris: all tests passed!

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.

@hoxhaeris

Copy link
Copy Markdown
Contributor Author

/hold

@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 31, 2026
@bradmwilliams

Copy link
Copy Markdown
Collaborator

I'm leaning towards this not being a necessary fix as the candidate stanza was never intended for "stable" releases. To require releases from the "stable" line, users should specify a prerelease stanza, like:

"upgradeFromRelease": {
  "prerelease": {
    "version_bounds": {
      "lower": "4.22.0",
      "upper": "4.23.0"
    }
  }
},

@bradmwilliams

Copy link
Copy Markdown
Collaborator

That being said, the prerelease logic does need some attention at some point as it's completely hard-coded to only look at 4-stable

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants