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/09 23:48:12 UTC

[GitHub] [airflow] akrava opened a new pull request, #29454: Make `prev_logical_date` variable offset-aware

akrava opened a new pull request, #29454:
URL: https://github.com/apache/airflow/pull/29454

   Can fix https://github.com/apache/airflow/issues/29453 
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   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](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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


[GitHub] [airflow] potiuk commented on pull request #29454: Make `prev_logical_date` variable offset-aware

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #29454:
URL: https://github.com/apache/airflow/pull/29454#issuecomment-1467784966

   > 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.


-- 
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


[GitHub] [airflow] akrava commented on pull request #29454: Make `prev_logical_date` variable offset-aware

Posted by "akrava (via GitHub)" <gi...@apache.org>.
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


[GitHub] [airflow] rdzsp commented on pull request #29454: Make `prev_logical_date` variable offset-aware

Posted by "rdzsp (via GitHub)" <gi...@apache.org>.
rdzsp commented on PR #29454:
URL: https://github.com/apache/airflow/pull/29454#issuecomment-1467707609

   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?


-- 
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


[GitHub] [airflow] bbovenzi merged pull request #29454: Make `prev_logical_date` variable offset-aware

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi merged PR #29454:
URL: https://github.com/apache/airflow/pull/29454


-- 
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


[GitHub] [airflow] dimberman commented on pull request #29454: Make `prev_logical_date` variable offset-aware

Posted by "dimberman (via GitHub)" <gi...@apache.org>.
dimberman commented on PR #29454:
URL: https://github.com/apache/airflow/pull/29454#issuecomment-1428118634

   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.


-- 
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


[GitHub] [airflow] jacobhurlburt commented on pull request #29454: Make `prev_logical_date` variable offset-aware

Posted by "jacobhurlburt (via GitHub)" <gi...@apache.org>.
jacobhurlburt commented on PR #29454:
URL: https://github.com/apache/airflow/pull/29454#issuecomment-1426264051

   Testing locally `prev_logical_date = DateTime.min` is also an option. Might be preferable since it is consistent with the move to use `pendulum` going forward.


-- 
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


[GitHub] [airflow] pierrejeambrun commented on pull request #29454: Make `prev_logical_date` variable offset-aware

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on PR #29454:
URL: https://github.com/apache/airflow/pull/29454#issuecomment-1428534146

   also solves: https://github.com/apache/airflow/issues/29227


-- 
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