Skip to content

Conversation

@jaymasiwal
Copy link
Contributor

This PR adds runtime validation to DataInterval to enforce documented
invariants:

  • Both start and end must be timezone-aware
  • end must not be earlier than start

Previously, these constraints were documented but not enforced,
allowing invalid DataInterval instances to be constructed and later
fail in less obvious ways.

The change raises AirflowException early to fail fast and improve
debuggability.

No behavior is changed for valid DAGs.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@jaymasiwal
Copy link
Contributor Author

CI failures indicate this change affects core behavior more broadly than intended.
Closing for now and will revisit via discussion or a narrower change if appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant