Skip to content

Add empty stdout fallback for az version in AzureCLIV3 and fix vulnerabilities#22003

Open
v-schhabra wants to merge 4 commits intomasterfrom
users/v-schhabra/Fix_azversion_FF
Open

Add empty stdout fallback for az version in AzureCLIV3 and fix vulnerabilities#22003
v-schhabra wants to merge 4 commits intomasterfrom
users/v-schhabra/Fix_azversion_FF

Conversation

@v-schhabra
Copy link
Copy Markdown
Contributor

@v-schhabra v-schhabra commented Apr 15, 2026

Context

The UseAzVersion feature flag enables running az version instead of az --version. An edge case was discovered where az version can succeed (exit code 0, no stderr) but return empty/null stdout, causing downstream version parsing to fail.

#21512
#21952


Task Name

AzureCLIV3

Description

  • Added empty stdout fallback for az version command — When the UseAzVersion feature flag is ON, added two additional checks to the fallback condition. If az version returns empty/null stdout, the task now gracefully falls back to az --version instead of failing during version parsing.
  • Updated azure-pipelines-tasks-artifacts-common from ^2.262.0 to ^2.270.0

Risk Assessment (Low / Medium / High)

Low
The code change is behind the UseAzVersion feature flag and only widens fallback conditions — existing path is unchanged.

Change Behind Feature Flag (Yes / No)

Yes
The code change is gated behind the UseAzVersion pipeline feature flag. When the flag is OFF, the new conditions are never evaluated.


Tech Design / Approach

No


Documentation Changes Required (Yes/No)

No


Unit Tests Added or Updated (Yes / No)

No


Additional Testing Performed

Uploaded task to private org using tfx-cli and did testing.


Logging Added/Updated (Yes/No)

No


Telemetry Added/Updated (Yes/No)

No


Rollback Scenario and Process (Yes/No)

In case of any issues we can disable the FF.


Checklist

  • Related issue linked (if applicable)
  • Task version was bumped — see versioning guide
  • Verified the task behaves as expected

@v-schhabra v-schhabra requested review from a team and manolerazvan as code owners April 15, 2026 10:15
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 3 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 3 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 3 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant