Separate a transport failure from a missing header while waiting - #20
Merged
Conversation
The reload wait read an unreachable host as a reply carrying no release, so a connection lost mid-wait reported as a config that never reloaded. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the live-URL check’s reload-wait logic so it can distinguish a transport failure (host becomes unreachable during the wait) from a successful HTTP response that simply lacks the X-Blog-Release header, aligning behavior with the existing preflight check.
Changes:
- Adjust
read_releaseto treat curl transport failures as a hard error while waiting for reload. - Emit a clearer failure message when the host becomes unreachable mid-wait, including curl’s stderr output.
Pipefail carries grep's no-match status out of the read, so a reachable host serving no release header reported as a lost connection. 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.
Why
The preflight already distinguishes a transport failure from an HTTP one. The reload wait did not, and it is the same defect one loop further down:
read_releasereturned an empty string whether the host answered without the header or never answered at all, so a connection lost mid-wait reported as a config that never reloaded.That diagnosis then names a dead config watcher and a restart as the remedy, for a host that is simply unreachable.
Verification
Reproduced by starting a container, letting the preflight pass, and killing it during the wait:
A reply carrying no
X-Blog-Releasestill reads as "no release" rather than as a transport failure, which is the distinction that matters: one means the config never reloaded, the other means nothing was measured.All three environments pass afterwards, including the live staging site behind the auth gate:
1245 URLs honoredon each.🤖 Generated with Claude Code