uranusjr commented on code in PR #37542:
URL: https://github.com/apache/airflow/pull/37542#discussion_r1496981611


##########
airflow/cli/commands/task_command.py:
##########
@@ -632,7 +634,22 @@ def task_test(args, dag: DAG | None = None) -> None:
             if args.dry_run:
                 ti.dry_run()
             else:
-                ti.run(ignore_task_deps=True, ignore_ti_state=True, 
test_mode=True)
+                ti.run(ignore_task_deps=True, ignore_ti_state=True, 
test_mode=True, raise_on_defer=True)
+    except TaskDeferred as defer:
+        ti._defer_task(defer=defer, session=session)

Review Comment:
   We can probably rename this to `defer_task` and mark it with `:meta 
private:`.



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