chore: replace stale node20 actions with inline shell + npx wait-on#11
Open
barnabasbusa wants to merge 2 commits intomasterfrom
Open
chore: replace stale node20 actions with inline shell + npx wait-on#11barnabasbusa wants to merge 2 commits intomasterfrom
barnabasbusa wants to merge 2 commits intomasterfrom
Conversation
Drops the three remaining transitive node20 actions in favor of inline
shell. None of them have node24 releases (the most active fork only
catches up to node20), and the underlying npm tooling they wrap
(jeffbski/wait-on) is actively maintained and works on whatever node
runtime is on the runner.
- tale/kubectl-action -> inline base64 decode of $KUBE_CONFIG_B64 to
$HOME/.kube/config. kubectl is pre-installed on ubuntu-latest, so
there is nothing else to do.
- DamianReeves/write-file-action -> inline `cat > file <<'SCRIPT_EOF'`
heredoc. GitHub still expands ${{ }} expressions inside the heredoc
body, so the substitutions are unchanged; quoted heredoc keeps bash
from expanding the script's own $vars.
- JarvusInnovations/background-action (both call sites) -> nohup +
`npx --yes wait-on@8.0.1` with --timeout/--interval/--verbose. wait-on
is the same npm package background-action wraps internally, so we
keep real wait-on semantics (TCP/file probes, retries, structured
output) without the stale node20 wrapper. On wait-on failure we cat
the captured log so CI shows why the background process never came up.
Co-Authored-By: Claude Opus 4.6 (1M context) <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
Stacked on #10. Drops the 3 remaining transitive node20 actions that have no node24 release upstream. After this and #10, the action's transitive node deps are entirely on node24 (or have no node runtime at all).
Why not just keep waiting for upstream?
I checked. None of these are getting a node24 release any time soon:
JarvusInnovations/background-action— open issues #206, #207, #208 all asking for node24, no response. Last commit to upstream was 2024-04. The two active forks (runlevel5/background-action,riderx/background-action) are still on node20 too — they just sit there.tale/kubectl-action— last release 2024-02, no maintenance activity.DamianReeves/write-file-action— last release 2024-02, no maintenance activity.I also looked at
iFaxity/wait-on-actionandstep-security/wait-on-actionas drop-in replacements for background-action's wait-on logic — both still on node20.What this PR does
tale/kubectl-action(setsKUBECONFIGfrom base64)printf '%s' "$KUBE_CONFIG_B64" | base64 -d > $HOME/.kube/config. kubectl is pre-installed onubuntu-latest. Input passed viaenv:so it can't be shell-injected.DamianReeves/write-file-action(writes log_collector.sh)cat > file <<'SCRIPT_EOF'heredoc. GitHub still expands${{ }}inside the heredoc body, so substitutions are unchanged; quoted heredoc keeps bash from expanding the script's own$vars.JarvusInnovations/background-action(×2: kurtosis gateway + log collector)nohup ... &+disown+npx --yes wait-on@8.0.1.Why
npx wait-oninstead oftimeout 60shell loopYou called this out — fair point. Plain
timeout 60 bash -c 'until nc -z …; do sleep 1; done'is a primitive replacement and loses the polish of background-action.jeffbski/wait-on(the npm package,wait-on@8.0.1released 2025-01) is exactly whatJarvusInnovations/background-actionwraps internally. It's actively maintained, version-pinned, and gives us real semantics:tcp:/file:/http:/https:/socket:probes--timeout,--interval,--delay--verbosefor diagnostic outputPlus on failure we
catthe capturednohuplog so CI shows why the background process didn't come up — same diagnostic value as background-action'slog-output-if: failure,success.Tradeoff:
npx --yes wait-on@8.0.1downloads ~1MB on first invocation per job. Acceptable for our use case (we only hit it on the kubernetes backend path, and the kurtosis testnet boot dominates runtime anyway). Could be cached withactions/setup-node+npm cilater if we want.Net effect
After #10 + this PR,
kurtosis-assertoor-github-actionhas zero transitive node20 deps. Consumers can pin a new release and be done with it.Test plan
kurtosis gatewaycomes up and serves on :9710,log_collector.shis written correctly with substituted${{ }}values, log collector runs and produceslog_collect.txtnpx wait-onexit code is propagated correctly (induce a failure by pointing at a wrong port, confirm the step fails with the captured log)🤖 Generated with Claude Code