HomePhabricator

Don't require an initial reconciliation step to be able to start schedules that…

Description

Don't require an initial reconciliation step to be able to start schedules that aren't in the schedule DB yet

Summary:
This is an attempt to let you turn on schedules without needing to think about whether they are in tne DB or not. Schedules that have no DB entry return a dummy ScheduleState identical to the one created by the reconcile command. Starting a schedule that's not in the DB creates the DB entry, then updates it to STARTED.

I can't think of anything this will break but I bet the reviewers will know edge cases that I'm not considering where it does?

Test Plan:
Load a fresh dagit without doing anything related to schedules, all the schedules in the repo now show up as off (instead of a prompt to reconcile)
Turn a schedule on, it works as before
Try with both cron scheduler and new CLI scheduler
Will add automated testing after initial feedabck

Reviewers: sashank, alangenfeld, schrockn

Reviewed By: alangenfeld

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

Details