OCPBUGS-105207: Revert "OCPBUGS-89689: (karpenter) use completed release image for unpinned NodeClaims during CP upgrade" - #9233
Conversation
…pinned NodeClaims during CP upgrade"
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@ironcladlou: This pull request references Jira Issue OCPBUGS-105207, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
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. |
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe controller now uses the HostedControlPlane release image and computes the NodeClass version from cluster version status. Tests cover completed history, partial history, desired-version fallback, and unavailable status. The control plane upgrade test now observes NodeClaim drift concurrently with the image rollout. The previous background no-drift polling helper was removed. Sequence Diagram(s)sequenceDiagram
participant UpgradeTest
participant HostedCluster
participant ControlPlane
participant NodeClaims
UpgradeTest->>ControlPlane: Start image rollout
ControlPlane->>HostedCluster: Update rollout state
UpgradeTest->>NodeClaims: Wait for initial claims to drift
NodeClaims-->>UpgradeTest: Report drift completion
UpgradeTest->>HostedCluster: Refresh and continue
Suggested reviewers: 🚥 Pre-merge checks | ✅ 10 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (10 passed)
✨ 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 |
|
@ironcladlou: This pull request references Jira Issue OCPBUGS-105207, which is valid. 3 validation(s) were run on this bug
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. |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
karpenter-operator/controllers/karpenterignition/karpenterignition_controller.go (1)
345-380: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winMake the fallback contract match the implementation.
currentClusterVersionreturnsDesired.Versionwhenever no completed entry exists. This includes empty and multi-entry histories. The comment limits the fallback to one entry, and thelen(...) == 1branch has the same result as the final return.Proposed cleanup
-// and the most recent CompletionTime. If no completed entries exist and there is exactly one -// history entry, it falls back to the desired version. This handles the case where a cluster -// is still rolling out its initial version. +// and the most recent CompletionTime. If no completed entries exist, it falls +// back to the desired version. ... - // If there are no completed entries but exactly one history entry exists, the cluster - // is likely still rolling out its first version. Fall back to the desired version. - if len(hostedCluster.Status.Version.History) == 1 { - return hostedCluster.Status.Version.Desired.Version - } - return hostedCluster.Status.Version.Desired.Version🤖 Prompt for 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. In `@karpenter-operator/controllers/karpenterignition/karpenterignition_controller.go` around lines 345 - 380, Update currentClusterVersion so its comments and control flow reflect that Desired.Version is returned whenever no completed history entry exists. Remove the redundant len(History) == 1 conditional and consolidate the fallback into the final return, while preserving the completed-entry selection logic.
🤖 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 `@test/e2e/karpenter_control_plane_upgrade_test.go`:
- Around line 84-96: Update the concurrent drift verification around the
goroutine and e2eutil.WaitForImageRollout so rollout completion is explicitly
signaled before waiting for drift results. Have the NodeClaim drift checks
record or fail when the first NodeClaim reaches Drifted=True after that
completion signal, while preserving the existing wait for all initial NodeClaims
to drift.
---
Outside diff comments:
In
`@karpenter-operator/controllers/karpenterignition/karpenterignition_controller.go`:
- Around line 345-380: Update currentClusterVersion so its comments and control
flow reflect that Desired.Version is returned whenever no completed history
entry exists. Remove the redundant len(History) == 1 conditional and consolidate
the fallback into the final return, while preserving the completed-entry
selection logic.
🪄 Autofix
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: Pro Plus
Run ID: 738bea17-72f5-4640-be91-5b71c859d5c4
📒 Files selected for processing (4)
karpenter-operator/controllers/karpenterignition/karpenterignition_controller.gokarpenter-operator/controllers/karpenterignition/karpenterignition_controller_test.gotest/e2e/karpenter_control_plane_upgrade_test.gotest/e2e/karpenter_test.go
💤 Files with no reviewable changes (1)
- test/e2e/karpenter_test.go
|
@coderabbitai pause |
✅ Action performedReviews paused. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9233 +/- ##
=======================================
Coverage 44.96% 44.96%
=======================================
Files 778 778
Lines 97452 97448 -4
=======================================
+ Hits 43820 43821 +1
+ Misses 50607 50603 -4
+ Partials 3025 3024 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/approve |
|
@bryan-cox: The 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. |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox, ironcladlou 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 |
Test Resultse2e-aws
e2e-aks
|
|
@ironcladlou: 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. |
|
@ironcladlou: Jira Issue Verification Checks: Jira Issue OCPBUGS-105207 Jira Issue OCPBUGS-105207 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. |
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release images differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. This commit also includes changes from openshift#8957 which got reverted by openshift#9233. The above changes were included to prevent unintentional drift during a control plane upgrade. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release images differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. This commit also includes changes from openshift#8957 which got reverted by openshift#9233. The above changes were included to prevent unintentional drift during a control plane upgrade. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release images differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. This commit also includes changes from openshift#8957 which got reverted by openshift#9233. The above changes were included to prevent unintentional drift during a control plane upgrade. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release image differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. The above changes were included to prevent unintentional drift during a control plane upgrade. This commit also includes changes from openshift#8957, which got reverted by openshift#9233. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
|
Fix included in release 5.0.0-0.nightly-2026-08-06-203809 |
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release image differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. The above changes were included to prevent unintentional drift during a control plane upgrade. This commit also includes changes from openshift#8957, which got reverted by openshift#9233. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release image differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. The above changes were included to prevent unintentional drift during a control plane upgrade. This commit also includes changes from openshift#8957, which got reverted by openshift#9233. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release image differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. The above changes were included to prevent unintentional drift during a control plane upgrade. This commit also includes changes from openshift#8957, which got reverted by openshift#9233. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release image differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. The above changes were included to prevent unintentional drift during a control plane upgrade. This commit also includes changes from openshift#8957, which got reverted by openshift#9233. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release image differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. The above changes were included to prevent unintentional drift during a control plane upgrade. This commit also includes changes from openshift#8957, which got reverted by openshift#9233. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release image differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. The above changes were included to prevent unintentional drift during a control plane upgrade. This commit also includes changes from openshift#8957, which got reverted by openshift#9233. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release image differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. The above changes were included to prevent unintentional drift during a control plane upgrade. This commit also includes changes from openshift#8957, which got reverted by openshift#9233. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release image differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. The above changes were included to prevent unintentional drift during a control plane upgrade. This commit also includes changes from openshift#8957, which got reverted by openshift#9233. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release image differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. The above changes were included to prevent unintentional drift during a control plane upgrade. This commit also includes changes from openshift#8957, which got reverted by openshift#9233. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release image differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. The above changes were included to prevent unintentional drift during a control plane upgrade. This commit also includes changes from openshift#8957, which got reverted by openshift#9233. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Gate Karpenter node drift behind control plane upgrade completion. The ec2nodeclass controller now holds AMI/UserData propagation to the EC2NodeClass while the desired release image differs from the last completed version. This prevents nodes from rolling against a partially-upgraded control plane. The above changes were included to prevent unintentional drift during a control plane upgrade. This commit also includes changes from openshift#8957, which got reverted by openshift#9233. Co-authored-by: Jude Zhu <judzhu@redhat.com> Signed-off-by: Max Cao <macao@redhat.com>
Reverts #8957
Justification: https://redhat.atlassian.net/browse/OCPBUGS-105207
This impacts the blocking merge path as well as the release controller.
Summary by CodeRabbit
New Features
Bug Fixes
Tests