You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/07 04:43:34 UTC

[GitHub] [airflow] uranusjr opened a new pull request #20737: Rewrite DAG run retrieval in task command

uranusjr opened a new pull request #20737:
URL: https://github.com/apache/airflow/pull/20737


   The previous implementation is a bit too convoluted for me to make sense, so I broke down the logic and rewrote the entire function to make sure all possibilities are covered. The current logic, as documented in the docstring, is:
   
   1. If the input `exec_date_or_run_id` matches a DAG run ID, return the run.
   2. Try to parse the input as a date. If that works, and the resulting date matches a DAG run’s logical date, return the run.
   3. If `create_if_necessary` is False and the input works for neither of the above, raise `DagRunNotFound`.
   4. Try to create a new DAG run. If the input looks like a date, use it as the logical date; otherwise use it as a run ID and set the logical date to the current time.
   
   Minor refacoring also added to satisfy Mypy. A TaskInstanceNotFound raise is also added to fix a logic error in `_get_ti()` caught by Mypy.
   
   Fix #20384.


-- 
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] uranusjr merged pull request #20737: Rewrite DAG run retrieval in task command

Posted by GitBox <gi...@apache.org>.
uranusjr merged pull request #20737:
URL: https://github.com/apache/airflow/pull/20737


   


-- 
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] github-actions[bot] commented on pull request #20737: Rewrite DAG run retrieval in task command

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #20737:
URL: https://github.com/apache/airflow/pull/20737#issuecomment-1007484229


   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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] uranusjr merged pull request #20737: Rewrite DAG run retrieval in task command

Posted by GitBox <gi...@apache.org>.
uranusjr merged pull request #20737:
URL: https://github.com/apache/airflow/pull/20737


   


-- 
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] github-actions[bot] commented on pull request #20737: Rewrite DAG run retrieval in task command

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #20737:
URL: https://github.com/apache/airflow/pull/20737#issuecomment-1007484229


   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.


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