seanghaeli commented on code in PR #77465:
URL: https://github.com/apache/airflow/pull/77465#discussion_r4738165047


##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -1475,15 +1475,24 @@ def update_triggers(self, requested_trigger_ids: 
set[int]):
             self.creating_triggers.extend(workloads_to_create)
 
         if cancel_trigger_ids:
-            # Only the DB tells the two cases apart: a gone row means the task 
left the
-            # deferred state (user action), a surviving row means 
assign_unassigned handed
-            # the trigger to a triggerer that is now polling the remote work.
+            # Only the DB tells the cases apart: a gone row means the task 
left the
+            # deferred state (user action), a surviving row with an owner means
+            # assign_unassigned handed the trigger to another triggerer, and a 
surviving
+            # row without an owner means it was paused or unassigned.
             assignments = self.fetch_trigger_assignments(cancel_trigger_ids)
-            if assignments:
+            reassigned = {tid: owner for tid, owner in assignments.items() if 
owner is not None}
+            unassigned = [tid for tid, owner in assignments.items() if owner 
is None]
+            if reassigned:
                 log.info(
                     "Triggers were reassigned to another triggerer, releasing 
them without on_kill",
-                    new_owners=assignments,
+                    new_owners=reassigned,
+                )
+            if unassigned:
+                log.info(
+                    "Triggers were paused or unassigned, releasing them 
without on_kill",
+                    triggers=unassigned,
                 )
+            if assignments:
                 self.releasing_triggers.update(assignments)

Review Comment:
   The supervisor line reads right now, but a second later every pause still 
logs `Trigger reassigned to another triggerer, dropping it without on_kill` 
from the runner, in the triggerer output and in the watcher's own log. Paused 
and reassigned triggers both go through `to_release` with 
`_REASSIGNED_CANCEL_MSG`. Could the unassigned ones get their own cancel 
message so that line says pause too?



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