Skip to content

fix: Version mismatch code fix#5448

Open
brucebarrera wants to merge 1 commit into
Azure:mainfrom
brucebarrera:version-mismatch-fix
Open

fix: Version mismatch code fix#5448
brucebarrera wants to merge 1 commit into
Azure:mainfrom
brucebarrera:version-mismatch-fix

Conversation

@brucebarrera
Copy link
Copy Markdown

Jira

Fixes: ARO-26767

Why

Previously, when the node pool channel group differed from the control plane channel group, the code had a critical flaw:

  • If node pool channel was "stable", it would return an empty version string
  • The user's explicit channel group setting was ignored
  • This caused downstream validation errors and test failures

This PR fixes an issue where after a release rollout, the default node pool version (4.20.20) is higher than the control plane version (4.20.19) in STG and PROD.

Error: Node pool version '4.20.20' must not be greater than Control Plane version '4.20.19'

Failing Tests:

  • Customer should update node pool labels and taints
  • Customer should use workload identity via cluster OIDC
  • Customer should not perform invalid operations

What

This fix ensures:

  • Node pool version is always resolved from its specified channel (including stable)
  • Version constraint is enforced: nodePoolVersion <= controlPlaneVersion
  • If node pool version exceeds control plane, it is clamped with a clear warning
  • User's channel group configuration is respected
  • Graceful error handling for unparseable versions

Testing

# Ensure environment is configured
export CUSTOMER_SUBSCRIPTION=<subscriptionName>
export LOCATION=uksouth

# Run specific test cases
./test/aro-hcp-tests run-test "Customer should update node pool labels and taints"
./test/aro-hcp-tests run-test "Customer should use workload identity via cluster OIDC"
./test/aro-hcp-tests run-test "Customer should not perform invalid operations"

…on constraint

Previously, when the node pool channel group differed from the control plane
channel group, the code had a critical flaw:
- If node pool channel was "stable", it would return an empty version string
- The user's explicit channel group setting was ignored
- This caused downstream validation errors and test failures

This fix ensures:
- Node pool version is always resolved from its specified channel (including stable)
- Version constraint is enforced: nodePoolVersion <= controlPlaneVersion
- If node pool version exceeds control plane, it is clamped with a clear warning
- User's channel group configuration is respected
- Graceful error handling for unparseable versions

Example scenario that now works correctly:
  Control Plane: candidate channel → 4.21.0
  Node Pool: stable channel → 4.20.5
  Result: Uses 4.20.5 from stable (previously returned empty string)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 29, 2026 23:14
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 29, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: brucebarrera
Once this PR has been reviewed and has the lgtm label, please assign bennerv 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
Copy link
Copy Markdown

openshift-ci Bot commented May 29, 2026

Hi @brucebarrera. Thanks for your PR.

I'm waiting for a Azure member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants