Repository navigation
fix(soak): churn.sh explicit --context, pre-flight before T0, abort on first FAILED roll (#951) - #977
Merged
Merged
Conversation
…0, aborts on the first FAILED roll (#951) On 2026-09-26 the churn driver ran 58 minutes with zero rolls: ~/.kube/config had no current-context (kind delete cluster cleared it), every bare `kubectl rollout restart` hit localhost:8080, and the driver logged FAILED per roll and kept its schedule while k6 and the prober made the soak look healthy. - churn.sh: `--context NAME` / SOAK_CONTEXT (default talos-main); every kubectl call goes through `k()` which passes --context. Positional BUILD_LABEL kept. - Pre-flight before the log is touched and before T0: /readyz, every workload the schedule rolls plus the SHRINK target must exist, and `auth can-i patch` each. Any failure prints to stderr and exits 2 with $LOG neither archived nor truncated. `--preflight` runs only the check, for a loud foreground launch. - Fail fast: the first FAILED roll (TRIPLE statuses are now waited per PID), a SHRINK that cannot scale/restore, or an unknown kind logs `CHURN ABORTED` and exits 1; queued RSS samplers are killed and the EXIT trap restores the shrink. - sample-proxy-rss.sh: same --context / SOAK_CONTEXT; churn.sh passes its own. - README "Run": foreground --preflight then detached launch with --context talos-main, head -2 launch check, abort semantics. Log lines (ROLLED, FAILED, RSS SAMPLE, no-roll window, SHRINK, churn driver start T0=, churn driver complete) are unchanged; the context is logged on its own second line so the start line's build= field still runs to end-of-line. Closes #951 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
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.
Closes #951
On 2026-09-26
churn.shran 58 minutes with zero rolls because~/.kube/confighad no current-context (kind delete clustercleared it). Every barekubectl rollout restarthitlocalhost:8080, the driver loggedFAILEDand kept its schedule, and the soak looked healthy from every dashboard.Changes
--context NAME(orSOAK_CONTEXT), defaulttalos-main. Every kubectl call goes throughk(), which passes--context "$CTX". The positionalBUILD_LABELis unchanged.sample-proxy-rss.shgets the same flag, and churn.sh passes its own context to it.get --raw /readyz, then for every workload the schedule rolls (agent/proxy/mesh-dns DaemonSets, aether-edge, svc-1..5) plus the SHRINK target, the object must exist andauth can-i patchmust pass. On any failure it prints to stderr and exits 2.$LOGis neither archived nor truncated and no T0 line is written.--preflightruns only this check, so the launch can be loud in the foreground.FAILEDroll logsCHURN ABORTED: ...and exits 1. The same applies to a SHRINK that cannot read, scale or restore, and to an unknown kind. TRIPLE statuses are now waited per PID, becausewait a b conly returns the last status. On abort, queued RSS samplers are killed and the EXIT trap restores the shrink.--preflight, then the detached launch with--context talos-main, ahead -2launch check, and the abort semantics. It also keeps the note thatkind deleteclears the current-context.Existing log lines (
ROLLED,FAILED,RSS SAMPLE,no-roll window,SHRINK,churn driver start T0=... build=...,churn driver complete) are unchanged. The context goes on its own second line (churn driver context=...), sobuild=still runs to end-of-line. The absolute-pathpgrepguard is kept.Validation
bash -non both scripts.bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //e2e/...is green. To check the gate isn't vacuous, I added an unquoted$1to churn.sh://e2e/soak:soak_shellfailed with SC2086, then passed again after the revert.//:format.checkis clean.SOAK_CHURN_LOGcontaining a sentinel line. It exits 2 and the file's md5 is unchanged (not archived, not truncated)./tmp/soak-churn.logmtime is also unchanged:kubectl/sleepon PATH (no cluster contact):ROLLED, SHRINK begin/done,churn driver complete, exit 0.rollout:FAILED aether-test/deployment/svc-1, thenCHURN ABORTED: roll failed: aether-test/deployment/svc-1 -- stop, fix, relaunch with a fresh T0 (context=fake), exit 1, and no later rolls.Note: the running soak uses the main checkout's copy of churn.sh. Per the README, don't pull this into that checkout until the run ends.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr