PCTEJA commented on code in PR #77290:
URL: https://github.com/apache/airflow/pull/77290#discussion_r4735010229


##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -961,6 +989,17 @@ def run_context(self) -> Iterator[None]:
         """Wrap the run loop. Subclasses can override to install 
setup/teardown."""
         yield
 
+    def kill(self, *args: Any, **kwargs: Any) -> None:
+        """Terminate the subprocess, then drain pending log uploads."""
+        try:
+            super().kill(*args, **kwargs)
+        finally:
+            # kill() is the last point that services subprocess requests, so a
+            # finished-trigger message can still arrive until it returns. Drain
+            # the pool only once it has, or a late finalize_trigger_log would
+            # submit to a shut-down executor and lose the log.
+            self._log_upload_executor.shutdown(wait=True)

Review Comment:
   Thanks for testing end to end. Fixed: a forced kill now drops queued uploads 
instead of draining them. Pushed: c48e5c0f.
   



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