Page MenuHomeElementl

[dagit] Force cancelation from Dagit UI
ClosedPublic

Authored by dish on Dec 18 2020, 3:59 PM.
Tags
None
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
Subscribers
None

Details

Summary

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

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
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.

excellent

js_modules/dagit/src/runs/RunActionsMenu.tsx
181–185

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

186

STARTING and CANCELING runs are also not terminatable fwiw

js_modules/dagit/src/runs/TerminationDialog.tsx
166

suggest removing the force here, the button makes it clear

185–186

drop the fully?

200

here too

229–231

"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.