fix(installers): stop silent death in GitHub release resolution and authenticate in CI - #44
Merged
Merged
Conversation
…uthenticate in CI The GitHub-releases fallback assigned LATEST from an unguarded curl|awk pipeline. Under `set -eo pipefail` a failing curl (anonymous requests from shared CI runner IPs are frequently rate-limited) killed the script with zero output — the smoke test then reported "github_release_binary.sh fd install failed:" with an empty log. Guard the pipeline with `|| true` so resolution failure reaches the proper diagnostic (now naming rate limiting as a likely cause), prefer the authenticated API when GITHUB_TOKEN is set, and pass GITHUB_TOKEN to the smoke-test workflow step so CI resolution is deterministic. Fixes #43 Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
…ke test - [[ ]] instead of [ ] and curl --proto '=https' on the new release resolution lines (shelldre:S7688, shell:S6506). - Run the smoke-test installer under bash -x: the failure mode being chased produces zero output, and the xtrace lands in the install log that is only printed on failure. Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
The post-install report ran `command -v "$BINARY_NAME" && (...)` — when BIN_DIR is not on PATH (isolated PREFIX in the CI smoke test) the substitution exits non-zero and set -e kills the script silently after a fully successful install. This, not release resolution, was the actual cause of the empty-log smoke failures (#43); the bash -x trace pinpointed the dying assignment. A PATH lookup is also wrong with multiple installs: it can resolve a different copy than the one just written. Probe "$BIN_DIR/$BINARY_NAME" directly and print it as the path. Reproduced red/green locally with fd off PATH: silent exit 1 with a zero-byte log before, clean success report after. Fixes #43 Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
|
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.



Problem
Smoke Testhas failed onmainsince 2026-07-24 with✗ github_release_binary.sh fd install failed:and an empty log (#43).Root cause, reproduced locally: the GitHub-releases fallback assigns
LATESTfrom an unguardedcurl | awkpipeline. Underset -eo pipefail, a failing curl inside the command substitution kills the whole script with zero output (stderr is already/dev/null'd) — it never reaches the 'Unable to resolve latest version' diagnostic. Anonymous requests from shared runner IPs are frequently rate-limited, which is why it fails in CI and passes locally.fd.jsonhas neitherversion_urlnorgitlab_project, so every fd install traverses this line. The sibling pipelines (lines 57, 64) already carry|| true; this one didn't.Fix
|| trueso failures reach the proper error path (message now names rate limiting).api.github.comlookup whenGITHUB_TOKENis set.GITHUB_TOKENto the smoke-test workflow step.Test plan
PREFIX=tmp github_release_binary.sh fdinstalls a working fd (verified:fd 10.4.2).[fd] Error: Unable to resolve latest version (network failure or GitHub rate limit)instead of an empty log.bash -n+ shellcheck clean (pre-existing SC1091 info only).Fixes #43