jscheffl opened a new pull request, #60086: URL: https://github.com/apache/airflow/pull/60086
While we had a patch in Edge for Airflow 2 by @majorosdonat in PR https://github.com/apache/airflow/pull/43927 I noticed while attempting to implement a better event loop in Edge that the CTRL-C handling was not proper in Airflow 3. In order not to delay a fix, this PR changes accordingly like the previous PR the same behavior in Airflow 3: If in the console via CTRL-C or via `kill $EDGE_WORKER_PID` an interrupt is send to the worker, the signal is not sent to child processes (which kills the task execution) but gracefully shuts down the worker - waiting to complete pending jobs w/o picking new ones. This is preventing the (currnent) effect that tasks are just killed leaving them in failed state as well as also allows a graceful shutdown in case of a rolling release. I am not sure why the same method that was applied in Airflow 2 is not working in Airflow 3 (probably because of supervisor handling...) but via `os.setpgrp()`is is working. Also fixed the way hiw the killing via SIGTERM is handled, it was formerly sending the SIGTERM to the process group (not the process) and using the PID and not the needed PGID... but this would have an endless loop of signalling to the worker itself. So fixing this as well. -- 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]
