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


##########
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:
   I have added log.error as well now



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