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/10/18 11:04:41 UTC

[GitHub] [airflow] tirkarthi commented on a diff in pull request #27106: Fix warning in airflow tasks test command regarding absence of data_interval

tirkarthi commented on code in PR #27106:
URL: https://github.com/apache/airflow/pull/27106#discussion_r998055964


##########
airflow/cli/commands/task_command.py:
##########
@@ -126,10 +126,12 @@ def _get_dag_run(
         dag_run = DagRun(dag.dag_id, run_id=exec_date_or_run_id, execution_date=dag_run_execution_date)
         return dag_run, True
     elif create_if_necessary == "db":
+        data_interval = dag.infer_automated_data_interval(logical_date=dag_run_execution_date)

Review Comment:
   yes, since `run_type` is not passed here this just calls the same part as underlying code to have same behavior. It's infer_manual_data_interval in tests since they pass run_type as manual. The dagrun is also deleted in the end so I guess it's ok.
   
   https://github.com/apache/airflow/blob/ea55626d79fdbd96b6d5f371883ac1df2a6313ec/airflow/models/dag.py#L2582-L2585



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