Repository navigation
fix: install the CLI from its release tarball - #420
Merged
Merged
Conversation
Releases of inference-gateway/cli ship infer-<os>-<arch>.tar.gz holding one infer executable instead of a raw binary from the next release on. The installer downloads the archive, verifies its checksum, extracts it with the system tar into a staging directory beside the binary and renames the executable into place, so a running infer is never written over. Refs inference-gateway/cli#1687
edenreich
added a commit
to inference-gateway/cli
that referenced
this pull request
Nov 3, 2026
## Summary GitHub serves release assets uncompressed, so every install moved the whole executable, about 105MB per platform (80MB after #1686). Each platform now ships as `infer-<os>-<arch>.tar.gz` holding one file, `infer` (`infer.exe` on Windows). `checksums.txt` and its Cosign bundle cover the archives. - `release.yml` archives the artifacts in the release job with GNU tar (`--transform` renames the entry, `--owner=0 --group=0`), checksums the archives and verifies the new asset list. - `release.config.mjs` uploads the archives. - `install.sh`, `install.ps1` and `npm/bin/install.js` download the archive and extract it with the system `tar`, which macOS, Linux and Windows 10+ ship. - `docs/installation.md` and `docs/binary-verification.md` describe the archives. - The container image builds from the workflow's raw artifacts via `--build-context binaries=dist/`, unchanged. The raw `infer-<os>-<arch>` release assets are gone. | | before | after | | --- | --- | --- | | darwin/arm64 asset | 79.4MB raw | 25.9MB `.tar.gz` | ## Affected repos Consumers of the raw asset names outside this repository, found with `gh search code` and a grep of shallow clones: - **inference-gateway/infer-action**: inference-gateway/infer-action#433 downloads the archive and falls back to the raw asset for pinned older versions. - **inference-gateway/desktop**: `backend/src/env.rs` maps the platform to the raw asset name and `backend/src/cli_install.rs` downloads it from `releases/latest/download`, verifies it against `checksums.txt` and renames it into place. inference-gateway/desktop#420 downloads the archive, verifies it and extracts it. Desktop builds already installed keep calling the raw URL, so that desktop release should go out before this merges. - **inference-gateway/opentask** pins the Nix flake and **inference-gateway/docs** only points at `install.sh`. Neither changes. ## Verification - `install.sh` and the npm postinstall run against a local server holding a `.tar.gz` built from this branch's binary and its `checksums.txt`: both install a working `infer`, and a tampered checksum fails the npm install. - The archive step ran under GNU tar 1.35 from nixpkgs: the Linux archive holds `infer`, the Windows one `infer.exe`, both owned by root. - `task precommit:run` passes. Closes #1687
edenreich
marked this pull request as ready for review
November 3, 2026 01:11
Contributor
|
🎉 This PR is included in version 0.53.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
inference-gateway/cli#1688 changes the CLI release assets from raw executables to
infer-<os>-<arch>.tar.gzholding a singleinfer(infer.exeon Windows). The desktop installs and updates the CLI fromreleases/latest/download, so it has to speak the new shape before that release ships, or every installed desktop fails to install or update the CLI.Changes
backend/src/env.rs:asset_namemaps to the.tar.gzasset. The test's private copy of the mapping is gone, the test now covers the real function.backend/src/cli_install.rs: downloads the archive, verifies the archive's checksum againstchecksums.txt, extracts it with the systemtarinto~/.infer/bin/cli-install.tmpand renames the executable into place, the same atomic replace as before. The gateway install already extracts its tarball the same way.README.md: the supported platforms table names the archives.cargo fmt --check,cargo clippy -- -D warningsandcargo testpass.Refs inference-gateway/cli#1687. Release this before inference-gateway/cli#1688 merges.