Skip to content

fix(workflow): use runners with different architectures instead of QEMU #12322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

SkyeYoung
Copy link
Member

@SkyeYoung SkyeYoung commented Jun 13, 2025

Description

Depend on #12328, #12329

What:

This PR changed the original method of using qemu to build in runners with different architectures.

How:

ref docker/buildx#574 (comment)

Why:

This can reuse the image built before Test APISIX, and significantly speeds up the build of the apisix:dev image because it's built on native arm64 or amd64.

It also enables simple test step Test APISIX that were performed only in amd64 for arm64 image.

Which issue(s) this PR fixes:

Fixes #

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@SkyeYoung SkyeYoung marked this pull request as ready for review June 13, 2025 09:31
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. github_actions Pull requests that update GitHub Actions code labels Jun 13, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces QEMU-based multi-arch builds with native architecture runners to speed up the apisix:dev image build and reuse previous images before "Test APISIX".

  • Install runtime libyaml via apt-get instead of copying from build stage
  • Update etcd service image version in Docker Compose
  • Refactor Makefile targets for architecture-specific builds, tags, and manifest merging
  • Update GitHub Actions to use a matrix of native runners and split build/push and manifest merge steps

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
docker/debian-dev/Dockerfile Install libyaml via apt and remove old manual copy
docker/compose/docker-compose-master.yaml Bump etcd image to 3.6 and remove explicit user: root
Makefile Add TARGETARCH build arg, separate push-on-debian-dev and merge-tags
.github/workflows/push-dev-image-on-commit.yml Use matrix runners for amd64/arm64, remove QEMU steps, split jobs
Comments suppressed due to low confidence (3)

docker/compose/docker-compose-master.yaml:37

  • Removing the explicit user: root may cause permission issues with the default user in bitnami/etcd:3.6. Consider reinstating the required user setting or validating file ownership.
image: bitnami/etcd:3.6

.github/workflows/push-dev-image-on-commit.yml:63

  • The build-test-push job runs make push-on-debian-dev without first logging into Docker Hub. Add a docker/login-action step before the push to ensure authentication.
make push-on-debian-dev

Makefile:519

  • [nitpick] Using docker manifest requires the CLI experimental feature. Ensure DOCKER_CLI_EXPERIMENTAL=enabled is set or switch to a docker buildx–based manifest workflow to avoid errors on some environments.
$(ENV_DOCKER) manifest create $(IMAGE_NAME):dev \

nic-6443
nic-6443 previously approved these changes Jun 13, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

bzp2010
bzp2010 previously approved these changes Jun 16, 2025
@bzp2010
Copy link
Contributor

bzp2010 commented Jun 16, 2025

BTW, they seem too long.

image

@SkyeYoung
Copy link
Member Author

BTW, they seem too long.

image

We can do this in another PR

@SkyeYoung SkyeYoung dismissed stale reviews from bzp2010 and nic-6443 via a3f9766 June 16, 2025 09:44
@SkyeYoung
Copy link
Member Author

This is much faster than the previous method, so please review it as soon as possible.

image
https://github.com/apache/apisix/actions/runs/15670730008/job/44141280587

CleanShot 2025-06-16 at 17 50 10@2x
https://github.com/apache/apisix/actions/runs/15677420274/job/44160830531?pr=12322

@SkyeYoung
Copy link
Member Author

@membphis ping

@SkyeYoung SkyeYoung requested a review from moonming June 20, 2025 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants