Skip to content

Release linux/arm64 for all service agents (multi-arch support) #346

Description

@antoinetoussaint-byte

Summary

The six language service agents ship only darwin/amd64, darwin/arm64, and linux/amd64none has a linux/arm64 build. Multi-arch is a confirmed requirement, so this blocks running Codefly services on any arm64 Linux target (arm64 companion images, arm64 CI runners, arm64 K8s nodes).

All pinned versions ARE released; the gap is purely the missing linux/arm64 platform, and it is identical across every service-* repo — a release-matrix omission, not a per-repo miss.

Why it matters / blast radius

  • Nothing currently published is broken: registry companions are pinned linux/amd64 (cli companions.yaml), Apple Silicon devs run codefly natively as darwin/arm64, CI is amd64.
  • It breaks the moment anything runs services on arm64 Linux. The companion CLI builds/runs services in-container and resolves the matching service-<name> agent for the container arch; on arm64 there is no service-*_linux_arm64.tar.gz, so agent resolution fails at runtime.
  • Live footgun today:codefly companion build/publish on an Apple Silicon Mac defaults to arm64 (dockerArch() → arm64), producing an arm64 companion that cannot run a single language service. CI only avoids it by explicitly passing --platform linux/amd64.

Why it's not a one-line matrix add

The agents require cgo — each links its own tree-sitter grammar (CGO_ENABLED=1 in their goreleaser). A linux/arm64 build therefore needs the aarch64 cross-cgo toolchain (CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++).

Good news — the toolchain is already present. Each service-* release runs under ghcr.io/goreleaser/goreleaser-cross:v1.26.4 (same image the CLI's own release uses to build all four platforms), which already ships aarch64-linux-gnu-gcc. So the fix is a goreleaser-only change; no release-workflow change is needed.

(This is a concrete real-world cost of the cgo surface tracked in #345: if agents were CGO-free, linux/arm64 would be a trivial goarch addition. Cross-linking for that reason.)

Reference change (service-go — copy to each repo, adjusting binary:)

Add after the linux-amd64 build stanza in .goreleaser.yaml, before archives::

 - id: linux-arm64binary: service-go # service-python / service-rust / ... per repoenv:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++goos:
- linuxgoarch:
- arm64

The archivesname_template already emits service-{name}_{version}_{os}_{arch}.tar.gz, so the new asset (..._linux_arm64.tar.gz) matches core's downloader contract automatically — no archive change.

Checklist (add linux/arm64, cut a new release)

  • codefly-dev/service-go (currently v0.0.33)
  • codefly-dev/service-python (v0.0.52)
  • codefly-dev/service-nextjs (v0.0.141)
  • codefly-dev/service-rust (v0.0.29)
  • codefly-dev/service-swift (v0.0.16)
  • codefly-dev/service-generic (v0.0.26)
  • Bump the pins in cli pkg/sourceworkspace/source.go if the versions roll
  • Once agents publish arm64, allow multi-arch companions (drop / broaden the --platform linux/amd64 pin in cli companions.yaml) and consider a CI check that a linux/arm64 companion can resolve every language agent

Verification per repo

After the release, confirm the asset exists, e.g.:

gh release view v<version> --repo codefly-dev/service-<name> --json assets \
--jq '[.assets[].name | select(contains("linux_arm64"))]'

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions