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

Bias Types:
⚠️ windows_first
⚠️ missing_linux_example
⚠️ windows_tools
Summary:
The documentation page demonstrates a Windows bias by exclusively providing examples for Windows-based pools (e.g., using MicrosoftWindowsServer images and Windows-specific nodeAgentSKUId), referencing Windows-specific configuration properties (such as windowsConfiguration.enableAutomaticUpdates), and omitting any Linux-based pool configuration or examples. There are no Linux image references, node agent SKUs, or Linux-specific configuration guidance, which may mislead users into thinking Auto OS Upgrade is only for Windows pools or make it harder for Linux users to adopt the feature.
Recommendations:
  • Add parallel examples for Linux-based pools in both REST API and SDK sections, using a popular Linux image (e.g., Ubuntu) and the appropriate nodeAgentSKUId (e.g., batch.node.ubuntu 20.04).
  • Include Linux-specific configuration properties and clarify any differences in upgrade behavior or requirements for Linux pools.
  • In the requirements section, mention both Windows and Linux configuration properties (e.g., clarify that windowsConfiguration.enableAutomaticUpdates is not relevant for Linux, and note any Linux equivalents if applicable).
  • In all code and JSON samples, provide both Windows and Linux variants, or at least alternate between them to ensure parity.
  • Explicitly state that Auto OS Upgrade is supported for both Windows and Linux pools (if true), and link to documentation listing supported Linux images.
GitHub Create pull request

Scan History

Date Scan ID Status Bias Status
2025-08-17 00:01 #83 in_progress ✅ Clean
2025-07-13 21:37 #48 completed ❌ Biased
2025-07-09 13:09 #3 cancelled ✅ Clean
2025-07-08 04:23 #2 cancelled ❌ Biased

Flagged Code Snippets

{ "name": "test1", "type": "Microsoft.Batch/batchAccounts/pools", "parameters": { "properties": { "vmSize": "Standard_d4s_v3", "deploymentConfiguration": { "virtualMachineConfiguration": { "imageReference": { "publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", "sku": "2019-datacenter-smalldisk", "version": "latest" }, "nodePlacementConfiguration": { "policy": "Zonal" }, "nodeAgentSKUId": "batch.node.windows amd64", "windowsConfiguration": { "enableAutomaticUpdates": false } } }, "scaleSettings": { "fixedScale": { "targetDedicatedNodes": 2, "targetLowPriorityNodes": 0 } }, "upgradePolicy": { "mode": "Automatic", "automaticOSUpgradePolicy": { "disableAutomaticRollback": true, "enableAutomaticOSUpgrade": true, "useRollingUpgradePolicy": true, "osRollingUpgradeDeferral": true }, "rollingUpgradePolicy": { "enableCrossZoneUpgrade": true, "maxBatchInstancePercent": 20, "maxUnhealthyInstancePercent": 20, "maxUnhealthyUpgradedInstancePercent": 20, "pauseTimeBetweenBatches": "PT0S", "prioritizeUnhealthyInstances": false, "rollbackFailedInstancesOnPolicyBreach": false } } } } }
public async Task CreateUpgradePolicyPool() { // 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 = "testrg"; string accountName = "testaccount"; ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId); // get the collection of this BatchAccountPoolResource BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools(); // Define the pool string poolName = "testpool"; BatchAccountPoolData data = new BatchAccountPoolData() { VmSize = "Standard_d4s_v3", DeploymentConfiguration = new BatchDeploymentConfiguration() { VmConfiguration = new BatchVmConfiguration(new BatchImageReference() { Publisher = "MicrosoftWindowsServer", Offer = "WindowsServer", Sku = "2019-datacenter-smalldisk", Version = "latest", }, nodeAgentSkuId: "batch.node.windows amd64") { NodePlacementPolicy = BatchNodePlacementPolicyType.Zonal, IsAutomaticUpdateEnabled = false }, }, ScaleSettings = new BatchAccountPoolScaleSettings() { FixedScale = new BatchAccountFixedScaleSettings() { TargetDedicatedNodes = 2, TargetLowPriorityNodes = 0, }, }, UpgradePolicy = new UpgradePolicy() { Mode = UpgradeMode.Automatic, AutomaticOSUpgradePolicy = new AutomaticOSUpgradePolicy() { DisableAutomaticRollback = true, EnableAutomaticOSUpgrade = true, UseRollingUpgradePolicy = true, OSRollingUpgradeDeferral = true }, RollingUpgradePolicy = new RollingUpgradePolicy() { EnableCrossZoneUpgrade = true, MaxBatchInstancePercent = 20, MaxUnhealthyInstancePercent = 20, MaxUnhealthyUpgradedInstancePercent = 20, PauseTimeBetweenBatches = "PT0S", PrioritizeUnhealthyInstances = false, RollbackFailedInstancesOnPolicyBreach = false, } } }; ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data); BatchAccountPoolResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance BatchAccountPoolData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); }