Skip to content

Java: add linux-arm64 native runtime support - #2421

Open
edburns with Copilot wants to merge 3 commits into
mainfrom
copilot/add-linux-arm64-support
Open

Java: add linux-arm64 native runtime support#2421
edburns with Copilot wants to merge 3 commits into
mainfrom
copilot/add-linux-arm64-support

Conversation

Copilot AI commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Adds linux-arm64 support to the Java SDK’s experimental in-process runtime, matching the existing native packaging and publication model.

  • Packaging

    • Adds host-aware linux-arm64 Maven profiles.
    • Packages runtime.node, copilot, and platform metadata.
    • Requires a Linux ARM64 glibc host.
  • Validation

    • Extends host, artifact, fetch, and local-publication validation.
    • Includes linux-arm64 in coordinated classifier publication.
  • CI and publishing

    • Adds linux-arm64 to the java-sdk-inprocess matrix using ubuntu-24.04-arm.
    • Builds and publishes the classifier in snapshot and release workflows.
  • Documentation

    • Documents the classifier dependency, supported host, and development workflow.
<dependency>
    <groupId>com.github</groupId>
    <artifactId>copilot-sdk-java-runtime</artifactId>
    <version>${copilot.version}</version>
    <classifier>linux-arm64</classifier>
</dependency>

Copilot AI linked an issue Aug 26, 2026 that may be closed by this pull request
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for linux-arm64 in copilot-sdk Java: add linux-arm64 native runtime support Aug 26, 2026
Copilot AI requested a review from edburns August 26, 2026 23:17
@github-actions

This comment has been minimized.

@edburns

edburns commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

@copilot investigate and fix these two workflow failures:

I expect the first one is ephemeral, since this PR should not have even touched the code relating to win32-x64.

Co-authored-by: edburns <75821+edburns@users.noreply.github.com>

Copilot AI commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

@copilot investigate and fix these two workflow failures:

Investigated both links. 98356612202 is the win32-x64 in-process matrix job; 98358215083 is only the Java required aggregator failing because the Java workflow failed. All native publication jobs, including linux-arm64 and final assembly, succeeded. Commit 56b59dc scopes -Dcopilot.native.libc=glibc to the ARM64 matrix entry, restoring the original Windows/macOS Maven command.

@github-actions

Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review ✅

This PR adds linux-arm64 native runtime support to the Java SDK's in-process runtime. All 12 changed files are scoped to:

  • Java-specific CI/CD workflows (.github/workflows/java-*.yml)
  • Java native packaging (java/copilot-native/)
  • Java Maven configuration (java/sdk/pom.xml, java/copilot-native/pom.xml)
  • Java documentation (java/README.md, java/docs/adr/)

No cross-SDK consistency issues found. The native in-process runtime (ARM64 classifier packaging) is a Java-specific infrastructure feature without equivalent counterparts in the Node.js, Python, Go, .NET, or Rust SDKs. No public API surface was added or modified, so no parity gaps were introduced.

Generated by SDK Consistency Review Agent for #2421 · sonnet46 17.1 AIC · ⌖ 5.47 AIC · ⊞ 6.6K ·

@edburns
edburns marked this pull request as ready for review August 26, 2026 23:59
@edburns
edburns requested a review from a team as a code owner August 26, 2026 23:59
Copilot AI balanced review requested due to automatic review settings August 26, 2026 23:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Linux ARM64 glibc support to Java’s experimental in-process runtime.

Changes:

  • Adds ARM64 Maven packaging and validation.
  • Extends CI, snapshot, and release publication.
  • Documents ARM64 usage and support.
Show a summary per file
File Description
java/sdk/pom.xml Selects the ARM64 runtime classifier.
java/README.md Documents ARM64 setup and artifacts.
java/docs/adr/adr-007-native-bundling-strategy.md Updates supported platform strategy.
java/copilot-native/pom.xml Packages and attaches the ARM64 classifier.
java/copilot-native/scripts/validate-native-host.mjs Validates ARM64 glibc hosts.
java/copilot-native/scripts/validate-native-host.test.mjs Tests ARM64 host validation.
java/copilot-native/scripts/validate-native-artifact.test.mjs Tests ARM64 artifacts and publications.
java/copilot-native/scripts/validate-local-publication.mjs Requires ARM64 in complete publications.
java/copilot-native/scripts/fetch-native.test.mjs Covers ARM64 native fetching.
.github/workflows/java-sdk-tests.yml Adds ARM64 testing and publication validation.
.github/workflows/java-publish-snapshot.yml Publishes ARM64 snapshots.
.github/workflows/java-publish-maven.yml Publishes ARM64 releases.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 12/12 changed files
  • Comments generated: 0
  • Review effort level: Balanced

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot analyze the "-classifier" jobs in this workflow for DRY violations. If sufficient violations exist, remedy them by pulling the common steps into a separate job and making the existing jobs depend on that job. But only do this if you can be 100% sure it is safe.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The classifier jobs share checkout and runtime setup, but those steps must execute on each platform-specific runner; a prerequisite job would not transfer its workspace, toolchain, or Maven cache and would only serialize the builds. The remaining build/validation steps intentionally differ by shell and platform hash tool. I therefore made no refactor, as it would add risk without safely removing the duplication.

@edburns edburns left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot in java-publish-maven.yml and java-publish-snapshot.yml, analyze the "-classifier" jobs in this workflow for DRY violations. If sufficient violations exist, remedy them by pulling the common steps into a separate job and making the existing jobs depend on that job. But only do this if you can be 100% sure it is safe.

Copilot AI commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

@copilot in java-publish-maven.yml and java-publish-snapshot.yml, analyze the "-classifier" jobs in this workflow for DRY violations. If sufficient violations exist, remedy them by pulling the common ...

I analyzed both workflows. The only common work is runner-local checkout plus Java/Node/Maven-cache setup; a separate job cannot share that state across Linux ARM64, Windows, and macOS, and would serialize the classifier builds without removing those steps. Immutable source resolution is already centralized (resolve-source for snapshots and prepare-release for releases). The platform-specific shell, host validation, packaging, hashing, and artifact paths must remain local, so no safe DRY refactor is available.

@edburns
edburns enabled auto-merge August 27, 2026 00:15
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.

[Java] Add support for linux-arm64

3 participants