Page MenuHomeElementl

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

Authored by dgibson on Oct 8 2020, 7:48 PM.

Details

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

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 8 2020, 8:07 PM
Harbormaster failed remote builds in B19332: Diff 23493!

seems good to me - add some comments to [1] since its a bit clever whats going on

python_modules/dagster-graphql/dagster_graphql/implementation/fetch_schedules.py
136

[1]

python_modules/dagster-graphql/dagster_graphql/schema/schedules/schedule_definition.py
73

[1]

rebase, add comments, add more test coverage

dgibson retitled this revision from RFC: Don't require an initial reconciliation step to be able to start schedules that aren't in the schedule DB yet to Don't require an initial reconciliation step to be able to start schedules that aren't in the schedule DB yet.Nov 13 2020, 4:37 PM
This revision is now accepted and ready to land.Nov 16 2020, 9:04 PM