← Workflows

阅读中文版本

Pipeline Dependency Orchestration Workflow

Model pipeline tasks as explicit dependencies with backfill-aware scheduling, failure isolation per branch, and visibility into the critical path.

intermediate~30 mindata-pipelineorchestrationscheduling

Objective

Replace time-based cron chains with dependency-aware orchestration so tasks run when inputs are ready and failures stop only their dependents.

Environment

  • An orchestrator (Airflow, Dagster, or equivalent)
  • Tasks currently chained by timing or shell scripts
  • Input datasets with defined freshness signals

Steps

1. Model data dependencies, not clock times

Express each task as depending on named upstream datasets or tasks completing, replacing sleeps and start-time guesses.

Expected state: Tasks trigger on input readiness, and the schedule is a graph rather than a timetable.

2. Isolate failure by branch

Configure failure policy so a failing task blocks only its downstream dependents while independent branches continue.

Expected state: A broken enrichment step no longer halts unrelated nightly reporting.

3. Make the critical path visible

Instrument task durations and render the DAG critical path so scheduling improvements target the chain that gates completion.

Expected state: The team can name which tasks gate the pipeline end time.

4. Support backfill as a first-class mode

Parameterize tasks by logical date so re-running a past window reuses the same graph without touching current runs.

Expected state: Backfilling last week executes the same dependencies scoped to the past window.

5. Alert on the deadline, not each task

Set SLA alerts on pipeline completion (and key intermediate milestones) instead of paging for every failed retry.

Expected state: On-call pages when the business deadline is at risk, not for routine per-task retries.

Expected outcome

A pipeline that runs on data readiness with branch-isolated failures, a known critical path, and deadline-level alerting instead of cron archaeology.

Verification

A deliberately failed mid-pipeline task leaves independent branches green; a backfill of a past window runs to completion without manual graph surgery.

Clock-time chains are pipelines wearing blindfolds

Cron jobs chained by sleep 600 encode a guess about upstream speed: when the guess breaks, downstream reads partial data silently. Dependency-based orchestration removes the guess, and branch isolation stops one failure from canceling the whole night.

cron chain (fragile):
  00:30 extract; 00:35 transform; 00:40 load
  (extract runs 22 min on month-end -> partial read)

DAG (dependency-based):
  extract >> [clean, enrich]
  clean >> load_core
  enrich >> load_enriched >> reports

month-end: extract 22 min -> downstream auto-shifts
  enrich fails 01:10Z: load_core + reports STILL RUN
  (branch isolation)
SLA: pipeline done by 04:00Z -> alert 03:40Z only

Readiness beats timing

Every sleep in a pipeline is a bet that upstream will finish first, and month-end or backlog days lose that bet silently. Depending on the completion signal itself is the structural fix, and it removes the monthly “why are the numbers wrong” mystery at its root.

Deadline alerts right-size the page

Paging for every task retry trains on-call to ignore pages; paging for the business deadline (with one or two milestone warnings) keeps the signal meaningful. The orchestrator should know what done-by means, not just what failed.