ci: harden Kurtosis install against API rate limits - #1175
Conversation
Resolve the latest Kurtosis tag from the github.com release redirect instead of api.github.com. The REST API allows 60 unauthenticated requests per hour per IP, and the shared runner egress IPs exhaust it, which returned no tag_name and left KURTOSIS_VERSION empty. Nothing stopped the empty value propagating: the step ran without pipefail so the grep/sed pipeline exited 0, and curl without -f wrote the 9-byte error page to kurtosis.tar.gz. The job then failed in tar with "not in gzip format", pointing at the archive rather than the version lookup. Add set -euo pipefail, an explicit version guard, -f on both transfers, and retries, so a future lookup failure aborts where it happens with a message that names the cause.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #1175 +/- ##
=========================================
Coverage 62.70% 62.70%
=========================================
Files 161 161
Lines 27000 27000
=========================================
Hits 16930 16930
Misses 10070 10070
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@claude, please take a look |
|
Claude finished @shane-moore's task in 58s —— View job Review: PR #1175 — harden Kurtosis install
The diagnosis is precise and the fix matches it. The root cause (unauthenticated What holds up:
Minor observations (non-blocking):
The change is CI-only, correctly scoped to a single step, and the validation (local run resolving LGTM. |
|
Queued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 29 minutes 7 seconds in the queue, including 27 minutes 8 seconds running CI. Required conditions to merge
|
Problem, Evidence, and Context
run-local-testnetfails intermittently inInstall Kurtosis, unrelated to the PR under test. Six occurrences since 2026-06-10: runs30252125901,29434838333,29431334751,29353107664,29017436052,27312016351. That is 5% of the 117 workflow runs in that window and 27% of its failures.Installing Kurtosis version:with an empty value, a 9-byte download, thengzip: stdin: not in gzip format.api.github.comcall, capped at 60 requests/hour per IP. The shared runner egress IPs exhaust it, so the response carries notag_name.pipefail, sogrepfinding nothing still exited 0 throughsed;curlwithout-fthen wrote the error page tokurtosis.tar.gz.tarwas the first command to object, which is why the failure reads as a corrupt archive rather than a failed version lookup.b7a3f429on fix(ssv_types): cap Role::Proposer QBFT rounds at 2 #1173 failed at 09:00 and 09:07, then passed unchanged on re-run. Same tree, opposite results.Change Overview
github.com/releases/latestredirect instead ofapi.github.com. This is the host the tarball already downloads from, and it is not behind the REST API's unauthenticated quota.set -euo pipefail, an explicit guard rejecting an empty or unparsed version,-fon both transfers, and--retry 3 --retry-all-errors.permissions:is required, and no new tooling (gh,jq) is assumed on the warp runner image.Risks, Trade-offs, and Mitigations
api.github.comreturnsx-ratelimit-limit: 60, whilegithub.com/.../releases/latestreturns a302carrying the tag inlocationand nox-ratelimit-*headers at all. The new path therefore does not consume the REST quota. Retries and fail-fast cover any residual transient failure.Validation
1.20.0, downloadskurtosis-cli_1.20.0_linux_amd64.tar.gz, extracts a validELF 64-bit LSB executable, x86-64binary.api.github.comreturns and what the last passing CI run installed (1.20.0).1.20.0passes.-fnow catches a bad asset URL at the download with a real HTTP 404 rather than feeding 9 bytes totar.shellcheckclean on the extracted script.actionlintreports only the two pre-existingwarp-ubuntu-latest-x64-16xrunner-label warnings, which are present on the unmodified base file.pull_request, so the updated step executes on this PR itself. On run30295263760,Install Kurtosispassed with the new code, and the job went on to completeStart Local Testnet with Assertoor, which shells out tokurtosis clean -aandkurtosis runand therefore exercises the installed binary rather than just the download.Rollback
Additional Info / Next Steps
Start Local Testnet with Assertoor,Return Assertoor Test Result) are separate and not addressed here.