-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AIP-83 Restore uniqueness constraint on logical date and make logical date nullable #46232
base: main
Are you sure you want to change the base?
AIP-83 Restore uniqueness constraint on logical date and make logical date nullable #46232
Conversation
…stronomer/airflow into restore-unique-constraint-logical-date
Few tests are failing looking into it |
…que-constraint-logical-date
…stronomer/airflow into restore-unique-constraint-logical-date
Failing test cases will require change in backfill reprocess behaviour, I have create PR which will fix these failing tests |
What’s the order we should merge the two PRs? Tests are not passing on this one, but the other PR needs this to be merged first. -- Edit: Talked to Rahul, this should be made greeen and go in first. |
…que-constraint-logical-date
airflow/models/dagrun.py
Outdated
or ( | ||
task.start_date is None | ||
or (self.logical_date is not None and task.start_date <= self.logical_date) | ||
) | ||
and ( | ||
task.end_date is None | ||
or (self.logical_date is not None and self.logical_date <= task.end_date) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or ( | |
task.start_date is None | |
or (self.logical_date is not None and task.start_date <= self.logical_date) | |
) | |
and ( | |
task.end_date is None | |
or (self.logical_date is not None and self.logical_date <= task.end_date) | |
) | |
or ( | |
task.start_date is None | |
or self.logical_date is None | |
or task.start_date <= self.logical_date | |
) | |
and (task.end_date is None or self.logical_date is None or self.logical_date <= task.end_date) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this "might" be the correct condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this one is correct. Thanks @Lee-W
@uranusjr Fixed failing tests now only failing tests are now related to backfill |
…stronomer/airflow into restore-unique-constraint-logical-date
Closes: #46187
^ 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 newsfragments.