Skip to content

fix: build on the multi-arch python companion, pinned by its index digest - #71

Merged
antoinetoussaint-byte merged 1 commit into
mainfrom
fix/multi-arch-python-companion
Sep 27, 2026
Merged

antoinetoussaint-byte merged 1 commit into
mainfrom
fix/multi-arch-python-companion

Conversation

@antoinetoussaint-byte

Copy link
Copy Markdown
Contributor

Why

A composed workspace's GitOps render builds every image for linux/amd64,linux/arm64. Every python-fastapi service failed the arm64 half:

#20 [linux/arm64 runtime 3/8] RUN adduser -D -u 1000 appuser
.buildkit_qemu_emulator: /bin/sh: Invalid ELF image for this architecture

The agent's default runtime image, docker.io/codeflydev/python:0.0.1 (resolved to sha256:84376bd4…), is a single linux/amd64 manifest, not an image index. Its config says architecture: amd64. Both platform builds therefore start from amd64 binaries. On an amd64 runner, QEMU cannot run them as arm64. On an arm64 host, BuildKit reports InvalidBaseImagePlatform: … was pulled with platform "linux/amd64", expected "linux/arm64", and an "arm64" image would carry amd64 binaries.

Change

  • The default runtime image is now ghcr.io/codefly-dev/python:0.0.5, the Python companion of the core this agent links (core v0.5.9, companions/python/info.codefly.yaml). It is published by the CLI as an amd64+arm64 index and pinned by the index digest sha256:67d6fe82…, so each platform resolves its own entry.
  • TestRuntimeImageIsTheLinkedCoreCompanion holds the tag equal to core's companion version, so a core bump fails until the pin moves. TestRuntimeImageIsDigestPinned requires a digest pin.
  • AGENTS.md and the settings comment are updated to match.

Classification: fix, at the owner. The agent owns its default base image, and the multi-arch image already existed on the canonical registry. The agent was still pointing at the legacy single-arch one.

Verified

  • go vet ./... is clean. The runtime-image, recipe and Dockerfile tests pass locally.
  • A downstream python-fastapi service (FastAPI app, requires-python >=3.12), built with this recipe's shape from the new pin for linux/amd64,linux/arm64: both platforms build, uv sync --frozen succeeds, and the runtime imports fastapi/uvicorn on x86_64 and aarch64 (Python 3.13.1).
  • Control: the old pin, built for arm64, reports InvalidBaseImagePlatform.
  • The registry index was inspected directly: ghcr.io/codefly-dev/python:0.0.5 lists linux/amd64 and linux/arm64.

Not verified

  • The full go test -race ./... and the Docker image-build tests run in CI, not locally.
  • The end-to-end render against a composed workspace is re-run after a dev prerelease of this agent.

🤖 Generated with Claude Code

…gest

The default runtime image was docker.io/codeflydev/python:0.0.1, a single
linux/amd64 manifest. A recipe rendered for linux/amd64,linux/arm64 pulled
the amd64 image for both platforms, so the arm64 half ran amd64 binaries under
QEMU and died on its first RUN ("Invalid ELF image for this architecture").

The default is now ghcr.io/codefly-dev/python:0.0.5, the companion of the
core this agent links, pinned by the digest of its amd64+arm64 image index.
A test holds the tag to core's companion version so a core bump cannot leave
the pin behind.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@antoinetoussaint-byte
antoinetoussaint-byte merged commit 528c58e into main Sep 27, 2026
3 checks passed
@antoinetoussaint-byte
antoinetoussaint-byte deleted the fix/multi-arch-python-companion branch October 25, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant