Skip to content

Conversation

@ashb
Copy link
Member

@ashb ashb commented Apr 22, 2025

Remove the check/don't skip logic whe the data interval is zero-wdith. Even if
a DAG doesn't have the concept of a data-interval (i.e. it is zero width) it
still is logically consistent for it to have to concept of latest or not, so
we now only compare against the end date of the interval.

(And a few drive-by refactors too, context["task"] is self,
context["dag"] is self.dag)

Screenshot 2025-04-22 at 14 20 05

Reported by @jscheffl #48945 (comment)

@jscheffl jscheffl added the type:bug-fix Changelog: Bug Fixes label Apr 22, 2025
Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good in my view. Backcompat just has a small glitch. Otherwise would favor to merge this even if it is "technically breaking" but was rather broken before.

Thanks for jumping on the comment and making the fix!

Remove the check/don't skip logic whe the data interval is zero-wdith. Even if
a DAG doesn't have the concept of a data-interval (i.e. it is zero width) it
still is logically consistent for it to have to concept of latest or not, so
we now only compare against the end date of the interval.

(And a few drive-by refactors too, `context["task"]` is `self`,
`context["dag"]` is `self.dag`)
@ashb ashb force-pushed the latest-only-op-ignore-datainterval-width branch from 75122fb to 142ce88 Compare April 23, 2025 09:38
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
@ashb ashb merged commit 78615a3 into apache:main Apr 24, 2025
64 checks passed
@ashb ashb deleted the latest-only-op-ignore-datainterval-width branch April 24, 2025 09:28
prabhusneha pushed a commit to astronomer/airflow that referenced this pull request Apr 25, 2025
…che#49554)

Remove the check/don't skip logic whe the data interval is zero-wdith. Even if
a DAG doesn't have the concept of a data-interval (i.e. it is zero width) it
still is logically consistent for it to have to concept of latest or not, so
we now only compare against the end date of the interval.

(And a few drive-by refactors too, `context["task"]` is `self`,
`context["dag"]` is `self.dag`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants