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

Adding build canceling (only works with compatible celery brokers redis and rabbitmq) #531

Merged
merged 31 commits into from
Dec 18, 2023

Conversation

costrouc
Copy link
Member

@costrouc costrouc commented Aug 8, 2023

Closes #306

Build canceling exposed at PUT /api/v1/build/<build-id>/cancel/ and added a new permissions build::cancel which is available by default for admin and developer roles.

@costrouc costrouc changed the title Adding build canceling (only works with compatible celery brokers redis and rabbitmq Adding build canceling (only works with compatible celery brokers redis and rabbitmq) Aug 8, 2023
@costrouc

This comment was marked as resolved.

@trallard

This comment was marked as outdated.

@costrouc

This comment was marked as outdated.

@trallard

This comment was marked as outdated.

@trallard trallard added this to the 🚀 JATIC - Q1 milestone Aug 15, 2023
@costrouc

This comment was marked as outdated.

@anirrudh

This comment was marked as outdated.

@anirrudh

This comment was marked as resolved.

@costrouc
Copy link
Member Author

There is a some logic in marking a build as canceled here

datetime.datetime.utcnow() - datetime.timedelta(seconds=5)
that might be important context @anirrudh . It requires that a build has been 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.

costrouc

This comment was marked as outdated.

@costrouc
Copy link
Member Author

LGTM. Thanks @anirrudh !

Copy link
Contributor

@pierrotsmnrd pierrotsmnrd left a 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.

conda-store-server/conda_store_server/server/views/api.py Outdated Show resolved Hide resolved
conda-store-server/conda_store_server/server/views/api.py Outdated Show resolved Hide resolved
@nkaretnikov nkaretnikov dismissed pierrotsmnrd’s stale review December 18, 2023 17:12

Approved by Tania after that

@nkaretnikov nkaretnikov merged commit f7884a2 into main Dec 18, 2023
18 checks passed
@nkaretnikov nkaretnikov deleted the feat-cancel-build branch December 18, 2023 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api area: user experience 👩🏻‍💻 Items impacting the end-user experience
Projects
Status: Done 💪🏾
Development

Successfully merging this pull request may close these issues.

Ability to cancel a build.
6 participants