fix(yq): download the 64-bit binary on x86_64 - #1170
Merged
Conversation
The yq download mapped `x86_64: 386` on every platform, which was there from the tool's original commit (#655) and looks like an oversight rather than a choice — yq publishes amd64 for linux, darwin and windows at every version, including this definition's own `known_good_version`. Two consequences today: - **Linux x86_64** silently gets `yq_linux_386`, a 32-bit binary. It runs on hosts with ia32 emulation, so this has gone unnoticed, but a host built without `CONFIG_IA32_EMULATION` cannot exec it and the install fails at the health check with a bare `Process failure` on `yq --version` (the underlying error is `exec format error`). - **macOS x86_64** points at `yq_darwin_386`, which yq has never published — so an Intel Mac 404s and cannot install yq at all. Verified on linux x86_64 that both `4.53.3` and the `known_good_version` `4.44.1` now install, pass the health check, and evaluate: ELF 64-bit LSB executable, x86-64 yq (https://github.com/mikefarah/yq/) version v4.53.3 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
😎 Merged successfully via direct-to-queue (branch protection was bypassed for this merge) - details. |
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.
The
yqdownload mapsx86_64: 386on every platform. That has been there since the tool's original commit (#655) and reads as an oversight rather than a choice:x86_64andarm_64are the only cpu tokens a download can key on, so nothing was ever selecting386deliberately, and yq publishesamd64for linux, darwin and windows at every version — including this definition's ownknown_good_version.Two consequences today:
Linux x86_64 silently gets
yq_linux_386, a 32-bit binary. It runs on hosts with ia32 emulation, which is why this has gone unnoticed for ~18 months, but a host built withoutCONFIG_IA32_EMULATIONcannot exec it. The failure is opaque — the install dies at the health check with a bare process failure onyq --version:Running it by hand is what points at the cause:
exec format error, andfilereportsELF 32-bit LSB executable, Intel 80386.macOS x86_64 points at
yq_darwin_386, which yq has never published. I checked v4.20.2, v4.40.5, v4.44.1 and v4.53.3 — every one shipsyq_darwin_amd64and nodarwin_386— so an Intel Mac 404s and cannot installyqthrough this plugin at all.The windows entry has the same mapping.
yq_windows_386.exedoes exist, so it "works", but it is 32-bit for the same non-reason; fixed alongside.Verification
On linux x86_64, against a local plugin source carrying this file, both the requested version and the
known_good_versioninstall, pass the health check, and evaluate:trunk tools install yqsucceeds for4.53.3and4.44.1; before the change,4.53.3failed the health check on that host.Alternatives considered
386download entry for genuine 32-bit hosts. Nothing to key it on — trunk exposes no i386 cpu token — so there is no reachable case to serve..tar.gzassets (as the original commit did, before ec0900b moved to the bare binary). Out of scope; the bare-binary form works and changing it would touch the shim/extraction path for no benefit here.No test changes:
tools/yq/yq.test.tsis atoolInstallTestat theknown_good_version, which is exactly the path this fixes, and it stays green.🤖 Generated with Claude Code