Skip to content

Add GraalVM native-image support to azure-core-http-jdk-httpclient - #50165

Open
Jeroen Benckhuijsen (jfbenckhuijsen) wants to merge 3 commits into
Azure:mainfrom
jfbenckhuijsen:fix/jdk-httpclient-native-image-metadata
Open

Add GraalVM native-image support to azure-core-http-jdk-httpclient#50165
Jeroen Benckhuijsen (jfbenckhuijsen) wants to merge 3 commits into
Azure:mainfrom
jfbenckhuijsen:fix/jdk-httpclient-native-image-metadata

Conversation

@jfbenckhuijsen

@jfbenckhuijsen Jeroen Benckhuijsen (jfbenckhuijsen) commented Aug 17, 2026

Copy link
Copy Markdown

Description

Adds native compilation (graal) info to the azure-core-http-jdk-httpclient module, which was lacking these settings. The settings were mirrored from the netty version which had these changes. Correct behavior was validated in a external app empirically.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes. (netty package also seems to lack explicit tests for native compilation as far as I can see)

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
31 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@jfbenckhuijsen

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@github-actions github-actions Bot added Azure.Core azure-core Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution Jeroen Benckhuijsen (@jfbenckhuijsen)! We will review the pull request and get back to you soon.

Copilot AI commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Install azsdk mcp server

Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.

Note

You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.

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

This PR adds GraalVM native-image metadata to azure-core-http-jdk-httpclient so the JDK-based HttpClientProvider can be discovered/initialized correctly when building and running as a native image, aligning behavior with the existing azure-core-http-netty module.

Changes:

  • Added GraalVM reflection metadata (reflect-config.json) for com.azure.core.http.jdk.httpclient.JdkHttpClientProvider.
  • Added GraalVM runtime-initialization configuration (native-image.properties) for JdkHttpClientProvider$GlobalJdkAsyncHttpClient.
  • Documented the change in the module CHANGELOG.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
sdk/core/azure-core-http-jdk-httpclient/src/main/resources/META-INF/native-image/com.azure/azure-core-http-jdk-httpclient/reflect-config.json Adds reflection configuration to support native-image execution.
sdk/core/azure-core-http-jdk-httpclient/src/main/resources/META-INF/native-image/com.azure/azure-core-http-jdk-httpclient/native-image.properties Ensures the shared HTTP client holder initializes at runtime under native-image.
sdk/core/azure-core-http-jdk-httpclient/CHANGELOG.md Notes the native-image support addition in the Unreleased section.

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

Comment thread sdk/core/azure-core-http-jdk-httpclient/CHANGELOG.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Core azure-core Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants