Skip to content

depends_on_past and run lookups broken by nullable logical_date (AIP-39) #65578

@Subham-KRLX

Description

@Subham-KRLX

Under which category would you file this issue?

Airflow Core

Apache Airflow version

3.2.0.dev0

What happened and how to reproduce it?

In Airflow 3 the core methods for identifying previous DAG runs are strictly tied to the logical_date column causing a major regression for Asset triggered and Manual runs where this field is nullable (AIP-39) Specifically methods like get_previous_dagrun in dagrun.py (line 991) and get_last_dagrun in dag.py (line 247) return None or filter out runs when logical_date is missing which leads to depends_on_past checks being bypassed. To reproduce fail a manual run on a DAG with depends_on_past=True and trigger a second manual run; the second run will incorrectly start immediately because the scheduler fails to find and anchor on the previous failed run using the modern run_after chronostamp.

What you think should happen instead?

The scheduler should fallback to using the run_after column for chronological lookups when logical_date is None to ensure depends_on_past still works.

Operating System

macOS 26.4.1 (arm64)

Deployment

None

Apache Airflow Provider(s)

No response

Versions of Apache Airflow Providers

No response

Official Helm Chart version

Not Applicable

Kubernetes Version

No response

Helm Chart configuration

No response

Docker Image customizations

No response

Anything else?

This problem occurs every time for non-scheduled runs (Manual/Asset-triggered) because the anchor logic strictly depends on the presence of a logical_date.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:Schedulerincluding HA (high availability) schedulerarea:corekind:bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetpriority:highHigh priority bug that should be patched quickly but does not require immediate new release

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions