Repository navigation
Conversation
viiccwen
force-pushed
the
fix-go-sdk-sigterm-shutdown
branch
2 times, most recently
from
July 16, 2026 11:25
7de54c1 to
c64e58a
Compare
Container runtimes and service managers use SIGTERM for normal shutdown. Ignoring it or waiting for an Edge API heartbeat can exhaust the shutdown grace period, bypass task draining, and prevent a second termination signal from taking effect. Signed-off-by: viiccwen <vicwen@apache.org>
viiccwen
force-pushed
the
fix-go-sdk-sigterm-shutdown
branch
from
July 16, 2026 11:35
c64e58a to
0bff3ec
Compare
Contributor
Author
|
@jason810496 politely tag for further review. |
jason810496
reviewed
Aug 20, 2026
jason810496
left a comment
Member
There was a problem hiding this comment.
Sorry, as #71874 was merged. We don't need this PR any more. Thanks for your contribution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Handle
SIGTERMthrough the same graceful drain path as the first interrupt received by a Go SDK Edge Worker.The worker registered
SIGTERMwithsignal.Notify, which replaced the signal's default termination behavior, but its signal switch did not handleSIGTERM. Container runtimes and service managers could therefore leave the worker running until escalating to a forced kill, bypassing task draining and normal lifecycle cleanup.Separate OS signal registration from the core worker loop so tests can inject a signal channel without signaling the test process. Stop signal delivery when the wrapper exits, and route both
SIGINTandSIGTERMthrough the existing drain behavior.Add a regression test that injects
SIGTERMand uses a test Edge API server to verify the worker reports anidleheartbeat followed byofflineas it drains. The test also verifies the path repeatedly without installing process-wide signal handlers.Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.