Repository navigation
Fix Linux install one-liner and first-rollout root cause noise - #580
Merged
Merged
Conversation
Use bash <(curl ...) for the installer: the script is larger than the 128 KB Linux argv limit, so bash -c "$(curl ...)" fails there. A brand-new (or deleted and recreated) Deployment is no longer blamed as a rollout for a crash whose errors describe a refused connection. The incident detail drops the deletion of the workload's own earlier incarnation and the visibility caveat when a workload that never worked has a crash log that already says why.
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.
Three fixes, one PR.
1. Install one-liner fails on Linux
The installer (~348 KB) is larger than Linux's 128 KB single-argument limit (MAX_ARG_STRLEN), so
/bin/bash -c "$(curl -fsSL https://kwatch.dev/kwatch.sh)"fails with "Argument list too long". kwatch.sh reads its menu keys from stdin (read -rsn1, not/dev/tty), which rules outcurl | bash. The new form is:It works in bash and zsh on Linux and macOS, and the TTY stays interactive. Updated: README.md (2 places) and docs/release-notes/v1.0.0.md.
These kwatch.dev files still use the old one-liner and are not edited here:
2. Root cause blamed a first rollout instead of the crash log
In the
rolloutrow, creation counts as a change. A brand-newpayments-apithat crashed with "FATAL: connection refused: postgres://db:5432" was therefore reported as "rolled out a change shortly before". The connection error class now rules out (vetoes) a Deployment, StatefulSet or DaemonSet whose only change in the window is its creation, including a delete followed by an immediate recreate. A real template change is still blamed as before. I didn't drop creation from the row altogether because that would weaken other scenarios (the scenario ratchet flaggedconfig-run-as-non-root-rejected).Tests are in
internal/rootcause/explain/new_deployment_log_test.go: a new deployment, a recreated deployment, and a changed deployment (still blamed).3. Noisy incident-detail lines for a recreated workload
Repro:
kubectl delete deployment checkout-api, thencreateagain, crashing with "dial tcp ... connection refused".Tests are in
internal/notification/compose/never_worked_test.go.Not fixed, for follow-up: the caveat said "can't see nodes" even though the same alert said "Checked: node node01 is healthy". These are two different sources. The caveat comes from
Source.Verifiable: the informer has not synced, or access was lost after a watch error. The "Checked" line comes from inventory relations. The chart RBAC does grant nodes, configmaps and serviceaccounts, so this looks like a transient sync or access-lost state on Killercoda. I couldn't reproduce it without a cluster, so it isn't changed here.Checks
make verifypasses locally.make ci(licensetest, actionlint, ShellCheck) and the e2e run.