From 83dae642385bd43e6c49399d285d0b1c468e1e2d Mon Sep 17 00:00:00 2001 From: Ricardo Branco Date: Mon, 5 Oct 2026 16:06:20 +0200 Subject: [PATCH 1/2] docker_buildx: Backport PR#4126 to fix test issue on aarch64 --- data/containers/patches.yaml | 4 ++- data/containers/patches/buildx/4126.patch | 31 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 data/containers/patches/buildx/4126.patch diff --git a/data/containers/patches.yaml b/data/containers/patches.yaml index 2c93ee8e839c..76d7d52d2e48 100644 --- a/data/containers/patches.yaml +++ b/data/containers/patches.yaml @@ -38,9 +38,11 @@ buildah: max: "1.44.0" buildx: - # https://github.com/docker/buildx/pull/3475/ - test: Handle version not having the initial 'v' + # https://github.com/docker/buildx/pull/3475 - test: Handle version not having the initial 'v' + # https://github.com/docker/buildx/pull/4126 - tests: normalize platform in TestBuildAnnotations descriptor key 3475: min: "0.29.0" + 4126: compose: # https://github.com/docker/compose/pull/13214 - test: Set stop_signal to SIGTERM diff --git a/data/containers/patches/buildx/4126.patch b/data/containers/patches/buildx/4126.patch new file mode 100644 index 000000000000..c987f593af31 --- /dev/null +++ b/data/containers/patches/buildx/4126.patch @@ -0,0 +1,31 @@ +From 2bebf301ff9cfa7394d203844edfc5936eb53d85 Mon Sep 17 00:00:00 2001 +From: Ricardo Branco +Date: Mon, 5 Oct 2026 16:00:29 +0200 +Subject: [PATCH] tests: normalize platform in TestBuildAnnotations descriptor + key + +On arm64, platforms.DefaultSpec() returns linux/arm64/v8, while the +worker reports linux/arm64. The manifest-descriptor annotation key +therefore matched no platform and the annotation was silently dropped, +causing the example4 assertion to fail. The image lookup in the same +test already uses platforms.Normalize; do the same for the annotation +key. + +Signed-off-by: Ricardo Branco +--- + tests/build.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/build.go b/tests/build.go +index e7d6b8a9b523..39a3790edb77 100644 +--- a/tests/build.go ++++ b/tests/build.go +@@ -921,7 +921,7 @@ func testBuildAnnotations(t *testing.T, sb integration.Sandbox) { + "--annotation", "example1=www", + "--annotation", "index:example2=xxx", + "--annotation", "manifest:example3=yyy", +- "--annotation", "manifest-descriptor[" + platforms.Format(platforms.DefaultSpec()) + "]:example4=zzz", ++ "--annotation", "manifest-descriptor[" + platforms.Format(platforms.Normalize(platforms.DefaultSpec())) + "]:example4=zzz", + } + out, err := buildCmd(sb, withArgs(annotations...), withArgs(fmt.Sprintf("--output=type=image,name=%s,push=true", target), dir)) + require.NoError(t, err, string(out)) From 1592267c46cfccb107cd1ff815e3ec7ec31290b7 Mon Sep 17 00:00:00 2001 From: Ricardo Branco Date: Mon, 5 Oct 2026 16:11:50 +0200 Subject: [PATCH 2/2] docker_buildx: Remove xfail for solved issue upstream --- tests/containers/docker_buildx.pm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/containers/docker_buildx.pm b/tests/containers/docker_buildx.pm index b2f214fb3aa2..9e0b462e0853 100644 --- a/tests/containers/docker_buildx.pm +++ b/tests/containers/docker_buildx.pm @@ -74,11 +74,6 @@ sub run { my $env = join " ", map { "$_=\"$env{$_}\"" } sort keys %env; my @xfails = (); - push @xfails, ( - # These tests fail on aarch64 - "github.com/docker/buildx/tests::TestIntegration", - "github.com/docker/buildx/tests::TestIntegration/TestBuildAnnotations/worker=remote", - ) if (is_aarch64); push @xfails, ( # XXX These fail for unknown reasons and not really important right now: "github.com/docker/buildx/tests::TestIntegration",