OCPBUGS-84969: fix(e2e): wait for Karpenter node cleanup in parallel tests to prevent vCPU flake - #8414
Conversation
…t vCPU flake testCapacityReservation and testNodeClassVersionField provision Karpenter nodes but only rely on t.Cleanup for deletion without waiting for nodes to fully terminate. When the sequential testBillingConsolidationAndPDB runs next and asserts AutoNode.VCPUs=0, stale NodeClaims from these parallel tests cause a 50% flake rate across all e2e-aws runs. Add explicit WaitForReadyNodesByLabels(..., 0, ...) calls after deleting workloads and NodePools, matching the pattern already used by testARM64Provisioning and testInstanceProfileAnnotation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@bryan-cox: This pull request explicitly references no jira issue. 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 test file 🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox 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 |
|
@bryan-cox: This pull request references Jira Issue OCPBUGS-84969, 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. |
|
@bryan-cox: This pull request references Jira Issue OCPBUGS-84969, 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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8414 +/- ##
=======================================
Coverage 37.23% 37.23%
=======================================
Files 752 752
Lines 91829 91829
=======================================
Hits 34195 34195
Misses 54993 54993
Partials 2641 2641
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/test e2e-aws |
|
/verified by e2e |
|
@bryan-cox: This PR has been marked as verified by 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. |
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
|
/pipeline auto |
|
Pipeline controller notification The |
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
|
/pipeline required |
|
Scheduling tests matching the |
Test Resultse2e-aws
e2e-aks
|
|
/retest |
|
Confirmed from the e2e-aws build log that both tests waited for nodes to fully terminate before the billing test ran:
All Karpenter subtests passed, including the previously flaky billing test: |
|
@bryan-cox: you cannot LGTM your own PR. 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 kubernetes-sigs/prow repository. |
|
@bryan-cox: 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. |
|
@bryan-cox: Jira Issue Verification Checks: Jira Issue OCPBUGS-84969 Jira Issue OCPBUGS-84969 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. |
What this PR does / why we need it:
Fixes a 50% flake rate in
TestKarpenter/Main/Billing_vCPUs,_consolidation,_and_cluster_deletion_with_blocking_PDBacross all e2e-aws runs.testCapacityReservationandtestNodeClassVersionFieldprovision Karpenter nodes but only rely ont.Cleanupfor deletion without waiting for nodes to fully terminate. When the sequentialtestBillingConsolidationAndPDBruns next and assertsAutoNode.VCPUs=0, stale NodeClaims from these parallel tests cause the assertion to fail withAutoNode.VCPUs=4, want 0(one lingering t3.xlarge = 4 vCPUs).This adds explicit
WaitForReadyNodesByLabels(..., 0, ...)calls after deleting workloads and NodePools, matching the pattern already used bytestARM64ProvisioningandtestInstanceProfileAnnotation.Which issue(s) this PR fixes:
6 out of 12 e2e-aws runs in the last 24h failed due to this flake, blocking unrelated PRs (#8385, #8396, #8404, #8409).
https://redhat.atlassian.net/browse/OCPBUGS-84969
Checklist:
Summary by CodeRabbit