Server ignores SIGTERM, so every container stop waits 10s and ends in SIGKILL #81

Merged
Breadway merged 2 commits from fix/bb-91-sigterm into main 2026-10-08 19:54:27 +08:00
Owner

Handle SIGTERM alongside Ctrl-C so container shutdown starts promptly. Signal active SSE responses to close, allowing graceful shutdown to finish with connected clients.

Verified with cargo build --workspace, cargo test --workspace, cargo clippy --workspace --all-targets -- -D warnings, and cargo run -p xtask -- check-docs. cargo fmt --all -- --check reports existing formatting drift in untouched files.

Closes #78

Handle SIGTERM alongside Ctrl-C so container shutdown starts promptly. Signal active SSE responses to close, allowing graceful shutdown to finish with connected clients. Verified with `cargo build --workspace`, `cargo test --workspace`, `cargo clippy --workspace --all-targets -- -D warnings`, and `cargo run -p xtask -- check-docs`. `cargo fmt --all -- --check` reports existing formatting drift in untouched files. Closes #78
fix(server): handle SIGTERM during shutdown
Some checks failed
check / check (push) Failing after 2m42s
26c7e09d35
Author
Owner

Implementation is available in PR #81 at 26c7e09d35108b3c602da26907151636aa7569fd. Local verification passed: workspace build, tests, Clippy, check-docs, and diff-check. Exact-head CI is pending and waiting to run; if it fails, move this card back to TODO.

Implementation is available in PR #81 at `26c7e09d35108b3c602da26907151636aa7569fd`. Local verification passed: workspace build, tests, Clippy, check-docs, and diff-check. Exact-head CI is pending and waiting to run; if it fails, move this card back to TODO.
Author
Owner

Not merged in this review pass. #82 (authenticate /events) and #79 (close SSE on broadcast lag) both edit the same events handler and are now merged, so this branch conflicts in crates/breadboard-server/src/http.rs. Additionally, the new tests/shutdown.rs opens /events without credentials and asserts success; after #82 that request returns 401, so the test also needs auth (e.g. a bearer header or the session cookie). Rebase on main, send auth in the SSE request, and this is good to merge.

Not merged in this review pass. #82 (authenticate /events) and #79 (close SSE on broadcast lag) both edit the same `events` handler and are now merged, so this branch conflicts in `crates/breadboard-server/src/http.rs`. Additionally, the new `tests/shutdown.rs` opens `/events` without credentials and asserts success; after #82 that request returns 401, so the test also needs auth (e.g. a bearer header or the session cookie). Rebase on main, send auth in the SSE request, and this is good to merge.
Breadway force-pushed fix/bb-91-sigterm from 26c7e09d35
Some checks failed
check / check (push) Failing after 2m42s
to 707b758588
All checks were successful
check / check (push) Successful in 1m17s
2026-10-08 19:46:11 +08:00
Compare
Breadway deleted branch fix/bb-91-sigterm 2026-10-08 19:54:27 +08:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/breadboard!81
No description provided.