runs

Run kinds, manual runs, backfill, pausing, queueing.

Generated by make records from the decisions whose topic (or also) is this one; edit the decisions, not this page.

Current

Backfill

  • Backfill has an API, CLI dry runs and UI progress (D363): POST /api/v1/dags/{id}/backfills returns the backfill ID and created/skipped run counts; GET /api/v1/backfills/{id} returns run counts by state. schedr runs backfill --dry-run counts without creating runs. The DAG page has a Backfill form and displays progress.

  • Backfill runs are ordered oldest first (D364): Backfill runs are always ordered oldest first; no newest-first ordering is offered.

  • A backfill skips fire times with a successful or unfinished run (D400): By default a backfill creates a run only for a fire time with no successful, queued or running run for that planned_for (of any kind), so a day isn’t run twice at once; --all creates one for every fire time.

  • A backfill’s runs start on a paused DAG (D401): A backfill is a person’s request, as a manual run is: its runs start on a paused DAG, waiting only for max_active_runs. Pausing switches off the DAG’s trigger only (decision 398).

  • Cancelling a backfill cancels its queued and running runs (D402): schedr runs cancel --backfill <id> cancels every unfinished run of the backfill: queued ones at once, running ones stopped as schedr runs cancel stops a run. Finished runs stay as they are.

  • A backfill’s progress shows on its runs and on the DAG page (D403): Each backfill run’s label says backfill 3/31 (its place among the backfill’s runs, oldest first). The DAG page lists its backfills with their runs’ counts by state and a Cancel button.

  • A backfill works on any trigger with fire times (D404): A backfill takes a DAG whose trigger has fire times: Cron (its presets included), Every and Once (a single run). A DAG with trigger=None, Chained(), an event trigger, RunOf or EventNamed has none, and a backfill of it is refused.

  • The scheduler skips fire times another run covers (D405): The scheduler creates no scheduled run for a fire time with a successful, queued or running run of any kind (a backfill’s, a manual one): D400’s rule the other way, so a period isn’t run twice. Covered fire times take no place, and with catchup the ones after them follow. A covering run that fails later no longer covers its fire time: a pass while that time is still due (the latest one, or any with catchup) creates its scheduled run; one no longer due is rerun by hand.

From other topics

  • A DAG is held while its file fails to import (D72, code-delivery; built M4.3a)

  • Mapped task state follows its instances (D75, outcomes; built M4.3b)

  • A queued run keeps its validated parameter values (D137, task-context; built M4.5a)

  • Run parameters are described in DAG JSON and stored as tagged values (D138, task-context; built M4.5a)

  • Cancellation does not stop a running per-task cleanup (D219, cleanup; built M4.8b)

  • A lost worker fails the run when its declared cleanup cannot move (D220, cleanup; built M4.8b2)

  • A resource cleanup exhausting retries fails the run (D263, cleanup; built M4.8c2)

  • Resource cleanups run while a DAG is paused (D264, cleanup; built M4.8c2)

  • Resource cleanups keep the run’s active slot (D270, cleanup; built M4.8c2)

  • Cancelling a run keeps its resource cleanups (D277, cleanup; built M4.8c2)

  • A resource cleanup can be cancelled directly (D279, cleanup; built M4.8f)

  • A late cleanup failure turns a successful run yellow (D309, cleanup; built (B169 fixed))

  • Build the trigger operator and backfill in two parts (D357, chained-runs; rule)

  • TriggerDagOperator gives the target run’s ID (D358, chained-runs; built M4.12a)

Replaced

None.

Where in code

  • crates/schedr-agent/src/render.rs (D138)

  • crates/schedr-api/src/routes.rs (D72)

  • crates/schedr-api/src/routes.rs::create_backfill (D363)

  • crates/schedr-api/src/routes.rs::get_backfill (D363)

  • crates/schedr-api/src/views.rs (D72, D309)

  • crates/schedr-api/src/views.rs::kind_label (D403)

  • crates/schedr-db/migrations/postgres/0001_initial.sql (D72)

  • crates/schedr-db/src/attempts.rs (D277)

  • crates/schedr-db/src/backfills.rs::covered_times (D400)

  • crates/schedr-db/src/backfills.rs::unfinished_backfill_runs (D402)

  • crates/schedr-db/src/instances.rs (D75, D277)

  • crates/schedr-db/src/reads.rs::BackfillPlace (D403)

  • crates/schedr-db/src/reads.rs::late_failure (D309)

  • crates/schedr-db/src/runs.rs (D138)

  • crates/schedr-db/src/runs.rs::Held (D72)

  • crates/schedr-db/src/runs.rs::mark_late_failure (D309)

  • crates/schedr-master/src/commands.rs::cancel_backfill (D402)

  • crates/schedr-master/src/dispatch.rs::end_lost (D220)

  • crates/schedr-master/src/dispatch/chained.rs::chained_step (D358)

  • crates/schedr-master/src/dispatch/tests.rs (D220)

  • crates/schedr-master/src/execution.rs (D75)

  • crates/schedr-master/src/mapping.rs (D75)

  • crates/schedr-master/src/params.rs::run_params (D137, D138)

  • crates/schedr-master/src/planning.rs::runs_to_start (D364)

  • crates/schedr-master/src/planning.rs::scheduled_runs_except (D405)

  • crates/schedr-master/src/progress.rs (D277)

  • crates/schedr-master/src/progress.rs::settle_mapped (D75)

  • crates/schedr-master/src/scheduler.rs::due_runs (D405)

  • crates/schedr-master/src/scheduler/backfill.rs::backfill (D400, D404)

  • crates/schedr-master/src/scheduler/backfill.rs::fire_times_in (D364)

  • crates/schedr-master/src/scheduler/backfill.rs::store (D401)

  • crates/schedr-model/src/dag.rs::ResourceState (D263)

  • crates/schedr-ui/src/actions.rs::backfill (D363)

  • crates/schedr-ui/src/pages.rs::BackfillRow (D403)

  • crates/schedr-ui/src/runs.rs::ResourceRow (D279)

  • crates/schedr/src/user.rs::backfill (D363)

  • python/schedr/_params.py (D137)

  • python/schedr/_params.py::declare (D138)

  • python/schedr/chained.py::TriggerDagOperator (D358)

Open

None.

Details and edge cases, with the reasons; read them before changing this:

  • JOURNAL.md: D400, D401, D402, D403, D404, D405

  • archive/PROJECT.md: Runs: manual runs, backfill and pausing