dstandish commented on code in PR #38563:
URL: https://github.com/apache/airflow/pull/38563#discussion_r1552424445


##########
airflow/cli/commands/task_command.py:
##########
@@ -278,7 +279,15 @@ def _run_task_by_local_task_job(args, ti: TaskInstance | 
TaskInstancePydantic) -
         external_executor_id=_extract_external_executor_id(args),
     )
     try:
-        ret = run_job(job=job_runner.job, execute_callable=job_runner._execute)
+        # If internal API is used, we must pass session=None so that one is 
not created
+        # by the provide_session decorator.  All downstream functions that 
actually use
+        # a session are already set up for RPC
+        # todo: perhaps instead we should simply modify the provide_session 
decorator
+        # to *not* provide a session when using internal API

Review Comment:
   @uranusjr thoughts?



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to