-
Notifications
You must be signed in to change notification settings - Fork 50
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
Adding build canceling (only works with compatible celery brokers redis and rabbitmq) #531
Conversation
db78055
to
5ad782a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
There is a some logic in marking a build as canceled here
BUILDING for at least 5 seconds before it would be marked as failed.
So we should wait 5 seconds in the test before canceling the task. I added the 5 seconds as a safe guard from race conditions though I'm not really sure that check is needed. |
LGTM. Thanks @anirrudh ! |
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.
At least one requested change to properly cancel "docker" tasks. The rest is improvements / suggestions.
``` requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) ```
e458c14
to
97b9940
Compare
Approved by Tania after that
Closes #306
Build canceling exposed at
PUT /api/v1/build/<build-id>/cancel/
and added a new permissionsbuild::cancel
which is available by default foradmin
anddeveloper
roles.