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

Add status CANCELED #747

Merged
merged 11 commits into from
Feb 29, 2024
Merged

Conversation

nkaretnikov
Copy link
Contributor

@nkaretnikov nkaretnikov commented Jan 29, 2024

Fixes #547.

Description

This pull request: adds status CANCELED, which is displayed in the web UI when the user cancels a build.

Screen Shot 2024-02-26 at 02 46 23

Pull request checklist

  • Did you test this change locally?
  • Did you update the documentation (if required)?
  • Did you add/update relevant tests for this change (if required)?

Additional information

How to test

  • Run via docker
  • Cancel a build via the admin UI by clicking on the cancel button
  • The status of the build should say "CANCELED".

Copy link

netlify bot commented Jan 29, 2024

Deploy Preview for kaleidoscopic-dango-0cf31d canceled.

Name Link
🔨 Latest commit 61be69f
🔍 Latest deploy log https://app.netlify.com/sites/kaleidoscopic-dango-0cf31d/deploys/65e05e0de88429000832db06

conda_store = self.worker.conda_store
with conda_store.session_factory() as db:
build_cleanup(db, conda_store, build_ids, reason)
build_cleanup(db, conda_store, build_ids, reason, is_canceled)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conda-store-ui will need to be updated after this lands to support this better. Currently, it shows undefined for these builds because it doesn't know about this new status:
Screen Shot 2024-02-26 at 00 41 12



def downgrade():
op.execute("DELETE FROM build WHERE status = 'CANCELED'")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This migration does the same thing as the one we have for the installer:
https://github.com/conda-incubator/conda-store/blob/main/conda-store-server/conda_store_server/alembic/versions/57cd11b949d5_add_installer.py

The reason the downgrade part is different is because it's a no-op here with canceled, since the field size is the same.

@nkaretnikov nkaretnikov marked this pull request as ready for review February 26, 2024 04:17
Copy link
Contributor

@dcmcand dcmcand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks @nkaretnikov 🚀

@nkaretnikov nkaretnikov merged commit f4a563b into conda-incubator:main Feb 29, 2024
18 checks passed
@nkaretnikov nkaretnikov deleted the status-canceled-547 branch February 29, 2024 11:06
@trallard
Copy link
Collaborator

@gabalafou I have not verified if this is working as expected, could you check please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 💪🏾
Development

Successfully merging this pull request may close these issues.

[ENH] - status for cancelled build
3 participants