Remove startup and wake races from the local E2E script#16
Merged
Conversation
e2e-local intermittently failed on CI: the script slept a fixed 1s after launching fold-control and then read the token files under set -e, so on a slow runner the control plane hadn't written them yet and the run died before the daemons even started. Poll for the token file (up to 30s) instead. Also retry the wake-on-request check for up to 20s: the first request after suspend triggers the restore, and a cold docker restore can outlast a single proxy forward (observed locally ~1 in 2 runs). Verified: make e2e-local passes locally, including the full deploy → curl → scale-to-zero → wake path. Co-Authored-By: Claude Fable 5 <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.
Summary
e2e-localwas flaky on CI (failed on the #12/#15 merges to main, passed on identical code minutes earlier). Two races inscripts/e2e-local.sh:sleep 1after launchingfold-control, thencat $FOLD_HOME/system-tokenunderset -e. On a slow runner the control plane takes >1s to write its token files, so the script died before the daemons started (this is exactly what the failing CI logs show — the "control plane listening" line appears after the cat error). Now polls for the token file for up to 30s.Script logic only — no product code changes.
Testing
make e2e-localpasses locally end-to-end (deploy → curl → scale-to-zero → wake), twice in a row with the fix (was 1-for-2 before).bash -nclean.🤖 Generated with Claude Code