docs: explain /tmp fallback in wait_readyz.sh - #326
Conversation
The script requires bash (shebang, set -euo pipefail, $SECONDS, (( )), [[ ]]), so the shell dialect isn't what motivates overriding the path — the filesystem is. Point the comment at that instead. Also restore the newline at end of file, which was dropped in the previous commit and would otherwise mark every future diff of this file.
|
Thanks for this — the fallback path genuinely deserved a comment, and you're right that it was surprising without one. I've pushed two small tweaks to your branch (you had maintainer edits enabled) rather than sending you round again, since the second one is our fault rather than yours: 1. Reworded the comment. This is on our issue text, not on you — #297 described the problem as "a non-POSIX system", so following it was the right call. It's just not quite what bites people here: the script already requires bash ( # Timing lands in /tmp by default, which suits CI and Docker. Set
# STATEWAVE_COLD_TIMING_FILE to write elsewhere — e.g. where /tmp is
# missing or read-only, or to keep the value as a build artifact.2. Restored the trailing newline. The branch had dropped the final newline on Both are cosmetic; your change is the substance, and the diff is now comment-only. Merging it now. Thanks again for the steady stream of fixes — they're genuinely useful, and this one closes #297. |
Closes #297
Description
scripts/wait_readyz.shwrites cold-start timing data to${STATEWAVE_COLD_TIMING_FILE:-/tmp/statewave_cold_ready_seconds}with no comment explaining the fallback path. This PR adds a short explanatory comment above that line so a contributor running the script standalone (e.g. on a non-POSIX system) understands why/tmpis used by default and knows to override it viaSTATEWAVE_COLD_TIMING_FILE. No behavior or logic changes — comment only.Related Issue
Closes #297
Type of Change
Changes Made
printfon line 19 ofscripts/wait_readyz.sh, explaining the/tmpdefault and theSTATEWAVE_COLD_TIMING_FILEoverrideTesting
Test Commands Run
Checklist
Screenshots / Recordings
Additional Notes
No behavior change — verified by running the script manually against a live
/readyzendpoint (see command above), which returnedreadyz: status=ready in 1sas expected.