[BUG] Azure Java libs gets several dependencies creating conflicts #26846
Labels
Azure.Core
azure-core
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
dependency-issue
Issue that is caused by dependency conflicts
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
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.
The text was updated successfully, but these errors were encountered: