KyleJamesWalker commented on code in PR #65351:
URL: https://github.com/apache/airflow/pull/65351#discussion_r3101823797
##########
task-sdk/src/airflow/sdk/definitions/dag.py:
##########
@@ -1473,9 +1479,11 @@ def _run_task(
ti.task = create_scheduler_operator(taskrun_result.ti.task)
if ti.state == TaskInstanceState.DEFERRED and isinstance(msg,
DeferTask) and run_triggerer:
- # API Server expects the task instance to be in QUEUED state
before
- # resuming from deferral.
- ti.set_state(TaskInstanceState.QUEUED)
+ # API Server expects the task instance to be in QUEUED state
+ # before resuming from deferral (same cross-thread visibility
+ # concern as above).
+ with create_session(scoped=False) as session:
+ ti.set_state(TaskInstanceState.QUEUED, session=session)
Review Comment:
Thanks, I'll take a look a bit more into this. At least for now the
monkeypatching for debugging is working for our case. 😃
--
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]