Skip to content

Add Java linuxmusl-x64 native classifier support - #2715

Open
edburns with Copilot wants to merge 7 commits into
mainfrom
copilot/add-linuxmusl-x64-support
Open

edburns with Copilot wants to merge 7 commits into
mainfrom
copilot/add-linuxmusl-x64-support

Conversation

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Adds Java SDK packaging, CI coverage, and publication support for the linuxmusl-x64 native runtime.

  • Packaging

    • Add Maven profiles for building and consuming the linuxmusl-x64 classifier.
    • Validate musl host architecture and libc compatibility.
    • Include the classifier in publication completeness checks.
  • CI

    • Add Alpine-based linuxmusl-x64 coverage to the Java in-process test matrix.
    • Validate local publication assembly with the musl artifact.
  • Publishing

    • Build and attach the classifier in Maven release and snapshot workflows.
    • Include the artifact in publication summaries.
  • Documentation

    • Document musl classifier selection, build configuration, and Alpine usage.

Copilot AI linked an issue Sep 17, 2026 that may be closed by this pull request
@github-actions

This comment has been minimized.

@edburns

edburns commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

@copilot I observe a failure in the net-new workflow for this PR:

https://github.com/github/copilot-sdk/actions/runs/35281333643/job/105404197689?pr=2715

Please examine the workflow output, resolve the issue, and push the commits to the topic branch. I will approve the workflow.

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot I observe a failure in the net-new workflow for this PR:

https://github.com/github/copilot-sdk/actions/runs/35281333643/job/105404197689?pr=2715...

Root cause: java/sdk/pom.xml's inprocess profile always hard-coded copilot.native.classifier=linux-x64, so when the Alpine job ran with -Dcopilot.native.libc=musl, it still tried to resolve the linux-x64 runtime dependency (which is never built in that container) instead of linuxmusl-x64. Added a profile activated by copilot.native.libc=musl that overrides the classifier to linuxmusl-x64, matching how copilot-native/pom.xml already handles it. Fixed in dadd0c0.

Copilot AI requested a review from edburns September 17, 2026 22:30
Copilot AI changed the title [WIP] Add support for linuxmusl-x64 in packaging and tests Add Java linuxmusl-x64 native classifier support Sep 17, 2026
@github-actions

This comment has been minimized.

Comment thread .github/workflows/java-publish-maven.yml Outdated
Comment thread .github/workflows/java-publish-snapshot.yml Outdated
Copilot AI requested a review from edburns September 17, 2026 23:14

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.

🟡 Changes recommended

Host validation currently treats any unknown non-glibc Linux host as musl, potentially producing mislabeled artifacts.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds Java linuxmusl-x64 packaging, testing, publication, and documentation support.

Changes:

  • Adds Maven profiles and native-host validation.
  • Adds Alpine-based CI and publication workflows.
  • Updates publication checks and documentation.
File summaries
File Description
java/sdk/pom.xml Selects the musl runtime dependency.
java/copilot-native/pom.xml Builds and attaches the musl classifier.
java/copilot-native/scripts/validate-native-host.mjs Validates musl hosts.
java/copilot-native/scripts/validate-native-host.test.mjs Tests host validation.
java/copilot-native/scripts/fetch-native.test.mjs Covers musl artifact staging.
java/copilot-native/scripts/validate-native-artifact.test.mjs Extends publication fixtures.
java/copilot-native/scripts/validate-local-publication.mjs Requires the musl classifier.
.github/workflows/java-sdk-tests.yml Adds Alpine tests and publication assembly.
.github/workflows/java-publish-snapshot.yml Publishes musl snapshots.
.github/workflows/java-publish-maven.yml Publishes musl releases.
java/README.md Documents musl usage and building.
java/docs/adr/adr-007-native-bundling-strategy.md Records musl publication support.
Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 1
  • Review effort level: Balanced (auto)

Note

Copilot is running an experiment and ran this review at Balanced.


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

Comment thread java/copilot-native/scripts/validate-native-host.mjs

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

@edburns Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: afebd304-3b77-4815-b330-a6c0e3d764cb

Sorry for the inconvenience!

Comment thread .github/workflows/java-sdk-tests.yml Outdated

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot I observe a failure in the net-new workflow for this PR:

https://github.com/github/copilot-sdk/actions/runs/35281333643/job/105404197689?pr=2715...

That run (35281333643) was on ae17a9a, before the fix. Root cause: the inprocess profile in java/sdk/pom.xml hard-coded copilot.native.classifier=linux-x64, so the Alpine job tried to resolve the linux-x64 runtime dependency instead of linuxmusl-x64. Fixed in dadd0c0 by adding a profile activated on copilot.native.libc=musl.

The latest run on a89ba27 (35282633254) is green, including Java SDK InProcess Tests (linuxmusl-x64), Java Native Publication Input (linuxmusl-x64), and Java Native Publication Assembly.

I also pushed 483adf4, which renames the Windows classifier jobs per your review comments.

Copilot AI commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

@copilot I observe a failure in the net-new workflow for this PR:

https://github.com/github/copilot-sdk/actions/runs/35281333643/job/105404197689?pr=2715...

The job log confirmed the missing linux-x64 runtime dependency on the Alpine runner. The in-process musl profile fix is in dadd0c0; the current branch includes it.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@edburns
edburns marked this pull request as ready for review September 18, 2026 20:54
@edburns
edburns requested a review from a team as a code owner September 18, 2026 20:54
Copilot AI and others added 7 commits September 18, 2026 21:00
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Parse the running Node executable's ELF interpreter and require the architecture-specific musl loader before packaging a musl classifier. Reject glibc, static, malformed, and otherwise unknown ELF hosts even when Node omits its glibc runtime report.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b30bdaec-2ebd-4d51-ab1e-4de5e43772cb
@edburns
edburns force-pushed the copilot/add-linuxmusl-x64-support branch from 4e07e4a to 1eb7948 Compare September 18, 2026 21:00
@github-actions

Copy link
Copy Markdown
Contributor

SDK Consistency Review

This PR is Java-only — all 12 changed files are under java/** or .github/workflows/java-* (verified via pull_request_read get_files/get_diff). No other language SDK code is touched.

What changed: Adds a linuxmusl-x64 native-runtime classifier/profile to the Java SDK (Maven native-linuxmusl-x64 profile in java/sdk/pom.xml, packaging/validation support in java/copilot-native/**, CI updates, and ADR-007 wording update).

Cross-SDK check: Node.js, Rust, .NET, and Python already support musl detection/packaging, and in fact already ship both linuxmusl-x64 and linuxmusl-arm64 (see nodejs/scripts/set-cli-version.js, rust/README.md, dotnet/src/build/GitHub.Copilot.SDK.targets, python/copilot/_cli_version.py). So this PR is a parity-improving step for Java rather than introducing a new inconsistency — it brings Java one step closer to the other SDKs' existing musl support.

Note for follow-up (non-blocking): Java still doesn't add a linuxmusl-arm64 classifier/profile, which the other four SDKs already support. The ADR text itself flags this as future work ("planned classifier set expands to the other detected platforms"), so this looks intentional/incremental rather than an oversight — just flagging it here in case a follow-up PR is expected soon for full parity.

No inline changes requested; no other SDKs need updates for this specific change.

Generated by SDK Consistency Review Agent for #2715 · copilot · sonnet50 · 27.1 AIC · ⌖ 11.5 AIC · ⊞ 7.8K ·

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 linuxmusl-x64

3 participants