Page MenuHomeElementl

[dagit] Force cancelation from Dagit UI

Authored by dish on Dec 18 2020, 3:59 PM.
Referenced Files
Unknown Object (File)
Wed, Jun 29, 3:50 AM
Unknown Object (File)
Sun, Jun 26, 7:13 PM
Unknown Object (File)
Fri, Jun 17, 8:00 PM
Unknown Object (File)
Mon, Jun 13, 12:14 AM
Unknown Object (File)
Sat, Jun 11, 8:09 PM
Unknown Object (File)
Sat, Jun 11, 10:34 AM
Unknown Object (File)
Fri, Jun 10, 11:06 PM
Unknown Object (File)
Thu, Jun 9, 10:41 AM



Use the new termination policy to allow forcing run cancelation from the Dagit UI. Specifically, this diff adds the behavior to bulk actions on the Runs page. In a followup, we can add the same behavior to individual termination.

On the Runs page, if I select a handful of runs, then use the bulk menu to terminate:

  • If I have selected runs with canTerminate === true, show a checkbox in the termination dialog to allow forcing cancelation, with a warning. If the checkbox is checked, change the language to indicate that it will be a force-cancelation.
  • If I have selected only runs with canTerminate === false, don't show the checkbox, just show the warning. The action will be to force termination for all of them.

Add a handful of storybook examples to test.

Test Plan

Storybook examples. View Runs page after kicking off a run, use bulk menu to cancel. Verify proper rendering and behavior of termination dialog.

Diff Detail

R1 dagster
Lint Not Applicable
Tests Not Applicable

Event Timeline

Freeze selected IDs so that state changes behind the dialog don't affect it

Going to freeze a little more state.

Use a map to track run IDs and their terminability, allowing me to restore the checkbox vs. message distinction.



would be cool if there was a single source of truth for statuses that are finished and unfinished, i think this is elsewhere in the codebase in various other places too


STARTING and CANCELING runs are also not terminatable fwiw


suggest removing the force here, the button makes it clear


drop the fully?


here too


"Force termination" might sound slightly less weird? Not sure

This revision is now accepted and ready to land.Dec 18 2020, 8:49 PM
This revision was automatically updated to reflect the committed changes.