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

[BUG] Azure Java libs gets several dependencies creating conflicts #26846

Closed
purijatin opened this issue Feb 3, 2022 · 5 comments
Closed

[BUG] Azure Java libs gets several dependencies creating conflicts #26846

purijatin opened this issue Feb 3, 2022 · 5 comments
Assignees
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

Comments

@purijatin
Copy link

purijatin commented Feb 3, 2022

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.

Name Number of Dependencies
aws-java-sdk-core 11
azure-storage-blob 31

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:

  1. [BUG] Jackson issues with Azure SDK when run on Azure Synapse Analytics #25734 (comment)
  2. Synapse due to netty conflicts because of its own dependency. io.netty.handler.ssl.SslProvider can be found at netty-all-4.1.51.Final.jar and TokenLibrary-assembly-1.0.jar . Both are available at runtime, so there is nothing we can do
  3. Synapse Runtime is not compatible with several azure libs like EventGrid etc.
  4. Cases where azure-analytics-synapse-spark is neither compatible with azure-sdk-bom 1.0.6​ nor 1.1.0​.
  5. Guava and azure-core-http-netty conflicts here: https://stackoverflow.com/a/70738201/894565

Common cause in some of the conflicts above: Netty.

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 3, 2022
@joshfree joshfree added Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. dependency-issue Issue that is caused by dependency conflicts labels Feb 4, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 4, 2022
@joshfree
Copy link
Member

joshfree commented Feb 4, 2022

Thank you so much for sharing this, @purijatin. @pallavit could you follow up with @purijatin on the challenges and suggestions above?

@rajmadhu
Copy link

rajmadhu commented Feb 5, 2022

I agree. Azure Java libs are a pain in large projects. Frustrating to use.

@tinolazreg
Copy link

We are also seeing major issues caused by this, and Netty is often the culprit.

@pallavit pallavit removed their assignment Nov 16, 2022
@troyhofeling
Copy link

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.

Copy link

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.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
Status: Done
Development

No branches or pull requests

7 participants