Skip to content

Remove ARM64 special handling from install-dotnet pipeline template#4442

Merged
paulmedynski merged 1 commit into
mainfrom
dev/paul/install-dotnet-arm64
Jul 14, 2026
Merged

Remove ARM64 special handling from install-dotnet pipeline template#4442
paulmedynski merged 1 commit into
mainfrom
dev/paul/install-dotnet-arm64

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Description

The UseDotNet@2 task historically installed the x86 build on Windows ARM64 hosts because it detected the architecture from the x86 pipeline agent's PROCESSOR_ARCHITECTURE. To work around this, our install-dotnet.yml template forked to a custom install-dotnet-arm64.ps1 script for ARM64.

That bug is now fixed: UseDotNet@2 v271+ correctly detects win-arm64 and installs the matching SDK/runtime (see azure-pipelines-tasks#20300, fixed by #21801). We no longer need the workaround.

Changes (engineering/CI only — no product code or API changes):

  • install-dotnet.yml — Removed the ARM64 branch and the custom PowerShell@2 installer step. A single UseDotNet@2 path now handles all architectures (ARM64 auto-detected). Replaced the architecture enum (x64/x86/arm64) with a forceX86 boolean, since forcing an x86 cross-install was the only remaining behavior the parameter controlled.
  • Deleted install-dotnet-arm64.ps1 — no longer referenced.
  • ci-run-tests-job.yml — Always passes runtimes in the UseDotNet@2 version format ([8.x, 9.x]); removed the now-unused isArm64 parameter; the x86 test install now uses forceX86: true.
  • ci-run-tests-stage.yml — Removed the isArm64 passthroughs.
  • dotnet-sqlclient-ci-core.yml — Removed isArm64: true from the windows_azure_arm64_sql matrix entry (the ARM64 agent is still selected via pool/images).

Net: 5 files changed, ~390 lines removed.

Issues

Relates to the upstream fix in microsoft/azure-pipelines-tasks#20300.

Testing

See the legacy PR pipelines for successful ARM64 and x86 runs. The modern sqlclient-pr pipeline confirms no regressions.

We see the ARM64 SDK being installed now via the latest UseDotNet@2 task:

Primary:win-arm64
Detected platform (Primary): win-arm64
Version 10.0.301 was not found in cache.
Downloading: https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.301/dotnet-sdk-10.0.301-win-arm64.zip

Same with the runtimes:

Primary:win-arm64
Detected platform (Primary): win-arm64
Downloading: https://builds.dotnet.microsoft.com/dotnet/Runtime/8.0.28/dotnet-runtime-8.0.28-win-arm64.zip

We see this confirmed by the step that reports the installed SDKs and Runtimes:

.NET SDK:
 Version:           10.0.301
 Commit:            96856fd726
 Workload version:  10.0.300-manifests.b0c14421
 MSBuild version:   18.6.4+96856fd72

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.26200
 OS Platform: Windows
 RID:         win-arm64
 Base Path:   D:\a\_work\_tool\dotnet\sdk\10.0.301\

Host:
  Version:      10.0.9
  Architecture: arm64
  Commit:       901ca94124

Pipeline Runs

  • Legacy:
    • PR-SqlClient-Project: 19403
    • PR-SqlClient-Package: 19403
    • CI-SqlClient: 19522
    • CI-SqlClient-Package: 19521
    • MDS Main CI: Same as CI-SqlClient.
    • MDS Main CI-Package: Same as CI-SqlClient-Package.
  • Modern:
    • sqlclient-pr: 19403
    • sqlclient-stress: 19402
    • sqlclient-package: 19501
    • sqlclient-kerberos: 20260714.4 (Failed due to environmental issues; .NET SDK/Runtime installs and builds succeeded.)
  • Official:
  • Classic:
    • These pipelines do not use install-dotnet.yml, but they do use the UseDotNet@2 task.
    • None of them specify ARM64 or x86 architecture, so they don't require any updates, but we will run them if possible just for fun.
    • Localization-CI: Only uses GitHub dotnet/SqlClient main - cannot be run against this PR branch.
    • sqlclient-fuzztest: Uses published SqlClient NuGet packages - cannot be run against this PR branch.
    • Test-SqlClient-Managed-Instance: 160698
    • Docs-Build-Pack-Publish: 26195.2

UseDotNet@2 v271+ now correctly detects win-arm64 and installs the
matching SDK/runtime, fixing the long-standing bug that installed x86
on ARM64 hosts:

  microsoft/azure-pipelines-tasks#20300

This removes our workaround:

- install-dotnet.yml: drop the ARM64 branch and the custom PowerShell
  installer step. Replace the architecture enum (x64/x86/arm64) with a
  forceX86 boolean, since forcing x86 was the only remaining behavior.
- Delete install-dotnet-arm64.ps1 (no longer referenced).
- ci-run-tests-job.yml: always pass runtimes in UseDotNet@2 format,
  remove the isArm64 parameter, and use forceX86 for the x86 install.
- ci-run-tests-stage.yml: drop the isArm64 passthroughs.
- dotnet-sqlclient-ci-core.yml: drop isArm64 from the arm64 matrix
  entry (the ARM64 agent is still selected via pool/images).
Copilot AI review requested due to automatic review settings July 13, 2026 11:33
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Jul 13, 2026

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.

Pull request overview

This PR simplifies the Azure DevOps pipeline .NET installation flow by removing the ARM64-specific workaround script and relying on fixed UseDotNet@2 behavior to install the native SDK/runtime on Windows ARM64 agents.

Changes:

  • Removed ARM64 branching and custom PowerShell installer usage; standardized on UseDotNet@2 for all architectures.
  • Replaced the install template’s architecture enum with a forceX86 boolean to support x86 cross-install scenarios.
  • Removed isArm64 wiring across the CI core pipeline matrix and test stage/job templates, and normalized runtime version formats to [8.x, 9.x].

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
eng/pipelines/dotnet-sqlclient-ci-core.yml Removes isArm64 from the ARM64 matrix entry; ARM64 selection remains via pool/image.
eng/pipelines/common/templates/stages/ci-run-tests-stage.yml Stops passing isArm64 into the test job template.
eng/pipelines/common/templates/jobs/ci-run-tests-job.yml Drops isArm64 parameter usage; always installs runtimes via UseDotNet@2 format; uses forceX86: true for x86 installs.
eng/pipelines/common/steps/install-dotnet.yml Removes ARM64 special-casing and introduces forceX86 parameter for x86 cross-install behavior.
eng/pipelines/common/steps/install-dotnet-arm64.ps1 Deletes the now-unreferenced ARM64 install script.

Comment thread eng/pipelines/common/steps/install-dotnet.yml
Comment thread eng/pipelines/common/steps/install-dotnet.yml
@paulmedynski paulmedynski added this to the 7.1.0-preview3 milestone Jul 13, 2026
@paulmedynski paulmedynski added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label Jul 13, 2026
@paulmedynski paulmedynski moved this from To triage to In progress in SqlClient Board Jul 13, 2026
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.34%. Comparing base (fdebcd2) to head (3c39cac).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4442      +/-   ##
==========================================
- Coverage   65.83%   64.34%   -1.50%     
==========================================
  Files         287      287              
  Lines       43763    66952   +23189     
==========================================
+ Hits        28812    43081   +14269     
- Misses      14951    23871    +8920     
Flag Coverage Δ
CI-SqlClient 65.83% <ø> (-0.01%) ⬇️
PR-SqlClient-Project 63.95% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paulmedynski paulmedynski marked this pull request as ready for review July 13, 2026 14:45
@paulmedynski paulmedynski requested a review from a team as a code owner July 13, 2026 14:45
@paulmedynski paulmedynski enabled auto-merge (squash) July 13, 2026 14:45
@paulmedynski paulmedynski moved this from In progress to In review in SqlClient Board Jul 13, 2026

@mdaigle mdaigle 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.

All looks good. Can you please link passing CI and non-official runs?

Do we need to update other pipelines like MI, kerberos, etc.?

@github-project-automation github-project-automation Bot moved this from In review to Waiting for customer in SqlClient Board Jul 13, 2026
@cheenamalhotra cheenamalhotra added the Author attention needed PRs that require author to respond or make updates to PR. label Jul 14, 2026
@dotnet dotnet deleted a comment from github-actions Bot Jul 14, 2026
@paulmedynski paulmedynski removed the Author attention needed PRs that require author to respond or make updates to PR. label Jul 14, 2026
@paulmedynski

Copy link
Copy Markdown
Contributor Author

All pipelines that install .NET SDKs and/or Runtimes have been noted in the PR description, with links to completed or in-progress runs.

@paulmedynski paulmedynski requested a review from mdaigle July 14, 2026 12:55
mdaigle
mdaigle approved these changes Jul 14, 2026
@paulmedynski paulmedynski merged commit b0e988b into main Jul 14, 2026
748 of 751 checks passed
@paulmedynski paulmedynski deleted the dev/paul/install-dotnet-arm64 branch July 14, 2026 20:47
@github-project-automation github-project-automation Bot moved this from Waiting for customer to Done in SqlClient Board Jul 14, 2026
cheenamalhotra pushed a commit that referenced this pull request Jul 14, 2026
UseDotNet@2 v271+ now correctly detects win-arm64 and installs the
matching SDK/runtime, fixing the long-standing bug that installed x86
on ARM64 hosts:

  microsoft/azure-pipelines-tasks#20300

This removes our workaround:

- install-dotnet.yml: drop the ARM64 branch and the custom PowerShell
  installer step. Replace the architecture enum (x64/x86/arm64) with a
  forceX86 boolean, since forcing x86 was the only remaining behavior.
- Delete install-dotnet-arm64.ps1 (no longer referenced).
- ci-run-tests-job.yml: always pass runtimes in UseDotNet@2 format,
  remove the isArm64 parameter, and use forceX86 for the x86 install.
- ci-run-tests-stage.yml: drop the isArm64 passthroughs.
- dotnet-sqlclient-ci-core.yml: drop isArm64 from the arm64 matrix
  entry (the ARM64 agent is still selected via pool/images).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants