-
Notifications
You must be signed in to change notification settings - Fork 62
Java 3rd Party dependency conflict between Azure Function and Azure SDK for Java #365
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
The impact of this issue is that Java customers using Unified Java SDKs, like App Config, In the short term, we should update Azure Function and Azure Core dependencies to no longer have conflicting dependencies (which the issue @mssfang filed tracks). Afterwards, we should come up with a strategy for aligning our 3rd party dependencies to avoid regressing this scenario. |
@fabiocav Can you help us with this issue? |
The underlying problem is that the runtime classes of the azure functions worker pollutes classpath of the functions code. You should isolate the worker in its own classloader. |
Will there a fix for that soon? I have the same issue with gson. |
Moved this to the java repository for proper triage. @amamounelsayed can you please assist? |
isolate the worker in its own classloader? is that really the workaround? |
We are working on a proposal for this issue we will test it for java11. The objective is to have the client jar take presence over java worker jars. To upgrade java worker to the latest version of grpc we have tracking item to it, there is no ETA yet, #354 @mssfang the latest version is 1.29.0, correct? I see also there is version grpc-netty-shaded which we may explore too as this may avoid any netty issues in future. |
cc @anirudhgarg |
Can we make sure it also works in Java 8? This was originally seen with Java 8 Functions. |
@mrm9084 yes this is the plan but this the log term plan. I believe the first step will be upgrade grpc to 1.29.0 if this work with SDK Java instead of 1.28.0. Thank you so much |
Hi @amamounelsayed , thanks for the update. I don't want to push anything but this is currently a major problem in our situation as we cannot interact with any other Azure services (authenticated) in Azure Functions. My question would be; when can we expect this to be released (roughly)? This issue is here since February (looking at this issue), and it currently stops us from using Azure Functions. That seems dramatic maybe, but we are only able to use Python or Java and Python is not supported in Windows and only Windows has Vnet-integration (which is a must-have for us). Thanks in advance! |
@amamounelsayed Yes. They released a new version. So the latest is 1.29.0 |
Just wanted to let you know, turns out my problem is actually a conflict
between the netty version required by aws sdk and azure sdk.
So i was able to solve that by excluding the aws sdk netty dependencies.
Jim
…On Wed, May 6, 2020 at 3:39 PM amamounelsayed ***@***.***> wrote:
@mrm9084 <https://github.com/mrm9084> yes this is the plan but this the
log term plan.
I believe the first step will be upgrade grpc to 1.29.0 if this work with
SDK Java instead of 1.28.0.
Second we will explore the shaded version so by this way there is no netty
conflits.
Third work on the classloader proposal and test with java11.
Fourth add it to java8.
Thank you so much
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#365 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFC4EE63CQBDNWFB26WGLALRQHRKPANCNFSM4MXJBC4Q>
.
|
@JarroVGIT Thank you for your feed back, we will get back to you with ETA as soon as we can. |
When I tried to use WebClient to get oauth token, I got same issue. Here is my issue webclient |
@alzimmermsft can you share more details on the Azure SDK for Java Parent BOM file that Azure Functions Java Worker should take a dependency on to unify on standard 3rd party dependencies? |
Hi @mssfang We are working on this issue. Probably we are going to shaded package of the netty. |
@TsuyoshiUshio I don't think we have a version of azure-core-http-netty is using GRPC-netty 1.20.0. But @alzimmermsft can confirm that. |
I would recommend using the |
Thank you @alzimmermsft @mssfang @joshfree One of the proposed solution we are exploring is to use grpc-netty-shaded [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ azure-functions-java-worker --- |
@amamounelsayed the Azure SDKs under the The common dependencies that we will used are the following:
Netty and OkHttp depend on which HttpClient implementation package is being used, or neither is a custom implementation is being used. |
@amamounelsayed shading Grpc + it's dependencies linked to the function java worker seems a good option. I guess if we choose this path then you'll also need to "relocate" those conflicting dependencies (e.g. netty). If it helps, this comment has a downloadable sample showing how to do the relocation of dependencies - Azure/azure-sdk-for-java#11104 (comment) |
Technical Details
When using Azure Function and Azure SDK for Java simultaneously. It causes a dependency conflict.
For example, using Azure Function with App Configuration SDK for Java as dependencies in an independent app,
Expected behavior: running the application successfully.
Actual behavior: application crashed with unhandled exception,
More details of the exception can redirect to the Azure SDK for Java issue: Azure/azure-sdk-for-java#8392
Investigation
Azure Function
is usingGRPC-netty 1.20.0
which usingNetty 4.1.34.Final
. The latest version of GRPC-Netty is1.28.0
which using version4.1.45.Final
for both artifacts,netty-codec-http2
andnetty-handler-proxy
in the io.netty group.Azure SDK for Java
is usingNetty 4.1.44.Final
. (I am from Azure SDK for Java team, we are going to upgrade toNetty 4.1.45.Final
for above two artifacts,netty-codec-http2
andnetty-handler-proxy
in the 2020 April release, which is in the first week of April. See sectionDependencies
for more details on other artifacts of io.netty and version that we are going to use.).Proposal
Upgrade
GRPC-netty 1.20.0
to latest version1.28.0
will makeAzure Function
andAzure SDK for Java
dependency consistency because both SDKs are using the same Netty version4.1.45
then.Dependencies
AZURE FUNCTION dependency tree:
Azure SDK for Java dependency tree and the maven io.netty dependencies will be used in the upcoming April release.:
cc: @mrm9084
The text was updated successfully, but these errors were encountered: