fix: default BUILD_ARCH to amd64 instead of host architecture#2295
fix: default BUILD_ARCH to amd64 instead of host architecture#2295tomassrnka merged 1 commit intomainfrom
Conversation
PR SummaryLow Risk Overview Updates Docker builds for Written by Cursor Bugbot for commit de68fd0. This will update automatically on new commits. Configure here. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83368c51ef
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
sitole
left a comment
There was a problem hiding this comment.
Just a heads-up: some services don't include multi-arch support (dashboard API, Nomad autoscaler, API, etc). I think they don't need to be necessarily multi-arch as they run on different nodes as orch/build services, but at the same time, the client proxy is also not running on client nodes, and it received multi-arch support.
There was a problem hiding this comment.
LGTM — simple, correct default fix. The inline comment nit is minor and does not affect functionality.
Extended reasoning...
Overview
This PR makes a one-line change in three Makefiles (packages/orchestrator/Makefile, packages/envd/Makefile, packages/client-proxy/Makefile), switching BUILD_ARCH from $(shell go env GOARCH) to a hardcoded amd64 default. No production Go code, CI pipelines, or infrastructure definitions are touched.
Security Risks
None. This is a build-time variable affecting local developer builds and binary cross-compilation targets. There is no security surface here.
Level of Scrutiny
Low. The change is mechanical and the motivation is clear: Apple Silicon Macs were silently producing arm64 binaries that break amd64 cluster deployments. Hardcoding amd64 as the default eliminates this footgun. The ?= assignment means any .env.local or command-line override still works correctly, as confirmed by the test plan.
Other Factors
The sole bug reported is a documentation nit: the comments still read "Defaults to local arch" and show a now-redundant BUILD_ARCH=amd64 example. This is a cosmetic inaccuracy with zero functional impact — the build behavior is correct. Worth fixing in a follow-up, but not a blocker.
45e1b83 to
48c764a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
BUILD_ARCH defaulting to $(shell go env GOARCH) causes Apple Silicon Macs to produce arm64 binaries when deploying to amd64 dev/staging clusters. Default to amd64 since that's the current deployment target. Override with BUILD_ARCH=arm64 for ARM64 builds (in .env.local or on the command line). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
48c764a to
de68fd0
Compare

Summary
Default
BUILD_ARCHtoamd64in all three service Makefiles (orchestrator, envd, client-proxy). Previously defaulted to$(shell go env GOARCH)which produces arm64 binaries on Apple Silicon Macs, breaking deployments to amd64 clusters.Override with
BUILD_ARCH=arm64in.env.localor on the command line for ARM64 builds.Test plan
make build-and-uploadfrom Apple Silicon Mac produces amd64 binariesBUILD_ARCH=arm64 make build-localstill produces arm64 binaries