jason810496 commented on code in PR #69757:
URL: https://github.com/apache/airflow/pull/69757#discussion_r3628531396
##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -310,6 +332,30 @@ def ti_run(
should_retry=_is_eligible_to_retry(previous_state, ti.try_number,
ti.max_tries),
)
+ # Only set for stub (foreign-runtime) tasks with a captured TaskFlow
arg
+ # spec; the route excludes unset fields, keeping regular responses
lean.
+ if ti.operator == _STUB_TASK_TYPE and (
+ arg_bindings := _get_arg_bindings(dag_bag, ti.dag_version_id,
ti.task_id, session=session)
+ ):
+ try:
+ context.arg_bindings =
get_arg_bindings_adapter().validate_python(arg_bindings)
+ except ValidationError:
+ log.exception(
+ "Serialized arg_bindings spec failed validation",
+ dag_id=ti.dag_id,
+ task_id=ti.task_id,
+ )
+ raise HTTPException(
+ status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
+ detail={
+ "reason": "invalid_arg_bindings",
+ "message": (
+ "The serialized TaskFlow arg spec for this stub
task is not valid on "
+ "this Airflow version; it may come from a newer
providers release."
Review Comment:
```suggestion
"The serialized TaskFlow arg spec for this stub
task is not valid.
```
--
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]