HomeElementl

[dagit] More optimistic switch behavior for schedules/sensors

Description

[dagit] More optimistic switch behavior for schedules/sensors

Summary: Currently, when switching on a schedule or a sensor, the switch remains "off" while in its loading state. Make this a little more responsive/optimistic by switching it to "on" in the loading state where we are turning it on. If it fails, it will revert back to "off".

Test Plan:
Add a 5-second sleep to start_schedule mutation. Go to /instance/schedules, enable some schedules. Verify that the switch goes to "on" while in its loading state, then becomes enabled and remains on.

Raise an exception from the mutation and repeat. Verify that the switch reverts to "off".

Reviewers: bengotow, prha

Reviewed By: prha

Differential Revision: https://dagster.phacility.com/D8303

Details

Provenance
dishAuthored on Jun 9 2021, 2:18 PM
Reviewer
prha
Differential Revision
D8303: [dagit] More optimistic switch behavior for schedules/sensors
Parents
R1:a9bf380fa399: feat: add flag to disable all warnings when running dagit
Branches
Unknown
Tags
Unknown