Fixes 32505: anchor Airflow 3 DAG start_date on pipeline updatedAt, not wall-clock now - #32928
Conversation
…clock now build_dag_configs() runs on every DAG-processor reparse, not just on first DAG creation. On Airflow 3, start_date was set to timezone.utcnow(), so every reparse recomputed it to a new "now". A cron schedule only fires once its interval, measured from start_date, has elapsed -- with start_date perpetually reset, the interval never elapses and scheduled ingestion pipelines never fire on their own, even though they deploy and show up in the Airflow UI fine. This was introduced by open-metadata#24577 ("MINOR: Fix airflow 3 scheduling"), whose intent (avoid an immediate catch-up run for a freshly (re)created pipeline on Airflow 3, which fires even with catchup=False when start_date is in the past) was correct, but "now" needed to be stable across reparses, not recomputed every time. Fix: anchor start_date on the pipeline's own updatedAt timestamp instead. createOrUpdate is a no-op (bumps neither version nor updatedAt) when a redeploy doesn't actually change the stored pipeline config, so start_date stays stable across routine reparses/redeploys of an unchanged pipeline -- letting the interval elapse and the DAG fire -- while still resetting close to "now" whenever the pipeline is genuinely (re)configured, preserving the original PR's intent. Fixes open-metadata#32505 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ ApprovedFixes Airflow 3 scheduled ingestion pipelines never firing by anchoring DAG OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|


Describe your changes:
Fixes #32505
build_dag_configs()runs on every DAG-processor reparse, not just on first DAG creation. On Airflow 3,start_datewas set totimezone.utcnow(), so every reparse recomputed it to a new "now". A cron schedule only fires once its interval — measured fromstart_date— has elapsed; withstart_dateperpetually reset, the interval never elapses and scheduled ingestion pipelines never fire on their own, even though they deploy and show up in the Airflow UI just fine (see #32505 for the full repro/root-cause writeup).This was introduced by #24577 ("MINOR: Fix airflow 3 scheduling"). That PR's intent was correct — avoid Airflow 3 immediately firing a catch-up run for a freshly (re)created pipeline, since Airflow 3 fires even with
catchup=Falsewhenstart_dateis in the past — but the fix used astart_datethat wasn't stable across reparses, which is what actually broke scheduling.Fix: anchor
start_dateon the pipeline's ownupdatedAttimestamp instead of wall-clocknow.createOrUpdateis a no-op (bumps neitherversionnorupdatedAt) when a redeploy doesn't actually change the stored pipeline config, so:start_datestays stable across routine reparses/redeploys of an unchanged pipeline → the interval elapses → the DAG fires on schedule.start_datestill resets close to "now" whenever the pipeline is genuinely (re)configured → preserves the original PR's intent of not backfilling stale runs.Falls back to
timezone.utcnow()ifupdatedAtisn't set (defensive; always present for a persisted pipeline entity).Verified the anchoring logic directly against Airflow 3.0.3 (
airflow.utils.timezone.from_timestamp) — two calls with an unchangedupdatedAtreturn byte-identicalstart_dates, confirming the reparse-stability property this fix relies on.Type of change:
Checklist:
Fixes 32505: <short explanation>test_build_dag_configs_start_date.py):start_datestability across repeatedbuild_dag_configs()calls on an unchanged pipeline,start_datetrackingupdatedAt, and the no-updatedAtfallback.🤖 Generated with Claude Code