Files
superset2/.github/actions/setup-docker/action.yml
Claude Code 44244fc377 ci: pin QEMU binfmt image to stabilize arm64 docker builds
The multi-platform `docker-build (websocket)` job on master has been
flaking ~13% with `exit code: 132` (SIGILL) during `npm ci && npm run build`
on the `linux/arm64` leg. The `linux/amd64` leg always succeeds on the
same host, so the trigger is QEMU's user-mode x86_64→aarch64 translator
mis-executing one of the instructions a newer Node native module
postinstall emits.

`docker/setup-qemu-action@v3.6.0` is itself pinned, but it pulls
`tonistiigi/binfmt:latest` by default — a moving target. Pin the binfmt
image to `tonistiigi/binfmt:qemu-v8.1.5` (a recent, broadly-used QEMU
release) so the emulator binaries stop drifting under us.

This is a CI-only change. Output image bytes are unchanged: cross-built
amd64/arm64 artifacts are identical regardless of which QEMU version
emulates the build. Affects all four workflows that consume
`./.github/actions/setup-docker` (docker.yml, tag-release.yml,
showtime-trigger.yml, ephemeral-env.yml) — same emulator gets registered
for all of them; for amd64-only workflows the registration is a no-op.
2026-05-18 23:39:52 -05:00

79 lines
2.9 KiB
YAML

name: "Setup Docker Environment"
description: "Reusable steps for setting up QEMU, Docker Buildx, DockerHub login, Supersetbot, and optionally Docker Compose"
inputs:
build:
description: "Used for building?"
required: false
default: "false"
dockerhub-user:
description: "DockerHub username"
required: false
dockerhub-token:
description: "DockerHub token"
required: false
install-docker-compose:
description: "Flag to install Docker Compose"
required: false
default: "true"
login-to-dockerhub:
description: "Whether you want to log into dockerhub"
required: false
default: "true"
outputs: {}
runs:
using: "composite"
steps:
- name: Set up QEMU
if: ${{ inputs.build == 'true' }}
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
with:
# Pin the binfmt image to a specific QEMU release. The default
# (`tonistiigi/binfmt:latest`) is a moving target, and drift across
# QEMU's x86_64→aarch64 translator has been the proximate cause of
# intermittent `exit code: 132` (SIGILL) failures during the arm64
# leg of the multi-platform docker build — newer Node native modules
# emit instructions QEMU's user-mode emulation occasionally drops on
# the floor. Pinning a known-good release stabilises that path.
image: tonistiigi/binfmt:qemu-v8.1.5
- name: Set up Docker Buildx
if: ${{ inputs.build == 'true' }}
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Try to login to DockerHub
if: ${{ inputs.login-to-dockerhub == 'true' }}
continue-on-error: true
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
username: ${{ inputs.dockerhub-user }}
password: ${{ inputs.dockerhub-token }}
- name: Install Docker Compose
if: ${{ inputs.install-docker-compose == 'true' }}
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
# Download and save the Docker GPG key in the correct format
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
# Ensure the key file is readable
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add the Docker repository using the correct key
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Update package lists and install Docker Compose plugin
sudo apt update
sudo apt install -y docker-compose-plugin
- name: Docker Version Info
shell: bash
run: docker info