OCPBUGS-98915: E2E: LLC: Pass fresh ctx variable to DeferCleanup functions#1562
OCPBUGS-98915: E2E: LLC: Pass fresh ctx variable to DeferCleanup functions#1562mrniranjan wants to merge 1 commit into
Conversation
Earlier DeferCleanup closure carried ctx from BeforeAll and ginkgo cancels that context after BeforeAll node completes so by the time DeferCleanup runs, the context is already cancelled Also replace defer with ginkgo's DeferCleanup and pass new context variable Remove all explicit ctx variables and incorporate them in relevant ginkgo specs like It, BeforeAll etc Signed-off-by: Niranjan M.R <mniranja@redhat.com>
WalkthroughThe LLC end-to-end tests now propagate Ginkgo-provided contexts through hooks and test callbacks. Deferred namespace, deployment, and pod cleanup uses cleanup-specific contexts across SMT-enabled, SMT-disabled, multiple-pod, multiple-container, and runtime suites. ChangesLLC test context modernization
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/performanceprofile/functests/13_llc/llc.go`:
- Around line 337-340: Update namespaces.WaitForDeletion to accept a
context.Context and use it for the polling loop instead of context.TODO(),
following the pods.WaitForDeletion pattern. In
test/e2e/performanceprofile/functests/13_llc/llc.go at lines 337-340, 1145-1148,
and 1224-1227, pass cleanupCtx to every namespaces.WaitForDeletion call so
cleanup cancellation propagates through namespace deletion waits.
🪄 Autofix (Beta)
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: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 5d0d5370-737a-4625-b705-7e249e51957c
📒 Files selected for processing (1)
test/e2e/performanceprofile/functests/13_llc/llc.go
|
/retest-required |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ffromani, mrniranjan 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 |
|
@mrniranjan: This pull request references Jira Issue OCPBUGS-98915, 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. |
|
/verified by @mrniranjan |
|
@mrniranjan: 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. |
|
@mrniranjan: 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. |
Earlier DeferCleanup closure carried ctx from BeforeAll and ginkgo cancels that context after BeforeAll node completes so by the time DeferCleanup runs, the context is already cancelled
Also replace defer with ginkgo's DeferCleanup and pass new context variable
Remove all explicit ctx variables and incorporate them in relevant ginkgo specs like It, BeforeAll etc
Summary by CodeRabbit