You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "akrava (via GitHub)" <gi...@apache.org> on 2023/02/14 13:00:44 UTC
[GitHub] [airflow] akrava commented on pull request #29454: Make `prev_logical_date` variable offset-aware
akrava commented on PR #29454:
URL: https://github.com/apache/airflow/pull/29454#issuecomment-1429711549
Thanks @jacobhurlburt and @dimberman for suggestions. I've changed to `DateTime.min` from `pendulum` library - and it works fine. Also I've added test for this case - this error is reproducing only when DAG has non-cron schedule (like time interval). Here is code: https://github.com/apache/airflow/blob/47b67f13da667de4eb69233404d4d5a33574dd58/airflow/www/views.py#L2853-L2869
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: https://github.com/apache/airflow/blob/47b67f13da667de4eb69233404d4d5a33574dd58/airflow/example_dags/example_latest_only.py#L27-L29
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org