Page MenuHomeElementl

[dagit] More optimistic switch behavior for schedules/sensors
ClosedPublic

Authored by dish on Wed, Jun 9, 2:25 PM.

Details

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

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dish requested review of this revision.Wed, Jun 9, 2:36 PM

@dish were you able to repro the laggy behavior before?

@prha I wasn't able to repro the behavior described in the issue, and am still not sure how it comes about.

This revision is now accepted and ready to land.Mon, Jun 14, 5:22 PM