Copilot commented on code in PR #64563:
URL: https://github.com/apache/airflow/pull/64563#discussion_r3066484213


##########
task-sdk/src/airflow/sdk/bases/decorator.py:
##########
@@ -516,6 +517,7 @@ def __call__(self, *args: FParams.args, **kwargs: 
FParams.kwargs) -> XComArg:
         op.is_setup = self.is_setup
         op.is_teardown = self.is_teardown
         op.on_failure_fail_dagrun = on_failure_fail_dagrun
+        op.returns_dag_result = self.returns_dag_result

Review Comment:
   `returns_dag_result` is only applied in the direct-call path (`__call__`), 
but not when tasks are created via dynamic task mapping 
(`expand`/`expand_kwargs`). That means `@result` (or any future use of 
`_TaskDecorator.returns_dag_result`) will silently not mark mapped tasks as 
returning the DAG result. Consider propagating this flag through the 
mapped-operator path as well (e.g., set it on the mapped operator and/or 
include it in the partial/unmap kwargs so the instantiated operator carries the 
flag).



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