turbaszek commented on a change in pull request #9631:
URL: https://github.com/apache/airflow/pull/9631#discussion_r454884005



##########
File path: airflow/models/taskinstance.py
##########
@@ -1132,7 +1133,8 @@ def signal_handler(signum, frame):  # pylint: 
disable=unused-argument
         self._run_execute_callback(context, task)
 
         # Execute the task
-        result = self._execute_task(context, task_copy)
+        with set_current_context(context):

Review comment:
       > Since it is used only functional DAG, why are we making changes to 
task instanace?
   
   Not sure about this question. We make changes in ti because that's where the 
logic persists. Also we have to remember that the "functiona approach" is not 
only about `@task` decorator. It includes the `.output` attribute of 
`BaseOperator` and as discussed previously once the AIP-31 is fully implemented 
we should consider rewriting our documentation to encourage people to use 
`my_task.output` instead of `"{{ ti.xcom_pull(...) }}"`




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to