[BUG] Creation of ImageReference results in NullReferenceException #45989
Labels
Batch
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.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
Library name and version
Microsoft.Azure.Batch (v 16.3.0)
Describe the bug
Creation of an Azure Batch Pool programmatically fails when the setup of VirtualMachineConfiguration is created.
Calling this line fails in v 16.3.0 and is successful in v 16.2.0
return new ImageReference(
"0001-com-ubuntu-server-jammy",
"canonical",
"22_04-lts",
"latest");
Confirmed the image is available.
Expected behavior
ImageReference successfully created
Actual behavior
NullReferenceException raised here
Microsoft.Azure.Batch.dll!Microsoft.Azure.Batch.ImageReference.Offer.set(string value)
Microsoft.Azure.Batch.dll!Microsoft.Azure.Batch.ImageReference.ImageReference(string offer, string publisher, string sku, string version)
Reproduction Steps
Creation of an Azure Batch Pool programmatically fails when the setup of VirtualMachineConfiguration is created.
Calling this line fails in v 16.3.0 and is successful in v 16.2.0
return new ImageReference(
"0001-com-ubuntu-server-jammy",
"canonical",
"22_04-lts",
"latest");
Confirmed the image is available.
Environment
Azure Batch pool created via a C# Azure Function
The text was updated successfully, but these errors were encountered: