uranusjr commented on code in PR #55068:
URL: https://github.com/apache/airflow/pull/55068#discussion_r2468365825


##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -915,6 +943,15 @@ async def init_comms(self):
             raise RuntimeError(f"Required first message to be a 
messages.StartTriggerer, it was {msg}")
 
     async def create_triggers(self):
+        def create_runtime_ti(dag: dict) -> RuntimeTaskInstance:
+            task = SerializedDAG.from_dict(dag).get_task(workload.ti.task_id)
+
+            # I need to recreate a TaskInstance from task_runner before 
invoking get_template_context (airflow.executors.workloads.TaskInstance)
+            return RuntimeTaskInstance.model_construct(
+                **workload.ti.model_dump(exclude_unset=True),
+                task=task,
+            )

Review Comment:
   This does not looks right, RuntimeTaskInstance needs a real task 
(BaseOperator subclass), not a serialised task.



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

Reply via email to