jedcunningham commented on code in PR #46703:
URL: https://github.com/apache/airflow/pull/46703#discussion_r1992589195
##########
task_sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -92,6 +93,7 @@ class RuntimeTaskInstance(TaskInstance):
model_config = ConfigDict(arbitrary_types_allowed=True)
task: BaseOperator
+ dag_version_id: uuid.UUID
Review Comment:
Same with these in task_sdk?
##########
airflow/api_fastapi/execution_api/datamodels/taskinstance.py:
##########
@@ -203,7 +203,7 @@ class TaskInstance(StrictBaseModel):
"""Schema for TaskInstance model with minimal required fields needed for
Runtime."""
id: uuid.UUID
-
+ dag_version_id: uuid.UUID
Review Comment:
Do we need this during runtime though? Not seeing where it is used.
##########
airflow/cli/commands/remote_commands/task_command.py:
##########
@@ -211,7 +212,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)
+ if TYPE_CHECKING:
+ assert dag_version
+ ti = TaskInstance(task, run_id=dag_run.run_id, map_index=map_index,
dag_version_id=dag_version.id)
Review Comment:
Or, maybe TI init can handle this for folks?
--
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]