-
Notifications
You must be signed in to change notification settings - Fork 110
Gracefully exit when terminated mid deploy / destroy #3758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| go func() { | ||
| sig := <-sigChan | ||
| // Stop listening for more signals | ||
| signal.Stop(sigChan) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main routine is still running at this point. We need to make sure it is terminated and wait for that termination before releasing the lock and terminating.
We could return a new context from this function and cancel it when the signal is received.
That doesn't ensure we wait for completion/termination and could be handled similarly.
19 failing tests:
|
| title "A creation request for job1 should be recorded in the requests file. No request for job2 should exist since the process was terminated mid deployment." | ||
| trace cat out.requests.txt | jq 'select(.method == "POST" and (.path | contains("/api/2.2/jobs/create")))' | ||
|
|
||
| rm out.requests.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to record 'bundle plan' after interrupted deploy/destroy.
Changes
Why
Tests