DPTP-4077: Always run post steps on cancellation to prevent resource leaks#4920
DPTP-4077: Always run post steps on cancellation to prevent resource leaks#4920deepsm007 wants to merge 2 commits intoopenshift:mainfrom
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@deepsm007: This pull request references DPTP-4077 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 "4.22.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. |
WalkthroughAdds phase tracking to multi-stage test execution: new exported label constant, a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
/lgtm |
de15f69 to
cf901c9
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@pkg/steps/multi_stage/multi_stage.go`:
- Around line 248-288: The post steps always use context.Background() which
ignores job deadlines/cancellation; change postCtx to use the original ctx by
default and only switch to context.Background() when cancelledDuringPreOrTest is
true: set postCtx := ctx, and if cancelledDuringPreOrTest then set postCtx =
context.Background(); then call s.runSteps(postCtx, "post", s.post, ...) so post
steps respect the original deadline/cancellation unless a prior cancellation
occurred. Ensure this change is applied around the existing
cancelledDuringPreOrTest, postCtx, and runSteps usage (refer to
cancelledDuringPreOrTest, postCtx, runSteps, cancelObserversContext, s.name).
|
/lgtm |
|
/hold |
32d1d0c to
aafadc2
Compare
|
/unhold |
|
Scheduling required tests: |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deepsm007, hector-vido, liangxia 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 |
|
/hold |
|
@deepsm007: The following test failed, say
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. |
|
/cc |
/cc @openshift/test-platform