ashb commented on code in PR #44427:
URL: https://github.com/apache/airflow/pull/44427#discussion_r1861040423


##########
task_sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -37,9 +37,9 @@
 
 
 class RuntimeTaskInstance(TaskInstance):
-    model_config = ConfigDict(arbitrary_types_allowed=True)
+    model_config = ConfigDict(arbitrary_types_allowed=True, defer_build=True)
 
-    task: BaseOperator
+    task: Annotated[BaseOperator, SkipValidation]

Review Comment:
   Yeah actually, both of these can go, `.model_construct()` alone is enough 
(as it skips all validation).
   
   For the record, the error without it is:
   
   > pydantic.errors.PydanticUserError: `RuntimeTaskInstance` is not fully 
defined; you should define `TaskGroup`, then call 
`RuntimeTaskInstance.model_rebuild()`.



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