Skip to content

feat: Add multi-arch platform support for container builds #106

Closed
munishchouhan wants to merge 3 commits into
masterfrom
support-multi-arch-build
Closed

feat: Add multi-arch platform support for container builds #106
munishchouhan wants to merge 3 commits into
masterfrom
support-multi-arch-build

Conversation

@munishchouhan
Copy link
Copy Markdown
Member

Summary

  • Add support for multi-arch container builds via --platform linux/amd64,linux/arm64 or the shorthand --platform all
  • Platform values are normalized to canonical form (e.g., x86_64 → linux/amd64), with whitespace trimming and deduplication
  • Multi-arch builds are validated to require a containerfile or package spec, and are incompatible with Singularity format

Test plan

  • Single platform aliases normalize correctly (amd64 → linux/amd64, x86_64 → linux/amd64, etc.)
  • Comma-separated platforms normalize and deduplicate (amd64,arm64 → linux/amd64,linux/arm64)
  • --platform all expands to linux/amd64,linux/arm64
  • Multi-arch with containerfile or conda packages succeeds
  • Multi-arch with image-only (no containerfile) fails with clear error
  • Multi-arch + --singularity fails with clear error (both comma-separated and all)
  • Invalid platform in comma-separated list fails with clear error
  • Whitespace in comma-separated values handled correctly
  • Duplicate platforms deduplicated
  • All 118 tests pass

Files changed

  • App.java (+47/-5) — platform normalization, canonicalization, multi-arch validation
  • AppTest.groovy (+263/-12) — 12 new test cases, updated existing platform test to verify canonical form

Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
@munishchouhan munishchouhan self-assigned this Mar 23, 2026
@munishchouhan
Copy link
Copy Markdown
Member Author

tested:

% /Users/munish.chouhan/testing_ground/wave-cli/app/build/native/nativeCompile/wave --conda-package numpy --platform all --wave-endpoint http://localhost:9090
munish-wave.seqera.dev/wt/25e31947a8f2/hrma017/dev/numpy:numpy--fed0cf6df860f9d0
Screenshot 2026-03-23 at 17 02 20 Screenshot 2026-03-23 at 17 01 56 Screenshot 2026-03-23 at 17 01 49

Copy link
Copy Markdown

@jonmarti jonmarti left a comment

Choose a reason for hiding this comment

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

LGTM, minor comment left

Comment thread app/src/main/java/io/seqera/wave/cli/App.java Outdated
Signed-off-by: munishchouhan <hrma017@gmail.com>
@pditommaso
Copy link
Copy Markdown
Contributor

Thanks folks, I had already an implementation for this. Closing in favour of #107

@pditommaso pditommaso closed this Mar 24, 2026
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.

4 participants