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.47k stars 4.8k forks source link

[BUG] Get latest rolling upgrade status of VMSS failed with System.ArgumentNullException: Value cannot be null. (Parameter 'id') #45613

Open sjtufl opened 2 months ago

sjtufl commented 2 months ago

Library name and version

Azure.ResourceManager.Compute 1.5.0

Describe the bug

Use VirtualMachineScaleSetRollingUpgradeResource.GetLatest() to fetch latest rolling upgrade status of a VMSS will always fail with the exception below:

System.ArgumentNullException: Value cannot be null. (Parameter 'id')
   at Azure.ResourceManager.ArmResource..ctor(ArmClient client, ResourceIdentifier id)
   at Azure.ResourceManager.Compute.VirtualMachineScaleSetRollingUpgradeResource..ctor(ArmClient client, ResourceIdentifier id)
   at Azure.ResourceManager.Compute.VirtualMachineScaleSetRollingUpgradeResource.GetAsync(CancellationToken cancellationToken)

Expected behavior

Successful response with VirtualMachineScaleSetRollingUpgradeData in the body.

Actual behavior

Exception is thrown.

Reproduction Steps

Assume vmss is of VirtualMachineScaleSetResource type,

var getRollingUpgradeResult = await vmss.GetVirtualMachineScaleSetRollingUpgrade().GetAsync();

Environment

.NET SDK: Version: 8.0.400

Runtime Environment: OS Name: Windows

github-actions[bot] commented 2 months ago

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