Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.35k stars 1.99k forks source link

[BUG] Azure SDK BOM missing msal4j and azure-core-tracing-opentelemetry #36182

Open AndreasPetersen opened 1 year ago

AndreasPetersen commented 1 year ago

Describe the bug The Azure SDK BOM is missing:

Exception or Stack Trace None

To Reproduce See description

Code Snippet None

Expected behavior Azure SDK BOM should include:

Screenshots If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError, NoSuchMethodError or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:

Additional context None Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

alzimmermsft commented 1 year ago

Hi @AndreasPetersen,

Thank you for asking this question.

At this time the only libraries included in azure-sdk-bom are GA'd Azure SDK libraries in the com.azure group: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/boms/azure-sdk-bom#overview

Once azure-core-tracing-opentelemetry goes GA we'll include it in azure-sdk-bom. As for msal4j at this time it will never be included into azure-sdk-bom as it isn't in the com.azure group.

FYI @lmolkova

AndreasPetersen commented 1 year ago

Regarding msal4j, that's unfortunate. What's the difference between com.azure and com.microsoft.azure?

lmolkova commented 1 year ago

@AndreasPetersen we're planning to GA azure-core-tracing-opentelemetry by the end of this year (and then include it in the BOM).

Would you mind sharing a bit more on this:

since some features like disabling tracing for certain clients, will simply fail silently with no errors.

Do you mean that not all clients respect configuration applied to TracingOptions?

alzimmermsft commented 1 year ago

@AndreasPetersen the most common difference between com.azure and com.microsoft.azure libraries is the guidelines of development they follow. com.azure libraries are what we, the SDK team, will commonly refer to as "Track 2" and follow the Java SDK development guidelines and have more restrictions around which dependencies they can include to provide a smoother customer experience. com.microsoft.azure libraries are what we will commonly refer to as "Track 1" and don't follow those guidelines and will commonly have different dependencies being used (ex some may use Jackson, some may use GSON for JSON serialization, they may use different HTTP stacks, etc). com.azure libraries are what we recommend to use at this time and are why only those libraries are included in azure-sdk-bom.

AndreasPetersen commented 1 year ago

@AndreasPetersen we're planning to GA azure-core-tracing-opentelemetry by the end of this year (and then include it in the BOM).

Would you mind sharing a bit more on this:

since some features like disabling tracing for certain clients, will simply fail silently with no errors.

Do you mean that not all clients respect configuration applied to TracingOptions?

Yes. I was using the Quarkus BOM which was downgrading certain azure dependencies, which resulted in the TracingOptions not being respected by the Azure Service Bus Async reciever. I had disabled tracing, but tracing was still being done. There were no errors in the logs. Using the correct version of the BOM with the correct version of the tracing dependency in my service resolved the issue, but took a few tries to find the correct Azure SDK BOM version.