-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Conversation
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit 44c0cf6. |
((backfill.isAssetBackfill && backfill.status === BulkActionStatus.REQUESTED) || | ||
backfill.numCancelable > 0) | ||
); | ||
return backfill.hasCancelPermission && backfill.status === BulkActionStatus.REQUESTED; |
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.
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
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.
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
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
How I Tested These Changes
Changelog