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

Remove azure-identity IdentityClientBase runtime initialization native configuration #4356

Closed
JiriOndrusek opened this issue Dec 22, 2022 · 2 comments
Assignees
Milestone

Comments

@JiriOndrusek
Copy link
Contributor

JiriOndrusek commented Dec 22, 2022

After upgrade of azure-identity to 1.7.0, native build of extension azure-eventhubs and azure-storage-blob fails with

 org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected.

Problem is caused by this line of code.

Workaround - disabled native build for azure-eventhubs, azure-storage-blob and azure-grouped test.

With proper fix, please enable native profiles again.

@ppalaga
Copy link
Contributor

ppalaga commented Dec 31, 2022

In azure-identity 1.7.0, they moved the RANDOM field from com.azure.identity.implementation.IdentityClient to com.azure.identity.implementation.IdentityClientBase. I guess we need to produce a RuntimeInitializedClassBuildItem for IdentityClientBase in AzureStorageBlobProcessor.

Anyway, I have filed Azure/azure-sdk-for-java#32744 . Let's see whether Azure SDK team is willing to stop instantiating java.util.Random in the static initializer.

jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Jan 4, 2023
@jamesnetherton jamesnetherton changed the title [Camel 3.20] Azure-eventhubs and azure-storage-queues are disabled in native because of azure upgrade Remove azure-identity IdentityClientBase runtime initialization native configuration Jan 5, 2023
@jamesnetherton
Copy link
Contributor

I registered IdentityClientBase for runtime initialization in 09d9d4d and restored the native testing.

Looks like Azure/azure-sdk-for-java#32744 is fixed already. So we can revert the change when we upgrade to the next azure-identity release.

@jamesnetherton jamesnetherton self-assigned this Jan 20, 2023
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Mar 17, 2023
@ppalaga ppalaga added this to the 3.0.0-M2 milestone May 25, 2023
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

No branches or pull requests

3 participants