Azure / azure-sdk-for-net

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

[BUG] Azure.Monitor.Query update of sovereign cloud was breaking but not announced as breaking #44412

Closed MarcoK80 closed 1 month ago

MarcoK80 commented 4 months ago

Library name and version

Azure.Monitor.Query

Describe the bug

Azure.Monitor.Query 1.3.0 had a change for the sovereign cloud which broke our use case for the China cloud.

We used the set of the sovereign cloud with the overload of the LogsQueryClient:

var client = new LogsQueryClient(new Uri(LogAnalyticsOptions.LogAnalyticsResourceId), credential)

After update from 1.2.0 to 1.3.1 this was still working but the end result caused a big issue in our China cloud as the LogsQueryClientOptions needs to be configured now and the previous overload is still there but has no functionality:

//
// Summary:
//     Creates an instance of Azure.Monitor.Query.LogsQueryClient for the Azure cloud
//     represented by endpoint.
//
// Parameters:
//   endpoint:
//     The service endpoint to use.
//
//   credential:
//     The Azure.Core.TokenCredential instance to use for authentication.
public LogsQueryClient(Uri endpoint, TokenCredential credential)
    : this(endpoint, credential, null)
{
}

This overload should be removed as it has no functionality anymore and then it breaks the builds and people get aware that you have a breaking change.

Expected behavior

Remove the Uri from LogsQueryClient as it has no functionality

Actual behavior

Providing a sovereign cloud via the Uri parameter is not working anymore

Reproduction Steps

see above

Environment

No response

github-actions[bot] commented 4 months ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.

nisha-bhatia commented 3 months ago

Thank you for pointing this out @MarcoK80. I will address it soon.