Skip to content

test(build): Keep the MicrovmImage ForEach integ build off a Docker export bug - #9422

Merged
vicheey merged 1 commit into
developfrom
test/microvm-foreach-integ-dockerfile
Nov 11, 2026
Merged

vicheey merged 1 commit into
developfrom
test/microvm-foreach-integ-dockerfile

Conversation

@licjun

@licjun licjun commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Which issue(s) does this change fix?

Fixes the nightly build-arm64 integration suite, where test_build_cmd_microvm_image.py::TestBuildMicrovmImage_0::test_build_foreach_dynamic_code_uri has failed in every run since the runners moved to Ubuntu 26.04.

Why is this change necessary?

build-arm64 passed on the Ubuntu 24.04 runners (Docker 28.0.4) through Nov 5. Since Nov 6 the runners are Ubuntu 26.04 (Docker 29.4.2), and once the Ruby setup was fixed (#9410) the test fails on every attempt, including reruns:

Building MicrovmImage 'AlphaImage' for arm64 on a x86_64 host. ...
Step 1/2 : FROM python:3.12-slim
Step 2/2 : COPY . /app
failed to export image: NotFound: content digest sha256:05a994d2...: not found

Docker 29 uses the containerd image store on fresh installs. With the classic builder (the default sam build path, without --use-buildkit), a cross-platform build whose first instruction after FROM is COPY fails this way. The missing digest is the base image's manifest for the host platform (linux/amd64 on the runner), which a pull for linux/arm64 doesn't store. The two ForEach fixtures were FROM + COPY; the other MicrovmImage fixtures have WORKDIR or RUN first, and pass.

How does it address the issue?

Adds WORKDIR /app before COPY . /app in the microvm-image-foreach Alpha and Beta Dockerfiles, with a comment explaining why. The image contents are unchanged.

The underlying Docker behavior also affects PackageType: Image functions built for another architecture with a FROM + COPY Dockerfile. That is tracked separately; this PR only unblocks the nightly suite.

What side effects does this change have?

None. Test data only.

Testing

Against a Docker 29.9.3 daemon with the containerd image store, on an arm64 host:

  • The original fixtures built for X86_64 (cross-platform) reproduce the same failed to export image: NotFound: content digest ... not found error. The fixed fixtures build both images as linux/amd64.
  • Shapes checked: FROM + COPY and FROM + COPY + CMD fail; FROM + WORKDIR + COPY, FROM + ENV + COPY and FROM + RUN pass. Native builds and --use-buildkit pass in all cases.
  • tests/integration/buildcmd/test_build_cmd_microvm_image.py: 14 passed.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…xport bug

The nightly build-arm64 suite fails test_build_foreach_dynamic_code_uri
since the runners moved to Ubuntu 26.04 (Docker 29.4.2). Docker 29 uses
the containerd image store on fresh installs, and with the classic
builder a cross-platform build whose first instruction after FROM is
COPY fails with "failed to export image: NotFound: content digest ...
not found". The x86_64 runners build these arm64 images, and the
fixture Dockerfiles were FROM + COPY.

Add WORKDIR before COPY in the two fixtures. The image contents are the
same.
@licjun
licjun marked this pull request as ready for review November 11, 2026 00:49
@licjun
licjun requested a review from a team as a code owner November 11, 2026 00:49
@vicheey
vicheey merged commit 0e194bb into develop Nov 11, 2026
134 of 135 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants