ferruzzi commented on code in PR #68106:
URL: https://github.com/apache/airflow/pull/68106#discussion_r3456321578


##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -569,63 +548,37 @@ def _handle_request(self, msg: ToTriggerSupervisor, log: 
FilteringBoundLogger, r
             while self.persisted_event_seqs:
                 events_persisted.append(self.persisted_event_seqs.popleft())
 
-            response = messages.TriggerStateSync(
+            sync = messages.TriggerStateSync(
                 to_create=[],
-                to_cancel=self.cancelling_triggers,
+                to_cancel=self.cancelling_triggers.copy(),
                 events_persisted=events_persisted or None,
             )
 
             # Pull out of these dequeues in a thread-safe manner
             while self.creating_triggers:
                 workload = self.creating_triggers.popleft()
-                response.to_create.append(workload)
-            self.running_triggers.update(m.id for m in response.to_create)
-            resp = response
-
-        elif isinstance(msg, GetConnection):
-            resp, dump_opts = handle_get_connection(self.client, msg)
-        elif isinstance(msg, DeleteVariable):
-            resp, dump_opts = handle_delete_variable(self.client, msg)
-        elif isinstance(msg, GetVariable):
-            resp, dump_opts = handle_get_variable(self.client, msg)
-        elif isinstance(msg, GetVariableKeys):
-            resp, dump_opts = handle_get_variable_keys(self.client, msg)
-        elif isinstance(msg, PutVariable):
-            resp, dump_opts = handle_put_variable(self.client, msg)
-        elif isinstance(msg, DeleteXCom):
-            resp, dump_opts = handle_delete_xcom(self.client, msg)
-        elif isinstance(msg, GetXCom):
-            resp, dump_opts = handle_get_xcom(self.client, msg)
-        elif isinstance(msg, SetXCom):
-            resp, dump_opts = handle_set_xcom(self.client, msg)
-        elif isinstance(msg, GetDRCount):
-            resp, dump_opts = handle_get_dr_count(self.client, msg)
-        elif isinstance(msg, GetDagRunState):
-            resp, dump_opts = handle_get_dag_run_state(self.client, msg)
-
-        elif isinstance(msg, GetTICount):
-            resp, dump_opts = handle_get_ti_count(self.client, msg)
-
-        elif isinstance(msg, GetTaskStates):
-            resp, dump_opts = handle_get_task_states(self.client, msg)
-        elif isinstance(msg, GetPreviousTI):
-            resp, dump_opts = handle_get_previous_ti(self.client, msg)
-        elif isinstance(msg, UpdateHITLDetail):
+                sync.to_create.append(workload)
+            self.running_triggers.update(m.id for m in sync.to_create)
+            self.send_msg(sync, request_id=req_id, error=None)
+            return
+
+        if isinstance(msg, UpdateHITLDetail):

Review Comment:
   It looks like ToSupervisor has  `UpdateHITLDetail` and 
`GetHITLDetailResponse` listed, but no handler?   @ashb - what do you think?  
That looks like a bug.  Do we add the handler (combining that one and this one 
into the registry) or remove them from ToSupervisor?  It looks like righ tnow 
we're accepting thm but not actually handling them.



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