Skip to content

[release/3.1] Fix fetch-microsoft-sdk script - #1925

Merged
dagood merged 1 commit into
dotnet:release/3.1from
omajid:fix-fetch-microsoft-sdk-script
Dec 7, 2020
Merged

dagood merged 1 commit into
dotnet:release/3.1from
omajid:fix-fetch-microsoft-sdk-script

Conversation

@omajid

@omajid omajid commented Nov 25, 2020

Copy link
Copy Markdown
Member

The script internally uses dotnet-install. The output of dotnet-install has changed: it now prints multiple urls and only one of them is the one we want.

dotnet-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: Payload URLs:
dotnet-install: Primary named payload URL: https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.110/dotnet-sdk-3.1.110-linux-x64.tar.gz
dotnet-install: Repeatable invocation: ./dotnet-install.sh --version "3.1.110" --install-dir "$HOME/.dotnet" --architecture "x64 "

Fix the grep expression to pick up the payload URL.

The script internally uses dotnet-install. The output of dotnet-install
has changed: it now prints multiple urls and only one of them is the
one we want.

> dotnet-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: Payload URLs:
> dotnet-install: Primary named payload URL: https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.110/dotnet-sdk-3.1.110-linux-x64.tar.gz
> dotnet-install: Repeatable invocation: ./dotnet-install.sh --version "3.1.110" --install-dir "$HOME/.dotnet" --architecture "x64 "

Fix the grep expression to pick up the payload URL.
@omajid

omajid commented Dec 7, 2020

Copy link
Copy Markdown
Member Author

@crummel @dagood @dseefeld Can we merge this in? This fixes release/3.1's smoke-tests to work again.

@crummel
crummel requested review from dagood and dseefeld December 7, 2020 17:28
@dagood

dagood commented Dec 7, 2020

Copy link
Copy Markdown
Member

macOS is expected to fail (#1819), although earlier than it did in this PR. Maybe the pool got fixed? Anyway, good to merge.

@dagood

dagood commented Dec 8, 2020

Copy link
Copy Markdown
Member

@omajid was the error you saw something like this?

 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. 
 curl: (6) Could not resolve host: dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https; Unknown error 
/src/build.proj(250,5): error MSB3073: The command "./smoke-test.sh --minimal --projectOutput --configuration Release --archiveRestoredPackages" exited with code 6. 

We just saw it in a branch build, and wondering if we just need to merge this change into it. 🙂

@omajid

omajid commented Dec 8, 2020

Copy link
Copy Markdown
Member Author

The error log looked like this on Fedora:

  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.
  curl: (3) URL using bad/illegal format or missing URL
/home/tester/source-build/build.proj(250,5): error MSB3073: The command "./smoke-test.sh --minimal --projectOutput --configuration Release --archiveRestoredPackages" exited with code 3.

And this on RHEL:

  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.
  curl: (3) Port number ended with ' '
/home/tester/source-build/build.proj(250,5): error MSB3073: The command "./smoke-test.sh --minimal --projectOutput --configuration Release --archiveRestoredPackages" exited with code 3.

The error message here looks close enough that this PR should fix it.

That said, I have seen dotnet-install fail recently just downloading an SDK all by itself.

@dagood

dagood commented Dec 8, 2020 •

Copy link
Copy Markdown
Member

Interesting... yeah, seems similar enough. (We're adding another || true to smoke-test.sh just to make sure this doesn't block us in the future, FYI. Until we get this working using a more direct download rather than the download script (#1631).)

I faintly remember seeing issues reported with dotnet-install recently, network issues. Not sure what's going on there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants