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

[ui] update backfill cancel button to only have one option #27272

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

jamiedemaria
Copy link
Contributor

@jamiedemaria jamiedemaria commented Jan 22, 2025

Summary & Motivation

Previously the backfill cancellation button had two titles "Cancel backfill submission" and "Terminate unfinished runs". Over time it seems that most of the cases when "Terminate unfinished runs" was shown got phased out, and "Cancel backfill submission" is a misnomer because it doesn't stop the backfill from being added to the DB, it cancels the backfill and all runs it has launched.

Additionally, in the remaining case when "Terminate unfinished runs" was shown, it used a different code path to just cancel the runs launched by the backfill and didn't cancel the backfill itself, potentially leading to a confusing state where a user has "canceled" the backfill but the backfill is still running and submitting new runs.

This PR consolidates the button so that it just has one behavior: sending a cancellation query to the backfill. This will signal to the daemon to cancel any in-progress runs, then mark the backfill as canceled. Additionally it allows us to immediately exit the dialog that appears when a user cancels a backfill. The button is also renamed to make its action more clear

Screen recording of canceling a backfill
https://github.com/user-attachments/assets/345a27b9-aa07-4aeb-9960-c6524251565e

If a user doens't have permission to cancel a backfill or the backfill cannot be canceled (already completed), the button is greyed out
Screenshot 2025-01-22 at 12 02 39 PM

How I Tested These Changes

Changelog

Insert changelog entry or delete this section.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

github-actions bot commented Jan 22, 2025

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-x2td7k8vl-elementl.vercel.app
https://jamie-backfill-cancel-button.core-storybook.dagster-docs.io

Built with commit 44c0cf6.
This pull request is being automatically deployed with vercel-action

@jamiedemaria jamiedemaria changed the title backfill cancel button [ui] update backfill cancel button to only have one option Jan 22, 2025
((backfill.isAssetBackfill && backfill.status === BulkActionStatus.REQUESTED) ||
backfill.numCancelable > 0)
);
return backfill.hasCancelPermission && backfill.status === BulkActionStatus.REQUESTED;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

since job backfills can be canceled via the daemon now, we don't need this additional check. I think this is vestigial from a time when job-backfills were canceled by terminating runs that were in-progress

@jamiedemaria jamiedemaria marked this pull request as ready for review January 22, 2025 17:25
Copy link
Contributor

@salazarm salazarm left a comment

Choose a reason for hiding this comment

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

Makes sense to me. Could really use some tests for this but none of these pages are currently tested so I'll leave it up to you if you want to go down the rabbit hole

@jamiedemaria jamiedemaria merged commit b313b24 into master Jan 22, 2025
6 checks passed
@jamiedemaria jamiedemaria deleted the jamie/backfill-cancel-button branch January 22, 2025 20:00
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

Successfully merging this pull request may close these issues.

2 participants