-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Make prev_logical_date
variable offset-aware
#29454
Conversation
Testing locally |
Hi @akrava can you please add a failable test to this? IT would be great if we can have some way to ensure there isn't a regression in the future. |
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.
+1 on adding a test to prevent future regression that @dimberman mentioned.
I don't have a preference on using Datetime
instead. I'll defer to @pierrejeambrun and @bbovenzi there.
Thanks @jacobhurlburt and @dimberman for suggestions. I've changed to Lines 2853 to 2869 in 47b67f1
From the code above we can see that non offset-aware datetime.min is running when isinstance(dag.timetable, CronMixin) is False . That's why I've added test case with latest_only DAG from example folder, because the schedule of this DAG is time interval, not cron: airflow/airflow/example_dags/example_latest_only.py Lines 27 to 29 in 47b67f1
|
* Make `prev_logical_date` variable offset-aware * Test Calendar page for DAG with non-cron like schedule * Use pendulum DateTime.min which is offset-aware (cherry picked from commit f837c01)
* Make `prev_logical_date` variable offset-aware * Test Calendar page for DAG with non-cron like schedule * Use pendulum DateTime.min which is offset-aware (cherry picked from commit f837c01)
Hello, I'm struggling with this issue. I'm installing Airflow by following this instruction https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html. But I see on this pull request seems fix the problem. Is your documentation not update yet? |
If you want an official release, you have to wait for the new release to be published - now it is being voted - but you can help with testing it by installing 2.5.2rc2 version - it would be great if you test it and post information about it in #30028 - like others did. |
Closes: #29227
^ 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.