Skip to content

Conversation

@tpoliaw
Copy link
Collaborator

@tpoliaw tpoliaw commented Nov 13, 2025

When the application is running in a container, it is given PID 1 which
means it does not automatically get given signal handlers and can't be
killed. When running the container in the foreground this stops Ctrl-C
from interrupting it while in kubernetes it means the graceful shutdown
always times out resulting in the container eventually being forcibly
deleted, killing the process.

Adding an explicit handler for the common signals used to interrupt
processes means that Ctrl-C, kubernetes and podman stop all work as
expected.

@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.08%. Comparing base (2800800) to head (6021dbf).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/graphql/mod.rs 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #232      +/-   ##
==========================================
- Coverage   77.52%   77.08%   -0.45%     
==========================================
  Files          13       13              
  Lines        1909     1920      +11     
==========================================
  Hits         1480     1480              
- Misses        429      440      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

When the application is running in a container, it is given PID 1 which
means it does not automatically get given signal handlers and can't be
killed. When running the container in the foreground this stops Ctrl-C
from interrupting it while in kubernetes it means the graceful shutdown
always times out resulting in the container eventually being forcibly
deleted, killing the process.

Adding an explicit handler for the common signals used to interrupt
processes means that Ctrl-C, kubernetes and `podman stop` all work as
expected.
@tpoliaw tpoliaw merged commit 138634e into main Nov 24, 2025
5 of 7 checks passed
@tpoliaw tpoliaw deleted the signal_handler branch November 24, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants