Skip to content

Add Java linuxmusl-x64 native classifier support - #2715

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

edburns with Copilot wants to merge 6 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
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
@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.

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

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.

Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
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 on lines +14 to +19
if (host.glibcVersionRuntime) {
throw new Error(
`Native ${classifier} packaging requires musl; detected glibc ${host.glibcVersionRuntime}`,
);
}
return `Validated native build host: ${classifier} (musl)`;

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
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>

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.

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

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

Copy link
Copy Markdown
Contributor

SDK Consistency Review

I reviewed the changed files in this PR against the cross-SDK consistency criteria.

Files changed:

  • .github/workflows/java-publish-maven.yml
  • .github/workflows/java-publish-snapshot.yml
  • .github/workflows/java-sdk-tests.yml
  • java/README.md
  • java/copilot-native/pom.xml
  • java/copilot-native/scripts/fetch-native.test.mjs
  • java/copilot-native/scripts/validate-local-publication.mjs
  • java/copilot-native/scripts/validate-native-artifact.test.mjs
  • java/copilot-native/scripts/validate-native-host.mjs
  • java/copilot-native/scripts/validate-native-host.test.mjs
  • java/docs/adr/adr-007-native-bundling-strategy.md
  • java/sdk/pom.xml

Finding: No cross-SDK consistency issues.

This PR adds a new linuxmusl-x64 native classifier (Alpine/musl libc support) to the Java SDK's native packaging and release pipeline (CI workflows, copilot-native build scripts, Maven classifier wiring, and the corresponding ADR). It does not touch any public SDK client API surface — no changes appear in java/sdk/src/main/java/, nodejs/src/, python/copilot/, go/, dotnet/src/, or rust/src/.

This is Java-specific native-binary packaging infrastructure (analogous to platform-specific native artifact distribution), not an SDK feature/API change that needs to be mirrored in other languages. No inconsistency to flag.

Generated by SDK Consistency Review Agent for #2715 · copilot · sonnet50 · 25 AIC · ⌖ 14.8 AIC · ⊞ 8.3K ·

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