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 a Windows bias by exclusively providing Windows command-line examples (using 'cmd /c', Windows environment variables, and Windows file paths), referencing Windows tools and patterns, and omitting any Linux or cross-platform equivalents. The code samples and output use Windows-style paths and commands, with no mention of Bash, Linux shell scripting, or POSIX environment variables. This may hinder Linux users from easily adapting the guidance to their environment.
Recommendations
  • Provide equivalent Linux/Bash command-line examples alongside Windows examples, using Bash syntax, Linux environment variables, and POSIX file paths.
  • Clearly indicate cross-platform support for job preparation and release tasks, and document any platform-specific considerations.
  • Update code samples to show how to specify command lines for both Windows and Linux nodes, possibly using conditional logic or configuration.
  • Include sample output using Linux-style paths and commands to illustrate parity.
  • Reference Linux tools (e.g., 'rm', 'echo', shell scripts) and patterns where appropriate, and avoid assuming Windows as the default platform.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-01-25 00:00 #165 completed Clean Clean
2026-01-24 00:00 #161 completed Clean Clean
2026-01-23 00:00 #157 completed Clean Clean
2026-01-12 00:00 #99 completed Clean Clean
2026-01-11 06:20 #98 completed Clean Clean
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

// Create the CloudJob for CloudPool "myPool"
CloudJob myJob =
    myBatchClient.JobOperations.CreateJob(
        "JobPrepReleaseSampleJob",
        new PoolInformation() { PoolId = "myPool" });

// Specify the command lines for the job preparation and release tasks
string jobPrepCmdLine =
    "cmd /c echo %AZ_BATCH_NODE_ID% > %AZ_BATCH_NODE_SHARED_DIR%\\shared_file.txt";
string jobReleaseCmdLine =
    "cmd /c del %AZ_BATCH_NODE_SHARED_DIR%\\shared_file.txt";

// Assign the job preparation task to the job
myJob.JobPreparationTask =
    new JobPreparationTask { CommandLine = jobPrepCmdLine };

// Assign the job release task to the job
myJob.JobReleaseTask =
    new JobReleaseTask { CommandLine = jobReleaseCmdLine };

await myJob.CommitAsync();
Attempting to create pool: JobPrepReleaseSamplePool
Created pool JobPrepReleaseSamplePool with 2 nodes
Checking for existing job JobPrepReleaseSampleJob...
Job JobPrepReleaseSampleJob not found, creating...
Submitting tasks and awaiting completion...
All tasks completed.

Contents of shared\job_prep_and_release.txt on tvm-2434664350_1-20160623t173951z:
-------------------------------------------
tvm-2434664350_1-20160623t173951z tasks:
  task001
  task004
  task005
  task006

Contents of shared\job_prep_and_release.txt on tvm-2434664350_2-20160623t173951z:
-------------------------------------------
tvm-2434664350_2-20160623t173951z tasks:
  task008
  task002
  task003
  task007

Waiting for job JobPrepReleaseSampleJob to reach state Completed
...

tvm-2434664350_1-20160623t173951z:
  Prep task exit code:    0
  Release task exit code: 0

tvm-2434664350_2-20160623t173951z:
  Prep task exit code:    0
  Release task exit code: 0

Delete job? [yes] no
yes
Delete pool? [yes] no
yes

Sample complete, hit ENTER to exit...