-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
MgmtThis issue is related to a management package.This issue is related to a management package.MonitorMonitor, Monitor Ingestion, Monitor QueryMonitor, Monitor Ingestion, Monitor QueryService AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Library name and version
Azure.ResourceManager.OperationalInsights 1.0.0
Describe the bug
In some regions (e.g. East US) retrieving Operational Insights Workspaces throws:
System.FormatException: One of the identified items was in an invalid format.
at System.Text.Json.ThrowHelper.ThrowFormatException()
at System.Text.Json.JsonElement.GetDateTimeOffset()
at Azure.ResourceManager.OperationalInsights.Models.OperationalInsightsWorkspaceSku.DeserializeOperationalInsightsWorkspaceSku(JsonElement element)
at Azure.ResourceManager.OperationalInsights.OperationalInsightsWorkspaceData.DeserializeOperationalInsightsWorkspaceData(JsonElement element)
at Azure.ResourceManager.OperationalInsights.WorkspacesRestOperations.GetAsync(String subscriptionId, String resourceGroupName, String workspaceName, CancellationToken cancellationToken)
at Azure.ResourceManager.OperationalInsights.OperationalInsightsWorkspaceCollection.GetAsync(String workspaceName, CancellationToken cancellationToken)
at Azure.ResourceManager.OperationalInsights.OperationalInsightsExtensions.GetOperationalInsightsWorkspaceAsync(ResourceGroupResource resourceGroupResource, String workspaceName, CancellationToken cancellationToken)
However in Australia East it works fine.
I've traced the code and it looks like it the API returns:
{ "name": "pergb2018", "lastSkuUpdate": "Tue, 17 Jan 2023 06:33:30 GMT" }
Which can't be parsed as it expects an ISO formatted date
Expected behavior
The date is parsed correctly and the workspace is retrieved
Actual behavior
An exception is thrown
Reproduction Steps
var client = new ArmClient(new DefaultAzureCredential());
var subscription = client.GetSubscriptionResource(SubscriptionResource.CreateResourceIdentifier(subscriptionId));
var resourceGroup = subscription.GetResourceGroups().CreateOrUpdate(WaitUntil.Completed, "repro", new ResourceGroupData("East US"));
var workspace = resourceGroup.Value.GetOperationalInsightsWorkspaces().CreateOrUpdate(WaitUntil.Completed, "repro", new OperationalInsightsWorkspaceData("East US"));
resourceGroup.Value.GetOperationalInsightsWorkspace("repro");
Environment
No response
waldyhester
Metadata
Metadata
Assignees
Labels
MgmtThis issue is related to a management package.This issue is related to a management package.MonitorMonitor, Monitor Ingestion, Monitor QueryMonitor, Monitor Ingestion, Monitor QueryService AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that