Skip to content

Comments

non-multi-arch images now fail with clear error#26

Merged
acarl005 merged 1 commit intomainfrom
andy/validate-image-platform
Feb 23, 2026
Merged

non-multi-arch images now fail with clear error#26
acarl005 merged 1 commit intomainfrom
andy/validate-image-platform

Conversation

@acarl005
Copy link
Collaborator

@acarl005 acarl005 commented Feb 22, 2026

Description

This PR is a follow-up for this: https://warpdev.slack.com/archives/C0AC81SR0L9/p1771440212411899?thread_ts=1771437585.553369&cid=C0AC81SR0L9

The problem was that the image appeared to pull successfully but then failed with "image not found" immediately after.

The problem was actually we were missing an ARM build on the warpdotdev/dev-java:21 image and they were using an ARM worker. We do require image to have the same platform as the host in order to avoid virtualization overhead, but that requirement is unclear here.

This PR adds an explicit check and fails with a clearer error message in this case.

Note that I didn't catch this case during dogfooding b/c I only tested images with multi-arch images with modern manifest lists. For those images, we already get an error about that.

However, older non-multi-arch images will actually successfully pull even if you explictly request a different platform, see here: docker/for-mac#5625 (comment)

I tested this by creating a legacy non-multi-arch image, e.g.

# /tmp/test-amd64-only/Dockerfile
FROM --platform=linux/amd64 alpine:3.21
RUN echo "This image is intentionally amd64-only for testing platform mismatch detection."
docker buildx build --platform linux/amd64 --provenance=false --sbom=false --push -t warpdotdev/test-amd64-only:latest /tmp/test-amd64-only

I created an environment with that image...

❯ oz environment get 4rUUMF9bnTPNJug50i0qAz
Name: Test Alpine
Docker image: warpdotdev/test-amd64-only:latest
Repositories: None
Setup commands: None

...and tried running it with my MacBook as a self-hosted runner and I got the error I expected

20:18:38.000 ERR Task launch failed: taskID=a44eaf9b-2f77-4355-8c8e-da64fa27c69f, error=image warpdotdev/test-amd64-only:latest is for platform linux/amd64, but this worker requires linux/arm64

@acarl005 acarl005 requested a review from bnavetta February 22, 2026 19:34
Copy link
Collaborator

@bnavetta bnavetta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find

@acarl005 acarl005 merged commit 3d0c2d0 into main Feb 23, 2026
3 checks passed
@acarl005 acarl005 deleted the andy/validate-image-platform branch February 23, 2026 16:57
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.

2 participants