You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airflow.apache.org by Subham Sangwan <su...@gmail.com> on 2026/06/06 11:02:35 UTC

[DISCUSS] Behavior change for get_last_dagrun and get_previous_dagrun for nullable logical_date (AIP-39)

Hello everyone,
While working on fixing depends_on_past for manual and asset-triggered
runs (which don't have a logical_date under AIP-39), I proposed a fix
in PR #66285.
The fix modifies get_previous_dagrun and get_last_dagrun to fall back
to using run_after when logical_date is NULL. This ensures lookups and
dependencies work correctly across scheduled, manual, and asset runs.
For ordering tied run_after values, we use DagRun.id as a
deterministic tie-breaker.Jens Scheffler raised a valid point that
since date/time handling has a long history in Airflow, we should
discuss this semantic behavior change on the mailing list to ensure no
one has objections before merging.

Could you please review if falling back to run_after when logical_date
is NULL for previous dagrun lookups is the acceptable approach?

PR link: https://github.com/apache/airflow/pull/66285
Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@airflow.apache.org
For additional commands, e-mail: dev-help@airflow.apache.org