Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
refactor: move autoremove into the jobexecutor #1463
refactor: move autoremove into the jobexecutor #1463
Changes from 5 commits
3e7a9f3
47d1998
aef863f
4e52c3e
3960dee
c35950b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This will fail if the job was canceled before (e.g. by os signal).
Please make sure that a fallback context is used in that case.
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.
I changed the code to allow docker 1min for closing / removing the runner. Should be safe now.
Additionally I now reuse the existing joblogger instead of creating one. I always want to use my own logger provided to the RunContext executor.
Do we want to add a forceCancel context as field to the context, so we can force quit act by pressing ctrl+c twice? This could be the parent context of the context with a timeout.
Needs to be tested manually, I don't think we have tests for cancelling act.
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.
That was the case before. The
BackgroundContext
used as a fallback was cancelable as well. That would then cancel/stop the cleanup.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.
I want both a normal cancel with cleanup and additionally the opportunity to send another cancellation signal to abort cleanup and quit as soon as possible.
Previously we had one of them, but never both at the same time.
For Example this scenario
Your CI system could just never fire the forcecancel context and you have an opt out.
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.
I understood and I'm fine with that.
I just thought that it did work before, as a second cancelation was respected by act (if I remember correctly).