uranusjr commented on code in PR #50825:
URL: https://github.com/apache/airflow/pull/50825#discussion_r2101420542
##########
airflow-core/src/airflow/cli/commands/task_command.py:
##########
@@ -193,7 +194,10 @@ def _get_ti(
f"run_id or logical_date of {logical_date_or_run_id!r} not
found"
)
# TODO: Validate map_index is in range?
- ti = TaskInstance(task, run_id=dag_run.run_id, map_index=map_index)
+ dag_version = DagVersion.get_latest_version(dag.dag_id,
session=session)
Review Comment:
Can this ever return None in a real world?
##########
airflow-core/src/airflow/cli/commands/task_command.py:
##########
@@ -193,7 +194,10 @@ def _get_ti(
f"run_id or logical_date of {logical_date_or_run_id!r} not
found"
)
# TODO: Validate map_index is in range?
- ti = TaskInstance(task, run_id=dag_run.run_id, map_index=map_index)
+ dag_version = DagVersion.get_latest_version(dag.dag_id,
session=session)
Review Comment:
Can this ever return None in a real Airflow deployment?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]