fix: download release assets without gh CLI - #7
Closed
zheli wants to merge 2 commits into
Closed
Conversation
The self-hosted e2e runner has no GitHub CLI installed, so the 'gh release download' step failed with 'gh: command not found' (exit 127). Since this repo is public, release assets are anonymously downloadable — replace the gh call with direct curl downloads of the deterministic release-download URLs (no gh, no token, no jq). Also: - Scope checksum verification to the three archives we actually fetch (SHA256SUMS lists the .deb too, which we don't download, so a full --check would fail on the missing file). - Add an unzip fail-fast guard before extracting the Windows .zip, since the minimal runner may lack it. Verified locally against the v0.10.1 release: all downloads succeed, checksums verify, and the Windows binary extracts.
The previous test run got past download + checksum verify but failed at 'Lay out per-platform component dirs' with: tar: canton-devkit: Not found in archive The tarball members are prefixed with './' (./canton-devkit, ./LICENSE) while the zip members are not (canton-devkit.exe, LICENSE), so naming individual members in tar/unzip is fragile and broke for the tarballs. Extract the whole archive into a scratch dir and relocate files by basename instead. Verified locally against all three v0.10.1 archives: binary + LICENSE land correctly and the per-platform component.yaml is templated with the right binary path.
Contributor
Author
|
Closing unmerged. We're going with Option A (publish from the canton-devkit repo). The publish workflow this PR fixed is being removed in #8, so this download fix is no longer needed. |
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
The first test run of
publish-oci.ymlfailed at Download release assets:The self-hosted e2e runner (
github-runner-2-e2e) is minimal and has noGitHub CLI installed, so
gh release downloadcan't run there.Fix
Since
homebrew-canton-devkitis public, release assets are anonymouslydownloadable. Replace the
ghcall with directcurldownloads of thedeterministic release-download URLs — no
gh, no token, nojqneeded.Additional adjustments:
SHA256SUMSalso lists the.deb(which we don't fetch), so a fullsha256sum --check SHA256SUMSwould fail on the missing file.unzipfail-fast guard added before extracting the Windows.zip, so amissing
unzipon the runner produces a clear error.Verification
Validated locally against the
v0.10.1release:YAML lint passes.
Runner note: the failed run confirmed the e2e runner is reachable from this
public repo and
GITHUB_TOKENalready hasPackages: write, so the GHCRpublish path is good once the download step is fixed.
Follow-up
unzipis installed on the e2e runner.