Add GraalVM native-image support to azure-core-http-jdk-httpclient - #50165
Conversation
|
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. |
|
@microsoft-github-policy-service agree |
|
Thank you for your contribution Jeroen Benckhuijsen (@jfbenckhuijsen)! We will review the pull request and get back to you soon. |
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: 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 |
There was a problem hiding this comment.
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) forcom.azure.core.http.jdk.httpclient.JdkHttpClientProvider. - Added GraalVM runtime-initialization configuration (
native-image.properties) forJdkHttpClientProvider$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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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:
General Guidelines and Best Practices
Testing Guidelines