Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipelines | Fix dotnet Installation on ARM64 #3175

Open
wants to merge 42 commits into
base: main
Choose a base branch
from

Conversation

benrr101
Copy link
Contributor

This is a recreation of #3037 to make it easier to trigger CI builds. The original PR description follows:

Looks like there's a bug in the UseDotNet Azure DevOps functionality and it installs x86 .NET on ARM:
microsoft/azure-pipelines-tasks#20300

Adding an install script to resolve this and install the proper version on ARM.
Also, the steps were added twice as prebuild and build. Removed one.

Here you can find the logs showing the x86 install:
https://dev.azure.com/sqlclientdrivers/public/_build/results?buildId=102454&view=logs&j=f62ec789-9893-5f91-3293-e8a10244adaa&t=83eb4f36-b8e6-57c5-1c44-e749ef0d4796

Starting: Initialize job
Agent name: 'ADO-CI-PUBLIC-ARM64-1ES-EUS-POOL 4'
Version 9.0.100 was not found in cache.
Getting URL to download .NET Core sdk version: 9.0.100.
Detecting OS platform to find correct download package for the OS.
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "& 'D:\a\_work\_tasks\UseDotNet_b0ce7256-7898-45d3-9cb5-176b752bfea6\2.248.1\externals\get-os-platform.ps1'"
Primary:win-x86
Detected platform (Primary): win-x86
Downloading: https://download.visualstudio.microsoft.com/download/pr/d7af32e6-aaec-4fcd-aabe-0d927fa73a6d/80bbc4143ee82e40b8b4341795e92f4e/dotnet-sdk-9.0.100-win-x86.zip
Extracting downloaded package D:\a\_work\_temp\5c2afe6a-65ec-4414-ad1a-8368aeaecbe9.
Extracting archive

@benrr101 benrr101 added the Area\Engineering Issues that are targeted for changes in the 'eng' folder or build systems. label Feb 21, 2025
@benrr101
Copy link
Contributor Author

/azp run

Replace remaining CI usages of UseDotNet with ensure-dotnet-version
echo "version= $version"

# Install dotnet ###########################################
Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile "dotnet-install.ps1"
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this will end up becoming a blocker for onebranch conversion... we can cross that bridge when we get to it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, uhm ... maybe. I'll have to dig through the network restrictions list again.

Copy link
Member

Choose a reason for hiding this comment

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

Can you leverage 1es artifact instead? this one: https://dev.azure.com/devdiv/XlabImageFactory/_git/XlabImageFactory?path=/artifacts/windows-dotnetcore-sdk/dotnet-install.ps1 supports fetching all SDK variants and handles arm64 too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fetching anything external (assuming "dot.net" is considered external) from an official OB pipeline will not fly. But if it's just a test pipeline, might be okay.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can try that, though it's not a publicly accessible ADO instance.

@benrr101
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines failed to run 2 pipeline(s).

@cheenamalhotra
Copy link
Member

Instead of this PR, you can install Dotnet SDK on Windows via artifact registry, that is more reliable way of installing Dotnet SDK. We do the same on Linux, and can be done on Windows too.. you need not call UseDotnetSDK in that case.

@benrr101
Copy link
Contributor Author

@cheenamalhotra you're going to have to explain that one a bit more. I don't see in our existing pipelines where we're doing anything other than UseDotNet task.

@benrr101
Copy link
Contributor Author

benrr101 commented Mar 4, 2025

/azp run

Copy link

Azure Pipelines failed to run 2 pipeline(s).

@cheenamalhotra
Copy link
Member

/azp run

Copy link

Azure Pipelines failed to run 2 pipeline(s).

@cheenamalhotra
Copy link
Member

@cheenamalhotra you're going to have to explain that one a bit more. I don't see in our existing pipelines where we're doing anything other than UseDotNet task.

Discussed internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area\Engineering Issues that are targeted for changes in the 'eng' folder or build systems.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants