Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Configure unix socket library for Graalvm #1961

Merged
merged 2 commits into from
May 1, 2024
Merged

Conversation

hessjcg
Copy link
Collaborator

@hessjcg hessjcg commented Apr 24, 2024

This is a fix for the graalvm configuration issues related to the jnr.unixsocket library.

  • The proxy classes are now being properly configured for reflection and dynamic proxy.
  • Native library files that are usually loaded as resources from jffi-1.3.13-native.jar are included in the build.

Fixes #1940

@hessjcg hessjcg force-pushed the gh-1940-graalvm-config branch from 1009cc4 to a8977cc Compare April 30, 2024 17:08
@hessjcg hessjcg changed the base branch from main to gh-1940-unix-socket-integration-test April 30, 2024 17:26
@hessjcg hessjcg marked this pull request as ready for review April 30, 2024 17:26
@hessjcg hessjcg requested a review from a team as a code owner April 30, 2024 17:26
Copy link
Member

@enocom enocom left a comment

Choose a reason for hiding this comment

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

Is this a "partial" fix of the linked issue? Or a complete fix?

@hessjcg
Copy link
Collaborator Author

hessjcg commented Apr 30, 2024

This is a complete fix. I've updated the comment.

@enocom
Copy link
Member

enocom commented Apr 30, 2024

cc @mpeddada1 as FYI

@hessjcg hessjcg changed the base branch from gh-1940-unix-socket-integration-test to main May 1, 2024 15:01
@hessjcg hessjcg merged commit e054059 into main May 1, 2024
30 checks passed
@hessjcg hessjcg deleted the gh-1940-graalvm-config branch May 1, 2024 15:05
Comment on lines +5 to +7
-H:ReflectionConfigurationResources=META-INF/native-image/com.google.cloud.sql/cloud-sql-jdbc-socket-factory-parent/jni-unix-socket-config.json \
-H:ResourceConfigurationResources=META-INF/native-image/com.google.cloud.sql/cloud-sql-jdbc-socket-factory-parent/resource-config.json \
-H:DynamicProxyConfigurationResources=META-INF/native-image/com.google.cloud.sql/cloud-sql-jdbc-socket-factory-parent/proxy-config.json \
Copy link
Contributor

Choose a reason for hiding this comment

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

optional q: I wonder if we need to specify these JSONs in native-image.properties? The compiler automatically picks up config files under the META-INF/native-image directory if the files follow a standard naming pattern (link)

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.

support jdbc connection with unix domain socket in native image
4 participants