You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In preparation for new CDNs for .NET Builds, we are making the scripts resilient to CDN changes.
In the current default mode of execution, the scripts use the channel, quality, and other inputs to look up an aka.ms link that redirects to the current best-known version of the product that the user requested. For example, ./dotnet-install.sh --channel 9.0 --quality ga might use the url https://aka.ms/dotnet/9.0/dotnet-sdk-linux-x64.tar.gz when on an x64 Linux host to download the appropriate version of the SDK.
This url used to be accepted wholesale, but with the new CDN and incremental cleanup of various aka.ms links, we cannot rely on 100% data correctness. In order to buffer these changes, instead of directly using the aka.ms redirect, we'll instead use it to probe the set of known feeds and pick the one to use (if any) before falling back to our legacy lookup mechanism.
We'll derive the 'stem' - the portion of the redirect URL unique to the download - and apply that stem to each feed lookup in priority order. The first url that exists will be the one used for the remainder of the download session.
Powershell script dry-run for .NET 9 SDK installation
./dotnet-install.ps1 -Channel 9.0 -Quality ga -DryRun -VerboseVERBOSE: dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:VERBOSE: dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.VERBOSE: dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.VERBOSE: dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.VERBOSE: dotnet-install: Get-CLIArchitecture-From-Architecture -Architecture "<auto>"VERBOSE: dotnet-install: Get-Machine-ArchitectureVERBOSE: Perform operation 'Enumerate CimInstances' with following parameters, ''className' = CIM_OperatingSystem,'namespaceName' = root\cimv2'.VERBOSE: Operation 'Enumerate CimInstances' complete.VERBOSE: dotnet-install: Get-NormalizedQuality -Quality "ga"VERBOSE: dotnet-install: Normalized quality: ''VERBOSE: dotnet-install: Get-NormalizedChannel -Channel "9.0"VERBOSE: dotnet-install: Normalized channel: '9.0'VERBOSE: dotnet-install: Get-NormalizedProduct -Runtime ""VERBOSE: dotnet-install: Normalized product: 'dotnet-sdk'VERBOSE: dotnet-install: Action 'Product discovery' took 0.0689581 secondsVERBOSE: dotnet-install: Resolve-Installation-Path -InstallDir "<auto>"VERBOSE: dotnet-install: Get-User-Share-PathVERBOSE: dotnet-install: InstallRoot: C:\Users\chusk\AppData\Local\Microsoft\dotnetVERBOSE: Initialized feeds: https://builds.dotnet.microsoft.com/dotnet https://dotnetcli.azureedge.net/dotnet https://ci.dot.net/public https://dotnetbuilds.azureedge.net/publicVERBOSE: dotnet-install: Get-AkaMSDownloadLink -Channel "9.0" -Quality "" -Internal "False" -Product "dotnet-sdk" -Architecture "x64"VERBOSE: dotnet-install: Retrieving primary payload URL from aka.ms link for channel: '9.0', quality: '' product: 'dotnet-sdk', os: 'win', architecture: 'x64'.VERBOSE: dotnet-install: Constructed aka.ms link: 'https://aka.ms/dotnet/9.0/dotnet-sdk-win-x64.zip'.VERBOSE: dotnet-install: Received response:StatusCode: 301, ReasonPhrase: 'Moved Permanently', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:{ Server: Kestrel Location: https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zip Request-Context: appId=cid-v1:b47e5e27-bf85-45ba-a97c-0377ce0e5779 X-Response-Cache-Status: True Cache-Control: max-age=0, no-cache, no-store Pragma: no-cache Date: Fri, 20 Dec 2024 22:44:11 GMT Connection: keep-alive Strict-Transport-Security: max-age=31536000 ; includeSubDomains Content-Length: 0 Expires: Fri, 20 Dec 2024 22:44:11 GMT}VERBOSE: Checking configured feeds for the asset at Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zipVERBOSE: Checking https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zipVERBOSE: Requested HTTP/1.1 HEAD with 0-byte payloadVERBOSE: Failed to check https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zipVERBOSE: Checking https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zipVERBOSE: Requested HTTP/1.1 HEAD with 0-byte payloadVERBOSE: Received HTTP/1.1 293042093-byte response of content type application/octet-streamVERBOSE: Found a match at https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zipVERBOSE: dotnet-install: The redirect location retrieved: 'https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zip'.VERBOSE: dotnet-install: Received response:StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:{ Accept-Ranges: bytes Age: 94465 Date: Fri, 20 Dec 2024 22:44:12 GMT ETag: 0x8DD13C4375A70B6 Server: ECAcc (dac/9C73) X-Cache: HIT x-ms-blob-type: BlockBlob x-ms-lease-status: unlocked x-ms-request-id: 69f672e3-101e-007e-0254-52f527000000 x-ms-version: 2009-09-19 Content-Type: application/octet-stream Last-Modified: Tue, 03 Dec 2024 17:59:21 GMT Content-Length: 293042093}VERBOSE: dotnet-install: Retrieved primary named payload URL from aka.ms link: 'https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zip'.VERBOSE: dotnet-install: Downloading using legacy url will not be attempted.VERBOSE: dotnet-install: Version: '9.0.101'.VERBOSE: dotnet-install: Get-Product-Version -SpecificVersion "9.0.101" -PackageDownloadLink "https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zip"VERBOSE: dotnet-install: Get-Product-Version-Url -Flattened "True" -AzureFeed "" -SpecificVersion "9.0.101" -PackageDownloadLink "https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zip"VERBOSE: dotnet-install: Constructed productVersion link: https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/sdk-productVersion.txtVERBOSE: dotnet-install: Get-Product-Version-Url -Flattened "False" -AzureFeed "" -SpecificVersion "9.0.101" -PackageDownloadLink "https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zip"VERBOSE: dotnet-install: Constructed productVersion link: https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/productVersion.txtVERBOSE: dotnet-install: Checking for the existence of https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/sdk-productVersion.txtVERBOSE: dotnet-install: Product version: '9.0.101'.VERBOSE: dotnet-install: Generated aka.ms link https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zip with version 9.0.101dotnet-install: Payload URLs:dotnet-install: URL #0 - aka.ms: https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-win-x64.zipdotnet-install: Repeatable invocation: .\dotnet-install.ps1 -Version "9.0.101" -InstallDir "C:\Users\chusk\AppData\Local\Microsoft\dotnet" -Architecture "x64" -Verbose "True"
Bash script dry-run for .NET 9 SDK installation
./dotnet-install.sh --channel 9.0 --quality ga --dry-run --verbosedotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.dotnet-install: Calling: machine_has curldotnet-install: Calling: calculate_varsdotnet-install: Calling: get_normalized_architecture_from_architecture <auto>dotnet-install: Calling: get_machine_architecturedotnet-install: Normalized architecture: 'x64'.dotnet-install: Calling: get_normalized_osdotnet-install: Calling: get_current_os_namedotnet-install: Calling: get_linux_platform_namedotnet-install: Normalized OS: 'linux'.dotnet-install: Calling: get_normalized_quality gadotnet-install: Normalized quality: ''.dotnet-install: Calling: get_normalized_channel 9.0dotnet-install: Normalized channel: '9.0'.dotnet-install: Calling: get_normalized_productdotnet-install: Normalized product: 'dotnet-sdk'.dotnet-install: Calling: resolve_installation_path <auto>dotnet-install: Calling: get_user_install_pathdotnet-install: resolve_installation_path: user_install_path=/home/chethusk/.dotnetdotnet-install: InstallRoot: '/home/chethusk/.dotnet'.dotnet-install: Calling: get_normalized_architecture_for_specific_sdk_version Latest 9.0 x64dotnet-install: Calling: get_current_os_namedotnet-install: Calling: get_linux_platform_namedotnet-install: Calling: get_download_link_from_aka_msdotnet-install: Retrieving primary payload URL from aka.ms for channel: '9.0', quality: '', product: 'dotnet-sdk', os: 'linux', architecture: 'x64'.dotnet-install: Constructed aka.ms link: 'https://aka.ms/dotnet/9.0/dotnet-sdk-linux-x64.tar.gz'.dotnet-install: Calling: get_http_header https://aka.ms/dotnet/9.0/dotnet-sdk-linux-x64.tar.gz truedotnet-install: Calling: machine_has curldotnet-install: Calling: get_http_header_curl https://aka.ms/dotnet/9.0/dotnet-sdk-linux-x64.tar.gz truedotnet-install: Received response: HTTP/1.1 301 Moved PermanentlyServer: KestrelLocation: https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzRequest-Context: appId=cid-v1:d94c0f68-64bf-4036-8409-a0e761bb7ee1X-Response-Cache-Status: TrueContent-Length: 0Expires: Fri, 20 Dec 2024 22:32:26 GMTCache-Control: max-age=0, no-cache, no-storePragma: no-cacheDate: Fri, 20 Dec 2024 22:32:26 GMTConnection: keep-aliveStrict-Transport-Security: max-age=31536000 ; includeSubDomainsHTTP/2 200accept-ranges: bytesage: 99445content-md5: CIgc/eLDVx/WFrmmkqQj+w==content-type: application/octet-streamdate: Fri, 20 Dec 2024 22:32:26 GMTetag: 0x8DD13C4389CAD29last-modified: Tue, 03 Dec 2024 17:59:24 GMTserver: ECAcc (dac/9C4B)x-cache: HITx-ms-blob-type: BlockBlobx-ms-lease-status: unlockedx-ms-request-id: 9e02f845-301e-0056-6647-52948f000000x-ms-version: 2009-09-19content-length: 210346874dotnet-install: Calling: sanitize_redirect_url https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Checking configured feeds for the asset at Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Checking https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Calling: check_url_exists https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Calling: machine_has curldotnet-install: No match at https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Checking https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Calling: check_url_exists https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Calling: machine_has curldotnet-install: Found a match at https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: The redirect location retrieved: 'https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gz'.dotnet-install: Retrieved primary payload URL from aka.ms link: 'https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gz'.dotnet-install: Downloading using legacy url will not be attempted.dotnet-install: Version: '9.0.101'.dotnet-install: Calling: get_specific_product_version 9.0.101 https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Calling: get_specific_product_version_url 9.0.101 true https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Constructed productVersion link: https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/sdk-productVersion.txtdotnet-install: Calling: get_specific_product_version_url 9.0.101 false https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Constructed productVersion link: https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/productVersion.txtdotnet-install: Checking for the existence of https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/sdk-productVersion.txtdotnet-install: Calling: machine_has curldotnet-install: Generated 1 links.dotnet-install: Link 0: aka.ms, 9.0.101, https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Payload URLs:dotnet-install: URL #0 - aka.ms: https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Repeatable invocation: ./dotnet-install.sh --version "9.0.101" --install-dir "/home/chethusk/.dotnet" --architecture "x64" --os "linux" --verbosechethusk@Chet-Desktop:/mnt/e/Code/dotnet-install-scripts/src$ ./dotnet-install.sh --channel 9.0 --quality ga --dry-run --verbosedotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.dotnet-install: Calling: machine_has curldotnet-install: Calling: calculate_varsdotnet-install: Calling: get_normalized_architecture_from_architecture <auto>dotnet-install: Calling: get_machine_architecturedotnet-install: Normalized architecture: 'x64'.dotnet-install: Calling: get_normalized_osdotnet-install: Calling: get_current_os_namedotnet-install: Calling: get_linux_platform_namedotnet-install: Normalized OS: 'linux'.dotnet-install: Calling: get_normalized_quality gadotnet-install: Normalized quality: ''.dotnet-install: Calling: get_normalized_channel 9.0dotnet-install: Normalized channel: '9.0'.dotnet-install: Calling: get_normalized_productdotnet-install: Normalized product: 'dotnet-sdk'.dotnet-install: Calling: resolve_installation_path <auto>dotnet-install: Calling: get_user_install_pathdotnet-install: resolve_installation_path: user_install_path=/home/chethusk/.dotnetdotnet-install: InstallRoot: '/home/chethusk/.dotnet'.dotnet-install: Calling: get_normalized_architecture_for_specific_sdk_version Latest 9.0 x64dotnet-install: Calling: get_current_os_namedotnet-install: Calling: get_linux_platform_namedotnet-install: Calling: get_download_link_from_aka_msdotnet-install: Retrieving primary payload URL from aka.ms for channel: '9.0', quality: '', product: 'dotnet-sdk', os: 'linux', architecture: 'x64'.dotnet-install: Constructed aka.ms link: 'https://aka.ms/dotnet/9.0/dotnet-sdk-linux-x64.tar.gz'.dotnet-install: Calling: get_http_header https://aka.ms/dotnet/9.0/dotnet-sdk-linux-x64.tar.gz truedotnet-install: Calling: machine_has curldotnet-install: Calling: get_http_header_curl https://aka.ms/dotnet/9.0/dotnet-sdk-linux-x64.tar.gz truedotnet-install: Received response: HTTP/1.1 301 Moved PermanentlyServer: KestrelLocation: https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzRequest-Context: appId=cid-v1:d94c0f68-64bf-4036-8409-a0e761bb7ee1X-Response-Cache-Status: TrueContent-Length: 0Expires: Fri, 20 Dec 2024 22:45:17 GMTCache-Control: max-age=0, no-cache, no-storePragma: no-cacheDate: Fri, 20 Dec 2024 22:45:17 GMTConnection: keep-aliveStrict-Transport-Security: max-age=31536000 ; includeSubDomainsHTTP/2 200accept-ranges: bytesage: 100216content-md5: CIgc/eLDVx/WFrmmkqQj+w==content-type: application/octet-streamdate: Fri, 20 Dec 2024 22:45:17 GMTetag: 0x8DD13C4389CAD29last-modified: Tue, 03 Dec 2024 17:59:24 GMTserver: ECAcc (dac/9C4B)x-cache: HITx-ms-blob-type: BlockBlobx-ms-lease-status: unlockedx-ms-request-id: 9e02f845-301e-0056-6647-52948f000000x-ms-version: 2009-09-19content-length: 210346874dotnet-install: Calling: sanitize_redirect_url https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Checking configured feeds for the asset at Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Checking https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Calling: check_url_exists https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Calling: machine_has curldotnet-install: No match at https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Checking https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Calling: check_url_exists https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Calling: machine_has curldotnet-install: Found a match at https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: The redirect location retrieved: 'https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gz'.dotnet-install: Retrieved primary payload URL from aka.ms link: 'https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gz'.dotnet-install: Downloading using legacy url will not be attempted.dotnet-install: Version: '9.0.101'.dotnet-install: Calling: get_specific_product_version 9.0.101 https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Calling: get_specific_product_version_url 9.0.101 true https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Constructed productVersion link: https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/sdk-productVersion.txtdotnet-install: Calling: get_specific_product_version_url 9.0.101 false https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Constructed productVersion link: https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/productVersion.txtdotnet-install: Checking for the existence of https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/sdk-productVersion.txtdotnet-install: Calling: machine_has curldotnet-install: Generated 1 links.dotnet-install: Link 0: aka.ms, 9.0.101, https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Payload URLs:dotnet-install: URL #0 - aka.ms: https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.101/dotnet-sdk-9.0.101-linux-x64.tar.gzdotnet-install: Repeatable invocation: ./dotnet-install.sh --version "9.0.101" --install-dir "/home/chethusk/.dotnet" --architecture "x64" --os "linux" --verbose
The test failures here are all just expected changes to the assertions for the tested scenarios. Adding more feeds means more items will exist in the list of possible URLs that will be accessed. I'll need to update the baselines before we can merge this.
Verified (with manually-specified AzureFeed parameters) that when the scripts are targeted against the Azure FrontDoor gnarly URLs that the SDK/Runtime assets are successfully discovered, for both Powershell and Bash. I believe all that's left for this PR is to get the expected values updated for the Bash tests.
Once we have the nice names ready to go, we can remove the gnarly URLs and reinstate the vanity URLs - which will require updating the test expectations again.
New expectations pushed. One thing that would make this easier in the future is that today, a failure (including test failure) in one leg cancels the other two legs. Ideally all would be allowed to run to completion so that fixes could be made in one fell swoop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In preparation for new CDNs for .NET Builds, we are making the scripts resilient to CDN changes.
In the current default mode of execution, the scripts use the channel, quality, and other inputs to look up an aka.ms link that redirects to the current best-known version of the product that the user requested. For example,
./dotnet-install.sh --channel 9.0 --quality gamight use the urlhttps://aka.ms/dotnet/9.0/dotnet-sdk-linux-x64.tar.gzwhen on an x64 Linux host to download the appropriate version of the SDK.This url used to be accepted wholesale, but with the new CDN and incremental cleanup of various aka.ms links, we cannot rely on 100% data correctness. In order to buffer these changes, instead of directly using the aka.ms redirect, we'll instead use it to probe the set of known feeds and pick the one to use (if any) before falling back to our legacy lookup mechanism.
We'll derive the 'stem' - the portion of the redirect URL unique to the download - and apply that stem to each feed lookup in priority order. The first url that exists will be the one used for the remainder of the download session.
Powershell script dry-run for .NET 9 SDK installation
Bash script dry-run for .NET 9 SDK installation