Skip to content

[release/v7.4.20] Use Azure CLI for early-access feed token - #27954

Merged
Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:release/v7.4.20from
adityapatwardhan:backport/release/v7.4.20/27849-174a75396
Sep 2, 2026
Merged

Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:release/v7.4.20from
adityapatwardhan:backport/release/v7.4.20/27849-174a75396

Conversation

@adityapatwardhan

Copy link
Copy Markdown
Member

Backport of #27849 to release/v7.4.20

Triggered by Aditya Patwardhan (@adityapatwardhan) on behalf of Justin Chung (@jshigetomi)

Original CL Label: CL-BuildPackaging

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Required pipeline fix for SDK validation: acquire the early-access Azure DevOps feed token with AzureCLI@2 so Linux agents do not depend on a preinstalled Az.Accounts module, and fail explicitly when token acquisition fails.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Original change was motivated by Linux SDK validation build 707180 failing before its inline script while equivalent Windows and macOS jobs succeeded. On release/v7.4.20, the merge commit cherry-picked without conflicts; the target-relative diff was reviewed to contain only the intended pipeline-template change, and git diff --check passed. End-to-end service-connection and token acquisition behavior requires backport PR CI.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

High risk because this changes the authenticated token-acquisition task used by SDK validation across platforms. The change is narrowly scoped to one pipeline template, preserves the existing service connection and token secret handling, adds explicit failure handling, and has already been merged and used on newer branches; PR CI remains required.

Co-authored-by: Justin Chung <[email protected]>
Copilot-Session: 8784f802-9d66-4692-b64d-c0713fa213cb
Copilot AI lite review requested due to automatic review settings September 2, 2026 22:55
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Sep 2, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is narrowly scoped to the intended template step, aligns with the PR’s stated motivation, and includes explicit error handling for failed token acquisition.

Pull request overview

Backports the pipeline-template change from #27849 to release/v7.4.20 to acquire the early-access Azure DevOps feed token using AzureCLI@2, removing the Linux dependency on a preinstalled Az.Accounts module and adding explicit failure when token acquisition returns no token.

Changes:

  • Replaces AzurePowerShell@5 (Get-AzAccessToken) with AzureCLI@2 (az account get-access-token) for Azure DevOps token acquisition.
  • Adds an explicit guard that throws when az fails or returns an empty/whitespace token.
File summaries
File Description
.pipelines/templates/insert-nuget-config-azfeed.yml Switches token acquisition to Azure CLI and adds explicit failure handling for early-access feed authentication.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit fc6a874 into PowerShell:release/v7.4.20 Sep 2, 2026
36 checks passed
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) deleted the backport/release/v7.4.20/27849-174a75396 branch September 2, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants