Skip to content
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

[bitrisescript] Attempt to cancel Bitrise builds when Task is pre-empted or cancelled #924

Open
ahal opened this issue Feb 26, 2024 · 1 comment

Comments

@ahal
Copy link
Contributor

ahal commented Feb 26, 2024

When a bitrisescript task is cancelled or has an infrastructure related error (e.g is pre-empted), we should attempt to cancel the in-progress Bitrise builds as well as they won't be useful anymore.

I think we at least need to handle SIGTERM in script.py, then cancel any in-progress futures, as well as add done callbacks to them to trigger the Bitrise API to abort their associated build.

I'm not 100% sure if a user cancelling the task will send SIGTERM or not..

@jcristau
Copy link
Contributor

AIUI, if the task gets canceled, we'll get a 409 the next time scriptworker calls reclaimTask, which should mean the task gets SIGTERM via https://github.com/mozilla-releng/scriptworker/blob/cd0aac0510f69386b28a375656b5cc070dc2fb7f/src/scriptworker/task.py#L718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants