Fix depends_on_past for manual/asset runs when logical_date is NULL #66285
Fix depends_on_past for manual/asset runs when logical_date is NULL #66285Subham-KRLX wants to merge 4 commits into
Conversation
…gical_date Fall back to run_after when logical_date is None to ensure depends_on_past works for all run types. Fixes apache#65578
d1f4f95 to
b31f9b3
Compare
jscheffl
left a comment
There was a problem hiding this comment.
I fear besides describing this as a bug fix that an expert (not mine :-D) Opinion is required if it is okay to change this. Because it is a behaviroal change in semantics of how a "previous" run is treated. It for sure requires a newsfragment to highlight this to users and I'd request a short call to devlist if there is somebody raising concerns. Personally for me it is OK to change but all things that are related to dates and times has a long long hostory.
I agree this behavioral change needs a newsfragment and I will add it along with the missing pytests. Instead of the dev mailing list I prefer to raise this in the Airflow Slack channel to get feedback from core maintainers does that sound good to you? |
Devlist id the "official" Apache medium, Slack is accepted for collaboration. Slack is not archived and content vanishes after 90 days, so no point to reference later (...mememe but Jens said on Slack in Dec 2021 that it is okay). |
|
I have just started a thread on the dev mailing list to get feedback from the broader community as requested i will also add the newsfragment and the missing pytests in the meantime. |
|
@Subham-KRLX — Some review feedback from Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
This PR restores depends_on_past for manual and asset-triggered runs when DagRun.logical_date is NULL.
Problem:
Lookups used only logical_date, so manual/asset runs were ignored and depends_on_past could be bypassed.
Fix:
Get_previous_dagrun() falls back to run_after; get_last_dagrun() orders by COALESCE(logical_date, run_after). Tests and checks updated.
closes: #65578
Was generative AI tooling used to co-author this PR?
Yes — Claude (for PR description)
Important
🛠️ Maintainer triage note for @Subham-KRLX · by
@potiuk· 2026-07-08 16:05 UTCThis PR was in the maintainer review queue, but its Postgres core tests are now failing — so I've removed the
ready for maintainer reviewlabel and moved it back to your court.The ball is in your court — you've been assigned. Fix the failing tests, then mark it Ready for review again. See the Pull Request quality criteria.
Automated triage — may be imperfect; a maintainer takes the next look.