Document accepted kill_timeout formats in fly.toml reference - #2465
Draft
alexleventer wants to merge 1 commit into
Draft
Document accepted kill_timeout formats in fly.toml reference#2465alexleventer wants to merge 1 commit into
alexleventer wants to merge 1 commit into
Conversation
The reference only ever showed `kill_timeout = 120` and described it as "(in seconds)", which reads as though the bare-integer form is the only valid one. It isn't: flyctl accepts both an unquoted number of seconds and a quoted Go duration string, and normalizes them identically. Readers (and agents) working from this section were flagging valid configs like `kill_timeout = "30s"` as broken schema. Add a callout with wrong-vs-right examples covering: - both valid forms - `"120"` — a quoted number with no unit is a parse error - `1.5` — a decimal is silently truncated to 0, leaving no grace period Also document the sharper footgun: the `kill_timeout` key inside a `machine_checks` section parses differently from the top-level one. An unquoted `5` there is read as 5 nanoseconds, so that key always needs the quoted, unit-bearing form. Verified against flyctl v0.4.86 via `fly config show --local`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Background
This started from a report that
kill_timeoutis integer-only and that agents keep writingkill_timeout = "30s"as "broken schema."That premise doesn't hold. Verified against flyctl v0.4.86 (
fly config show --local):kill_timeout = 30"30s"✅kill_timeout = "30s""30s"✅kill_timeout = "5m""5m0s"✅kill_timeout = "30"time: invalid duration— missing unitkill_timeout = 0.5"0s"— silently truncatedBoth forms normalize identically. Our own
blueprints/long-running-tasksalready uses"30s".What was actually wrong
kill_timeout = 120, never mentioning the duration-string form — which is how someone reading only this section concludes"30s"is invalid."120"(parse error) and1.5(silently becomes 0 seconds — no grace period at all).kill_timeoutinsidemachine_checksparses differently from the top-level key. An unquoted5there is read as 5 nanoseconds. Two keys, same name, opposite rules.Changes
warning icon, the most prominent class in this repo) directly under the section intro, with a wrong-vs-right TOML block — visible on a skim, not just a targeted search.fly config validate.machine_checks.kill_timeoutnanosecond behavior, in both directions.Not addressed here
Two adjacent factual bugs I left alone since they're out of scope for this change:
reference/configuration.html.markerb:98— the shutdown sequence says it ends with "SIGTERMunconditionally"; that should beSIGKILL.kill_signaldefaults toSIGINT, whileblueprints/long-running-tasks.html.md:180saysSIGTERM. One of them is wrong.🤖 Generated with Claude Code