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


##########
airflow/models/taskinstance.py:
##########
@@ -715,6 +715,12 @@ def _execute_task(task_instance: TaskInstance | 
TaskInstancePydantic, context: C
             if not task_instance.next_kwargs:
                 task_instance.next_kwargs = {}
             
task_instance.next_kwargs[f"{task_to_execute.__class__.__name__}__sentinel"] = 
_sentinel
+        elif task_instance.next_method == TaskDeferred.TRIGGER_EXIT:
+            raise AirflowException(
+                "Task is resuming from deferral without next_method specified. 
"
+                "You must either set `method_name` when deferring, or use a 
trigger "
+                "that is designed to exit the task."
+            )

Review Comment:
   How is the exception shown to users?



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