-
Notifications
You must be signed in to change notification settings - Fork 79
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
Implement fallback detection of redirects for the new CDNs #554
Conversation
cc @JanProvaznik / @joeloff |
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. |
Merging now that things are green. Next step is for @mmitche to test in arcade. |
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 urlhttps://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
Bash script dry-run for .NET 9 SDK installation