Sad Tux - Windows bias detected
This page contains Windows bias

About This Page

This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.

Bias Analysis

Detected Bias Types
windows_first
missing_linux_example
windows_tools
Summary
The documentation page demonstrates Windows bias by providing only a C# SDK example that uses a Windows VM image (MicrosoftWindowsServer) and a Windows node agent SKU. There are no equivalent examples for Linux VM images, Linux node agent SKUs, or usage of Linux-specific tools. The only concrete code sample is Windows-centric, and Linux alternatives are neither mentioned nor demonstrated.
Recommendations
  • Add equivalent examples for updating a pool with a Linux VM image (e.g., Ubuntu or CentOS) and the corresponding Linux node agent SKU in both C# and REST API sections.
  • Explicitly mention Linux VM image options alongside Windows in descriptive text and code comments.
  • Provide at least one example using a Linux-based tool or scripting environment (e.g., Azure CLI on Linux, Bash scripting) to update pool properties.
  • Ensure that documentation references to VM images and node agent SKUs include both Windows and Linux options equally.
  • Review all code snippets and ensure parity between Windows and Linux scenarios, including authentication and environment variable handling where relevant.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-01-13 06:17 #107 completed Biased Biased
2026-01-12 00:00 #99 completed Biased Biased
2026-01-11 06:20 #98 completed Biased Biased
2026-01-10 00:00 #92 completed Clean Clean
2026-01-06 22:28 #78 completed Clean Clean
2025-12-29 18:00 #48 cancelled Biased Biased
2025-12-15 00:00 #7 completed Clean Clean
2025-12-14 05:05 #6 completed Clean Clean

Flagged Code Snippets

public async Task UpdatePoolVmImage()
{
     // Authenticate
     var clientId = Environment.GetEnvironmentVariable("CLIENT_ID");
     var clientSecret = Environment.GetEnvironmentVariable("CLIENT_SECRET");
     var tenantId = Environment.GetEnvironmentVariable("TENANT_ID");
     var subscriptionId = Environment.GetEnvironmentVariable("SUBSCRIPTION_ID");
     ClientSecretCredential credential = new ClientSecretCredential(tenantId, clientId, clientSecret);
     ArmClient client = new ArmClient(credential, subscriptionId);

     // Get an existing Batch account
     string resourceGroupName = "<resourcegroup>";
     string accountName = "<batchaccount>";
     ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
     BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);

     // get the collection of this BatchAccountPoolResource
     BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();

     // Update the pool
     string poolName = "mypool";
     BatchAccountPoolData data = new BatchAccountPoolData()
     {
         DeploymentConfiguration = new BatchDeploymentConfiguration()
         {
             VmConfiguration = new BatchVmConfiguration(new BatchImageReference()
             {
                 Publisher = "MicrosoftWindowsServer",
                 Offer = "WindowsServer",
                 Sku = "2022-datacenter-azure-edition-smalldisk",
                 Version = "latest",
             },
             nodeAgentSkuId: "batch.node.windows amd64"),
         },
     };

     ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
     BatchAccountPoolResource result = lro.Value;

     BatchAccountPoolData resourceData = result.Data;
     Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}