CNTRLPLANE-3532: migrate HO karpenter status patch to statuspatching helper#8968
CNTRLPLANE-3532: migrate HO karpenter status patch to statuspatching helper#8968vsolanki12 wants to merge 1 commit into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@vsolanki12: This pull request references CNTRLPLANE-3532 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. 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. |
|
Skipping CI for Draft Pull Request. |
📝 WalkthroughWalkthroughThe hostedcluster Karpenter reconciler now resets 🚥 Pre-merge checks | ✅ 4 | ❌ 7❌ Failed checks (7 inconclusive)
✅ Passed checks (4 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 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vsolanki12 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 |
…spatching helper Replace the manual MergeFrom status patch in reconcileKarpenterOperator with statuspatching.PatchStatus, adding optimistic locking and retry-on-conflict for the AutoNode status clearing path. Signed-off-by: Vimal Solanki <vsolanki@redhat.com>
541d030 to
82ccf32
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8968 +/- ##
==========================================
- Coverage 43.53% 43.53% -0.01%
==========================================
Files 771 771
Lines 95798 95799 +1
==========================================
Hits 41707 41707
- Misses 51192 51193 +1
Partials 2899 2899
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@vsolanki12: 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. |
|
The analysis is confirmed. Here is the final report: Test Failure Analysis CompleteJob Information
Test Failure AnalysisErrorSummaryThe Root CauseThe On the This PR replaces those 3 uncovered lines with 4 new lines (the The specific uncovered lines (57–61 in the new file) are: if err := statuspatching.PatchStatus(cpContext, cpContext.Client, cpContext.HCP, func() error {
cpContext.HCP.Status.AutoNode = hyperv1.AutoNodeStatus{}
return nil
}); err != nil {This is a pre-existing coverage gap exposed by the refactor, not a new regression introduced by the PR. Recommendations
Evidence
|
What this PR does / why we need it:
Migrates the manual
MergeFromstatus patch inreconcileKarpenterOperatorto usestatuspatching.PatchStatus, adding optimistic locking and retry-on-conflict for the AutoNode status clearing path.This was a Tier 2 site — it used
MergeFromwithout optimistic lock and without retry. The migration adds both.Part of the broader CNTRLPLANE-3532 migration. Depends on PR #8782 (merged).
Which issue(s) this PR fixes:
Fixes CNTRLPLANE-3532
Special notes for your reviewer:
Checklist:
Summary by CodeRabbit