Skip to content

Add ARM64 support to cross-version tests and release pipeline#160

Merged
dhalperi merged 6 commits intomasterfrom
copilot/add-arm-image-support
Mar 18, 2026
Merged

Add ARM64 support to cross-version tests and release pipeline#160
dhalperi merged 6 commits intomasterfrom
copilot/add-arm-image-support

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

The cross-version test and upload pipeline was amd64-only. ARM64 images were not tested before publishing, and no ARM64 images were published at all.

Changes

  • reusable-precommit.yml: Collapse image_build + image_build_arm64 into a single matrix job over [ubuntu-latest, ubuntu-24.04-arm], producing bf_image, bf_image_arm64, allinone_image, allinone_image_arm64 artifacts.

  • reusable-integration-tests.yml:

    • bf_image_test and allinone_image_test: each collapsed from two jobs into one matrix job (include: runner + artifact name).
    • pybf_cross_version_tests: collapsed from two jobs into a single 2D matrix — static platform dimension (amd64/arm64 runner + artifact) × dynamic pybf_version from PyPI — giving a full Cartesian product:
      matrix:
        platform:
          - runner: ubuntu-latest
            bf_artifact: bf_image
          - runner: ubuntu-24.04-arm
            bf_artifact: bf_image_arm64
        pybf_version: ${{ fromJson(needs.get_pybf_versions.outputs.versions) }}
  • reusable-upload.yml: dev_image_upload and prod_image_upload push multi-platform manifests (linux/amd64,linux/arm64) via QEMU + Buildx. prod_image_upload uses the Release Containers environment gate, so ARM64 only reaches production after approval.

bf_cross_version_tests intentionally has no ARM64 variant — old batfish images on Docker Hub are amd64-only.

Original prompt

This section details on the original issue you should resolve

<issue_title>arm image</issue_title>
<issue_description>With the new push for PC and laptops going arm (notable MAC), an arm image would be nice.</issue_description>

<agent_instructions>I'd like you to build ARM-native images and X86-64 images, separate images, and then also published under the same tag so that docker pul batfish/batfish:latest or whatever will naturally get the one for the platform. (I think there's a docker variant for this now, but if I'm wrong then let me know.)

I believe the existing JAR already works cross-platform.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@dhalperi Hey Ryan, nice idea!

None of us have ARM laptops yet, but we would welcome a contribution for ARM support. Thanks!</comment_new>
<comment_new>@dhalperi
The release scripts are now using GitHub actions, and are free and easy to play with. We'd welcome a PR adding ARM support.</comment_new>


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

@batfish-bot
Copy link

This change is Reviewable

Co-authored-by: dhalperi <526415+dhalperi@users.noreply.github.com>
Copilot AI changed the title [WIP] Add ARM image for cross-platform support Add linux/arm64 multi-platform Docker image support Mar 18, 2026
Copilot AI requested a review from dhalperi March 18, 2026 04:17
Copy link
Member

@dhalperi dhalperi left a comment

Choose a reason for hiding this comment

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

@copilot is the arm image tested?

Co-authored-by: dhalperi <526415+dhalperi@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 18, 2026

@copilot is the arm image tested?

The ARM build is now tested on every PR. In commit 795735d, I added two build-only steps to the image_build job in reusable-precommit.yml — one for batfish and one for allinone — each building for linux/arm64 via QEMU emulation (push: false, no tar export). These steps validate that the Dockerfiles (including the TARGETARCH-based JAVA_HOME and the ARM-compatible OpenJDK package) build successfully for ARM on every precommit run.

Full ARM integration tests aren't run because GitHub-hosted runners are x86-64 only, but since the Batfish JAR is platform-independent, the build verification covers the ARM-specific risk (Dockerfile and dependency resolution).

Copilot AI requested a review from dhalperi March 18, 2026 04:46
@dhalperi
Copy link
Member

@copilot https://github.com/orgs/community/discussions/148648 this post says we CAN use arm64 runners. Why not use it?

Co-authored-by: dhalperi <526415+dhalperi@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 18, 2026

@copilot https://github.com/orgs/community/discussions/148648 this post says we CAN use arm64 runners. Why not use it?

Done in 103fa24. The ARM image is now built and tested on native ubuntu-24.04-arm runners:

  • New image_build_arm64 job in reusable-precommit.yml runs on ubuntu-24.04-arm, builds both batfish and allinone images natively (no QEMU), and uploads them as bf_image_arm64 / allinone_image_arm64 artifacts.
  • New bf_image_test_arm64 and allinone_image_test_arm64 jobs in reusable-integration-tests.yml run on ubuntu-24.04-arm, load those ARM tars, and run the full integration test suite against them — the same tests as the existing amd64 jobs.

The previous QEMU setup step and QEMU-emulated ARM build steps have been removed from the image_build job since they're no longer needed.

Co-authored-by: dhalperi <526415+dhalperi@users.noreply.github.com>
Co-authored-by: dhalperi <526415+dhalperi@users.noreply.github.com>
Copilot AI changed the title Add linux/arm64 multi-platform Docker image support Add ARM64 support to cross-version tests and release pipeline Mar 18, 2026
Copy link
Member

@dhalperi dhalperi left a comment

Choose a reason for hiding this comment

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

@dhalperi reviewed 5 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on copilot[bot]).

@dhalperi dhalperi marked this pull request as ready for review March 18, 2026 20:33
@dhalperi dhalperi enabled auto-merge (squash) March 18, 2026 20:33
@dhalperi dhalperi merged commit f646b40 into master Mar 18, 2026
14 checks passed
@dhalperi dhalperi deleted the copilot/add-arm-image-support branch March 18, 2026 20:34
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.

arm image

3 participants