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

[xaprepare] skip download progress for dotnet-install script #9053

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Jun 24, 2024

We are getting the error pretty early on during the build:

Downloading dotnet-install script...
Warning: Failed to obtain dotnet-install script size from URL 'https://dot.net/v1/dotnet-install.sh'. HTTP status code: InternalServerError (500)
  -> https://dot.net/v1/dotnet-install.sh
    downloading dotnet-install.sh

It seems the code is timing out on the call:

await httpClient.GetAsync (url, HttpCompletionOption.ResponseHeadersRead);

And then the code has some retry logic that eventually returns:

return (false, 0, HttpStatusCode.InternalServerError);

I am unable to reproduce this locally on either Mac or Windows.

Reworking this code to just download the file with no progress appears to solve the problem on Azure DevOps build agents?

We are getting the error pretty early on during the build:

    Downloading dotnet-install script...
    Warning: Failed to obtain dotnet-install script size from URL 'https://dot.net/v1/dotnet-install.sh'. HTTP status code: InternalServerError (500)
      -> https://dot.net/v1/dotnet-install.sh
        downloading dotnet-install.sh

Trying a URL that will require less redirects.
Just download the dotnet-install script directly with no progress indication
@jonathanpeppers jonathanpeppers changed the title [build] try different URL for dotnet-install script [xaprepare] skip download progress for dotnet-install script Jun 25, 2024
@jonathanpeppers jonathanpeppers marked this pull request as ready for review June 25, 2024 14:18
@jonathanpeppers jonathanpeppers merged commit b2b0f2d into dotnet:main Jun 25, 2024
57 checks passed
@jonathanpeppers jonathanpeppers deleted the dotnet-install.sh branch June 25, 2024 15:38
jonathanpeppers added a commit that referenced this pull request Jun 25, 2024
We are getting the error pretty early on during the build:

    Downloading dotnet-install script...
    Warning: Failed to obtain dotnet-install script size from URL 'https://dot.net/v1/dotnet-install.sh'. HTTP status code: InternalServerError (500)a
      -> https://dot.net/v1/dotnet-install.sh
        downloading dotnet-install.sh

It seems the code is timing out on the call:

    await httpClient.GetAsync (url, HttpCompletionOption.ResponseHeadersRead);

And then the code has some retry logic that eventually returns:

    return (false, 0, HttpStatusCode.InternalServerError);

I am unable to reproduce this locally on either Mac or Windows.

Reworking this code to just download the file with no progress appears
to solve the problem on Azure DevOps build agents.
grendello added a commit that referenced this pull request Jun 27, 2024
* main:
  Bump to dotnet/android-tools@9674590 (#9036)
  Bump to dotnet/android-libzipsharp@de57dccb (#9010)
  [Xamarin.Android.Build.Tasks] Support VS "Build Acceleration" (#9042)
  Bump to dotnet/sdk@ea9243f9cb 9.0.100-preview.7.24323.5 (#9031)
  Fix places still pointing to xamarin/xamarin-android (#9050)
  [xaprepare] skip download progress for `dotnet-install` script (#9053)
  $(AndroidPackVersionSuffix)=preview.7; net9 is 34.99.0.preview.7 (#9052)
@github-actions github-actions bot locked and limited conversation to collaborators Jul 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants