ci: inline Alpine node setup to fix flaky linux-musl CI - #5455
Merged
Conversation
The "Initialize Alpine Linux" step piped a network-fetched script (curl raw.githubusercontent.com | sudo bash) straight into a shell. When the fetch was rate-limited or truncated, the partial/error body was executed instead, failing with "syntax error near unexpected token 'newline'". This flaked on almost every push. The step runs before checkout (checkout is a JavaScript action that needs node symlinked first), so the script can't be read from the working tree. Inline it directly into the workflow instead, removing the network dependency entirely. The now-unused setup-node.sh is deleted. Fixes #5408 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5455 +/- ##
==========================================
+ Coverage 74.68% 74.70% +0.01%
==========================================
Files 512 512
Lines 18722 18722
Branches 3660 3660
==========================================
+ Hits 13983 13986 +3
+ Misses 3866 3864 -2
+ Partials 873 872 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jamescrosswell
commented
Jul 28, 2026
jamescrosswell
commented
Jul 28, 2026
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
jpnurmi
approved these changes
Jul 29, 2026
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
The
linux-musl-arm64"Initialize Alpine Linux" step has been failing on almost every push for the last few days (#5408). It piped a network-fetched script straight into a shell:With no
--fail/retry and a raw pipe, a rate-limited or truncated fetch got executed as-is, failing withline 2: syntax error near unexpected token 'newline'. It's non-deterministic — the same script passes and fails on adjacent commits.Detailed explanation
GitHub's Actions runner has a hard limitation: JavaScript actions (like
actions/checkout) inside Alpine containers are only supported on x64 Linux runners. On thelinux-musl-arm64job (Alpine on ARM), the runner normally refuses to run any JS action.Our
build.ymlcontained a workaround that runs beforeCheckout, because checkout is a JS action — it needs the workaround in place first.This downloaded a script (
setup-node.sh) from GitHub's raw CDN and piped it straight intosudo bash. That script contained:The downloading of the script is the bit that frequently fails - the script itself runs fine.
Solution
The solution is to move the logic that the downloaded script would have run directly into our
build.ymlfile... to avoid the flaky download. So the build workflow does exactly the same thing as before, but without a flaky network dependency.Issues
Fixes #5408
#skip-changelog