Skip to content

Update helix installation retry logic #30022

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

Merged
merged 3 commits into from
Feb 9, 2021
Merged

Update helix installation retry logic #30022

merged 3 commits into from
Feb 9, 2021

Conversation

JunTaoLuo
Copy link
Contributor

Follow up to #29842 to fix partial installation issues.

The problem was that if the process timed out when the SDK was partially installed, upon retry, the dotnet-install script will see the partial installation and consider the SDK already installed and exit with success. This PR changes it so that upon failure (timeout or non-zero exit code) of either SDK or runtime installation, both will be re-installed as part of the retry.

Restart SDK and runtime installation upon retry
@JunTaoLuo JunTaoLuo requested a review from a team as a code owner February 9, 2021 02:52
@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Feb 9, 2021
@JunTaoLuo
Copy link
Contributor Author

JunTaoLuo commented Feb 9, 2021

Because it's trying to install from a location without proper credentials... hmmm

Failed to install dotnet from custom location ****.
WARNING: InstallDotNet . eng\common\tools.ps1; InstallDotNet C:\h\w\BE9709EC\w\C12E0A35\e\sdk1002\x64 
6.0.100-preview.1.21073.4 x64 dotnet $true '****' '' $true failed with 
exit code 1

@JunTaoLuo
Copy link
Contributor Author

Weird, I wonder if the OpenAPI tests are just flaky:

Threw error: Adding package NSwag.ApiDescription.Client to /var/folders/f9/g1yw0c115c1_bffkqgrd9v8h0000gy/T/dotnet-tool-tests/cf68c41e2bab4eda8f798b363b63a3bc took longer than 20 seconds.

For the Components.Web test failing to start:

Found .NET SDK, but did not find dotnet.dll at [/private/tmp/helix/working/A5A70973/w/9D7308ED/e/.dotnet32726/sdk/6.0.100-preview.1.21073.4/dotnet.dll]

which is weird because the installation was a success

InstallDotNet /private/tmp/helix/working/A5A70973/w/9D7308ED/e/.dotnet32726 6.0.100-preview.1.21073.4 '' '' true
Downloading 'https://dot.net/v1/dotnet-install.sh'
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: Downloading primary link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.100-preview.1.21073.4/dotnet-sdk-6.0.100-preview.1.21073.4-osx-x64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.100-preview.1.21073.4/dotnet-sdk-6.0.100-preview.1.21073.4-osx-x64.tar.gz
dotnet-install: Adding to current process PATH: `/private/tmp/helix/working/A5A70973/w/9D7308ED/e/.dotnet32726`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.

I'm going to hit retry and see if these issues are reproducible.

@jkotalik
Copy link
Contributor

jkotalik commented Feb 9, 2021

I'm going to hit retry and see if these issues are reproducible.

The Components.Web makes me think that the issue isn't resolved yet. That still is a similar error to what we were seeing before.

@JunTaoLuo
Copy link
Contributor Author

Hmm... I'm not sure. There was no retry, both installation scripts completed successfully on the first try...

@JunTaoLuo
Copy link
Contributor Author

Hmm, this PR should help with the reliability of the tests quite a bit so I'll merge right now, but I'll keep an eye out for the Components.Web types of errors.

@JunTaoLuo JunTaoLuo merged commit 5638880 into main Feb 9, 2021
@JunTaoLuo JunTaoLuo deleted the johluo/fixup-retry branch February 9, 2021 19:30
autoCancel: true
branches:
include:
- '*'
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember asking about a PR that switched to pr: none somewhere but we shouldn't be running this pipeline for all PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants