ashb commented on code in PR #48239:
URL: https://github.com/apache/airflow/pull/48239#discussion_r2012259631
##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -536,6 +601,21 @@ def get_logger(trigger_id: int) -> WrappedLogger:
@classmethod
def run_in_process(cls):
+ from airflow.sdk.execution_time import task_runner
+
+ # Parse DAG file, send JSON back up!
+ comms_decoder = task_runner.CommsDecoder[ToTriggerRunner,
ToTriggerSupervisor](
+ input=sys.stdin,
+ decoder=TypeAdapter[ToTriggerRunner](ToTriggerRunner),
+ )
+
+ msg = comms_decoder.get_message()
+ if not isinstance(msg, messages.StartTriggerer):
+ raise RuntimeError(f"Required first message to be a
messages.StartTriggerer, it was {msg}")
Review Comment:
This feels like the wrong place to do this tbh -- can this be handled inside
one of `TriggerRunner().run()` instead please?
--
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]