Skip to content

fix(template): use linux/arm64/v8 for Go distroless base image#900

Merged
gregmagolan merged 1 commit into
mainfrom
fix-go-distroless-arm64-variant
Jun 23, 2026
Merged

fix(template): use linux/arm64/v8 for Go distroless base image#900
gregmagolan merged 1 commit into
mainfrom
fix-go-distroless-arm64-variant

Conversation

@gregmagolan

Copy link
Copy Markdown
Member

The Go template's OCI base image fails to build locally on Apple Silicon Macs with:

No matching manifest found in image gcr.io/distroless/base for platform linux/arm64

Root cause: The gcr.io/distroless/base image index labels its arm64 manifest with "variant": "v8". rules_oci builds its platform-match string from os/arch/variant, so the manifest's platform is linux/arm64/v8. The Go oci.pull requested bare linux/arm64, which never matches → _find_platform_manifest returns Nonefail().

CI passed because it runs on linux/amd64, which matched fine — only the arm64 fetch path (exercised on Apple Silicon) was broken. The Python base image in the same MODULE.bazel already used the variant-qualified form (linux/arm64/v8 + ..._linux_arm64_v8); this brings the Go entry in line.


Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: yes

  • Breaking change (forces users to change their own code or config): no

  • Suggested release notes appear below: yes

  • Fixed Go template OCI image builds failing on Apple Silicon Macs (No matching manifest found ... for platform linux/arm64) by requesting the variant-qualified linux/arm64/v8 distroless base manifest.

Test plan

  • Manual testing; please provide instructions so we can reproduce:
    1. On an Apple Silicon Mac, generate a project with the Go preset.
    2. aspect build //... — previously failed fetching distroless_base_linux_arm64; now builds successfully.

The gcr.io/distroless/base image index labels its arm64 manifest with
variant "v8". rules_oci builds its platform-match string from
os/arch/variant, so the manifest's platform is "linux/arm64/v8". The Go
oci.pull requested bare "linux/arm64", which never matches and fails on
Apple Silicon with:

  No matching manifest found in image gcr.io/distroless/base for
  platform linux/arm64

CI passed because it runs on linux/amd64, which matched fine — only the
arm64 fetch path (exercised on Apple Silicon) was broken. The Python base
image in the same file already used the variant-qualified form; this
brings the Go entry in line.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@aspect-workflows

aspect-workflows Bot commented Jun 23, 2026

Copy link
Copy Markdown

✨ Aspect Workflows Tasks

📅 Tue Jun 23 20:13:03 UTC 2026

✅ 68 successful tasks

  • ✅ buildifier-cpp [buildifier] · ⏱ 17.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ buildifier-go [buildifier] · ⏱ 21.3s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ buildifier-java [buildifier] · ⏱ 20.1s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ buildifier-js [buildifier] · ⏱ 30.7s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ buildifier-kitchen-sink [buildifier] · ⏱ 52.4s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ buildifier-kotlin [buildifier] · ⏱ 21.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ buildifier-minimal [buildifier] · ⏱ 12.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ buildifier-py [buildifier] · ⏱ 20.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ buildifier-ruby [buildifier] · ⏱ 30.2s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ buildifier-rust [buildifier] · ⏱ 38.7s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ buildifier-scala [buildifier] · ⏱ 44.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ buildifier-shell [buildifier] · ⏱ 26.8s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ delivery-go [delivery] · ⏱ 37.2s · 🐙 GitHub Actions · ☑️ Check
    💬 Delivery complete (1 delivered)
  • ✅ delivery-kitchen-sink [delivery] · ⏱ 1m 16s · 🐙 GitHub Actions · ☑️ Check
    💬 Delivery complete (1 delivered)
  • ✅ format-cpp [format] · ⏱ 20.4s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-go [format] · ⏱ 19.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-java [format] · ⏱ 22.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-js [format] · ⏱ 41.3s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-kitchen-sink [format] · ⏱ 56.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-kotlin [format] · ⏱ 23.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-py [format] · ⏱ 21.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-rust [format] · ⏱ 46.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ format-shell [format] · ⏱ 35.7s · 🐙 GitHub Actions · ☑️ Check
    💬 Format complete (clean)
  • ✅ gazelle-check-cpp [gazelle] · ⏱ 17.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-check-go [gazelle] · ⏱ 16.7s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-check-java [gazelle] · ⏱ 18s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-check-js [gazelle] · ⏱ 34.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-check-kitchen-sink [gazelle] · ⏱ 50.4s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-check-kotlin [gazelle] · ⏱ 20.7s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-check-minimal [gazelle] · ⏱ 10.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-check-py [gazelle] · ⏱ 18.8s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-check-ruby [gazelle] · ⏱ 29.1s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-check-rust [gazelle] · ⏱ 38.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-check-scala [gazelle] · ⏱ 44.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-check-shell [gazelle] · ⏱ 29.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-cpp [gazelle] · ⏱ 11.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-go [gazelle] · ⏱ 11.8s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-java [gazelle] · ⏱ 16.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-js [gazelle] · ⏱ 26.3s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-kitchen-sink [gazelle] · ⏱ 30.4s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-kotlin [gazelle] · ⏱ 14.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-minimal [gazelle] · ⏱ 11.3s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-py [gazelle] · ⏱ 15.6s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-ruby [gazelle] · ⏱ 20.3s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-rust [gazelle] · ⏱ 20.4s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-scala [gazelle] · ⏱ 25.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ gazelle-shell [gazelle] · ⏱ 25.9s · 🐙 GitHub Actions · ☑️ Check
    💬 Gazelle complete (clean)
  • ✅ lint-cpp [lint] · ⏱ 40.3s · 🐙 GitHub Actions · ☑️ Check
    💬 Lint complete (clean)
  • ✅ lint-java [lint] · ⏱ 29.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Lint complete (clean)
  • ✅ lint-js [lint] · ⏱ 49s · 🐙 GitHub Actions · ☑️ Check
    💬 Lint complete (clean)
  • ✅ lint-kitchen-sink [lint] · ⏱ 1m 53s · 🐙 GitHub Actions · ☑️ Check
    💬 Lint complete (clean)
  • ✅ lint-kotlin [lint] · ⏱ 37s · 🐙 GitHub Actions · ☑️ Check
    💬 Lint complete (clean)
  • ✅ lint-py [lint] · ⏱ 35s · 🐙 GitHub Actions · ☑️ Check
    💬 Lint complete (clean)
  • ✅ lint-ruby [lint] · ⏱ 1m 14s · 🐙 GitHub Actions · ☑️ Check
    💬 Lint complete (clean)
  • ✅ lint-rust [lint] · ⏱ 50s · 🐙 GitHub Actions · ☑️ Check
    💬 Lint complete (clean)
  • ✅ lint-shell [lint] · ⏱ 39.2s · 🐙 GitHub Actions · ☑️ Check
    💬 Lint complete (clean)
  • ✅ test-cpp [test] · ⏱ 22.4s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (2/2 passed · 1 cached)
  • ✅ test-go [test] · ⏱ 2m 33s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (2/2 passed · 1 cached)
  • ✅ test-java [test] · ⏱ 28s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (2/2 passed · 1 cached)
  • ✅ test-js [test] · ⏱ 37.7s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (4/4 passed · 1 cached)
  • ✅ test-kitchen-sink [test] · ⏱ 7m 3s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (13/13 passed · 1 cached)
  • ✅ test-kotlin [test] · ⏱ 30.1s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (2/2 passed · 1 cached)
  • ✅ test-minimal [test] · ⏱ 10.5s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (1/1 passed · 1 cached)
  • ✅ test-py [test] · ⏱ 23.3s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (2/2 passed · 1 cached)
  • ✅ test-ruby [test] · ⏱ 3m 57s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (2/2 passed · 1 cached)
  • ✅ test-rust [test] · ⏱ 40.3s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (2/2 passed · 1 cached)
  • ✅ test-scala [test] · ⏱ 5m 34s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (2/2 passed · 1 cached)
  • ✅ test-shell [test] · ⏱ 27s · 🐙 GitHub Actions · ☑️ Check
    💬 Bazel test complete (2/2 passed · 1 cached)

⏱ Last updated Tue Jun 23 20:31:19 UTC 2026 · 📊 GitHub API quota 853/15,000 (6% used, resets in 45m, throttle 2×)
🚀 Powered by Aspect CLI (v2026.26.15)  |  Aspect Build · X · LinkedIn · YouTube

@gregmagolan gregmagolan merged commit 3b78166 into main Jun 23, 2026
80 checks passed
@gregmagolan gregmagolan deleted the fix-go-distroless-arm64-variant branch June 23, 2026 20:28
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