Closed purijatin closed 8 months ago
Thank you so much for sharing this, @purijatin. @pallavit could you follow up with @purijatin on the challenges and suggestions above?
I agree. Azure Java libs are a pain in large projects. Frustrating to use.
We are also seeing major issues caused by this, and Netty is often the culprit.
Is there some resolution? I am trying to use the Azure libs for Java to use Event Hubs Schema Registry but after hours of various versions of a handful of azure libraries it always ends in a failed Maven build (Stack Overflow error). It seems like there is some endless dependency recursion.
Hi @purijatin, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.
Describe the bug
I find Azure SDK Java libs pretty demanding. It has been a constant pain point.
In a larger project, the role of Azure-SDK is not core to what one is trying to build. But quite often it plays a spoilt-sport in creating conflicts, as it brings along several dependencies.
Let's say when we pull in:
azure-identity
, you can look at the number of dependencies it gets along: https://mvnrepository.com/artifact/com.azure/azure-identity/1.4.3 . It fetches 30+ dependencies to include some popular ones like Netty (and family), Jackson, Guava. These are pretty well-known libraries and usually create conflicts.This makes us force-fit the above libs versions in our app, to be compatible against what Azure java libs get. And sometimes it is not feasible.
I understand Azure-SDK has tried mitigating problems by releasing BOM. BOM resolves issues within azure's own jars. But in a larger project, where similar dependencies are also fetched, it becomes really difficult to resolve conflicts (particularly netty and jackson related ones). Some of these issues would not have occurred if these dependencies weren't used (Simple ones like Guava, to begin with, are completely avoidable). In fact, Azure's own libs are not very compatible with each other (check references).
Let's do a comparison against AWS.
attached is dependency tree for both (dependencyList.txt)
Suggestion: Minimize external dependencies. Make it lean. Get rid of Netty/jackson and use something else instead. It will increase the adoption.
References:
Some of the challenges that we have faced with Azure Java Libs:
io.netty.handler.ssl.SslProvider
can be found atnetty-all-4.1.51.Final.jar
andTokenLibrary-assembly-1.0.jar
. Both are available at runtime, so there is nothing we can doazure-analytics-synapse-spark
is neither compatible withazure-sdk-bom
1.0.6 nor 1.1.0.Common cause in some of the conflicts above: Netty.