Skip to content

chore(container-runner): default stop grace to 10s - #5533

Merged
abcxff merged 3 commits into
mainfrom
stack/chore-container-runner-default-stop-grace-to-10s-xnpvnuup
Aug 11, 2026
Merged

chore(container-runner): default stop grace to 10s#5533
abcxff merged 3 commits into
mainfrom
stack/chore-container-runner-default-stop-grace-to-10s-xnpvnuup

Conversation

@abcxff

@abcxff abcxff commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@claude

claude Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@-

@abcxff
abcxff force-pushed the stack/fix-rivetkit-log-and-surface-actor-startup-failures-wyxwxpum branch from f63600c to efaf873 Compare July 31, 2026 05:27
@abcxff
abcxff force-pushed the stack/chore-container-runner-default-stop-grace-to-10s-xnpvnuup branch from c142ce3 to 4a79659 Compare July 31, 2026 05:27
@abcxff
abcxff force-pushed the stack/chore-container-runner-default-stop-grace-to-10s-xnpvnuup branch from 4a79659 to 395bd37 Compare July 31, 2026 06:03
@abcxff
abcxff force-pushed the stack/fix-rivetkit-log-and-surface-actor-startup-failures-wyxwxpum branch from efaf873 to 11b03c3 Compare July 31, 2026 06:03
@abcxff
abcxff force-pushed the stack/fix-rivetkit-log-and-surface-actor-startup-failures-wyxwxpum branch from 11b03c3 to cb11619 Compare August 3, 2026 20:17
@abcxff
abcxff force-pushed the stack/chore-container-runner-default-stop-grace-to-10s-xnpvnuup branch from 395bd37 to 949ddff Compare August 3, 2026 20:17
@abcxff
abcxff force-pushed the stack/chore-container-runner-default-stop-grace-to-10s-xnpvnuup branch from 949ddff to ea1de83 Compare August 10, 2026 17:16
@abcxff
abcxff force-pushed the stack/chore-container-runner-default-stop-grace-to-10s-xnpvnuup branch 2 times, most recently from 688589a to 2dc2e02 Compare August 10, 2026 20:35
@abcxff
abcxff force-pushed the stack/fix-rivetkit-log-and-surface-actor-startup-failures-wyxwxpum branch from 018143b to 2899a10 Compare August 10, 2026 20:35
@claude

claude Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review

Small, well-scoped change: lowers the default stop_grace_secs from 25s to 10s and generalizes doc comments away from Cloud-Run-specific wording to platform-agnostic language (container-runner/src/main.rs, container-runner/src/child.rs). No logic changes beyond the default value.

Verified consistency:

  • effective_stop_grace() (main.rs:161) takes min(stop_grace, signal_child_stop_grace()) on signal-initiated shutdown, where signal_child_stop_grace() is 40% of the 10s SIGTERM_BUDGET default (4s). The signal-shutdown path is unaffected by this change since 4s was already the binding constraint and remains so at 4 < 10.
  • The engine-initiated stop path (actor.rs:151, child.stop(cfg.stop_grace)) now waits up to 10s instead of 25s before SIGKILL, which is the actual behavioral change from this PR.
  • sleep_grace_period (main.rs:314) is derived as stop_grace + 10s, so it drops from 35s to 20s as a side effect. Worth double-checking this stays comfortably above real-world shutdown time for the game-server processes this runner hosts, since core aborts on_destroy mid-stop if this deadline is too short (per the comment above it).
  • No stale 25 references remain in container-runner/ source itself.

Still out of sync (unchanged since last review):

  • docs/content/docs/container-runner.mdx:81 (Configuration table, --stop-grace-secs row) still documents the default as 25 (| \--stop-grace-secs` | `RIVET_STOP_GRACE_SECS` | `25` | ... |`). This is the public-facing docs page for this flag and will actively mislead users about the runner's out-of-the-box SIGTERM-to-SIGKILL grace.
  • container-runner/examples/unity-demo/Dockerfile:32 still has a comment stating (default 25).

Both should be updated to 10 in this PR — see the docs-sync reference (.claude/reference/docs-sync.md) for the general rule on keeping this table current alongside code defaults.

No other bugs, security, or test coverage concerns. This is otherwise a config-default/comment change with no new logic paths, and no new tests are needed for a default-value tweak like this.

@abcxff
abcxff force-pushed the stack/fix-rivetkit-log-and-surface-actor-startup-failures-wyxwxpum branch from 2899a10 to e5d0c23 Compare August 10, 2026 22:09
@abcxff
abcxff force-pushed the stack/chore-container-runner-default-stop-grace-to-10s-xnpvnuup branch from 2dc2e02 to 85d3a2f Compare August 10, 2026 22:09
@abcxff
abcxff force-pushed the stack/fix-rivetkit-log-and-surface-actor-startup-failures-wyxwxpum branch from e5d0c23 to 7e2fcbd Compare August 11, 2026 13:39
@abcxff
abcxff force-pushed the stack/chore-container-runner-default-stop-grace-to-10s-xnpvnuup branch from 85d3a2f to 48b59b1 Compare August 11, 2026 13:39
@abcxff
abcxff force-pushed the stack/fix-rivetkit-log-and-surface-actor-startup-failures-wyxwxpum branch from 7e2fcbd to 82030ba Compare August 11, 2026 14:24
@abcxff
abcxff force-pushed the stack/chore-container-runner-default-stop-grace-to-10s-xnpvnuup branch from 48b59b1 to eb4decd Compare August 11, 2026 14:24
@abcxff
abcxff force-pushed the stack/chore-container-runner-default-stop-grace-to-10s-xnpvnuup branch from eb4decd to e0d5427 Compare August 11, 2026 17:22
@abcxff
abcxff force-pushed the stack/fix-rivetkit-log-and-surface-actor-startup-failures-wyxwxpum branch from 82030ba to d0770c7 Compare August 11, 2026 17:22
@abcxff
abcxff changed the base branch from stack/fix-rivetkit-log-and-surface-actor-startup-failures-wyxwxpum to main August 11, 2026 17:23
@abcxff
abcxff merged commit e0d5427 into main Aug 11, 2026
2 of 7 checks passed
@abcxff
abcxff deleted the stack/chore-container-runner-default-stop-grace-to-10s-xnpvnuup branch August 11, 2026 17:24
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.

1 participant