KEMBAR78
[xaprepare] log exceptions, and handle CRL check failures by jonathanpeppers · Pull Request #9965 · dotnet/android · GitHub
Skip to content

Conversation

@jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Mar 25, 2025

Context: dotnet/arcade#15546

Right now failures just print:

Downloading dotnet-install script...
-> https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh
Error: Download of dotnet-install from 'https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh' failed

Let's log the exception message, as it retries.

After this change, we get the intermittent error on macOS only:

Warning: Download of 'https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh' failed: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: RevocationStatusUnknown

In dotnet/arcade#15546, they addressed this problem by using
SocketsHttpHandler and configuring the CertificateChainPolicy to
ignore the RevocationStatusUnknown error.

Let's use the same approach here.

@jonathanpeppers jonathanpeppers force-pushed the dev/peppers/xapreparelogging branch from 2dbf6bd to db04004 Compare March 25, 2025 19:46
@jonathanpeppers jonathanpeppers changed the title [xaprepare] log exceptions when downloading files [xaprepare] log exceptions, and handle CRL check failures Mar 25, 2025
Context: dotnet/arcade#15546

Right now failures just print:

    Downloading dotnet-install script...
    -> https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh
    Error: Download of dotnet-install from 'https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh' failed

Let's log the exception message, as it retries.

After this change, we get the intermittent error on macOS only:

    Warning: Download of 'https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh' failed: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
    ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: RevocationStatusUnknown

In dotnet/arcade#15546, they addressed this problem by using
`SocketsHttpHandler` and configuring the `CertificateChainPolicy` to
ignore the `RevocationStatusUnknown` error.

Let's use the same approach here.
@jonathanpeppers jonathanpeppers force-pushed the dev/peppers/xapreparelogging branch from db04004 to c96acd2 Compare March 25, 2025 19:47
@jonathanpeppers jonathanpeppers marked this pull request as ready for review March 25, 2025 21:26
@dellis1972 dellis1972 enabled auto-merge (squash) March 25, 2025 22:27
@dellis1972 dellis1972 disabled auto-merge March 25, 2025 23:18
@dellis1972 dellis1972 merged commit fe655a4 into main Mar 25, 2025
56 of 58 checks passed
@dellis1972 dellis1972 deleted the dev/peppers/xapreparelogging branch March 25, 2025 23:19
jonathanpeppers added a commit that referenced this pull request Mar 26, 2025
Context: dotnet/arcade#15546

Right now failures just print:

    Downloading dotnet-install script...
    -> https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh
    Error: Download of dotnet-install from 'https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh' failed

Let's log the exception message, as it retries.

After this change, we get the intermittent error on macOS only:

    Warning: Download of 'https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh' failed: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
    ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: RevocationStatusUnknown

In dotnet/arcade#15546, they addressed this problem by using
`SocketsHttpHandler` and configuring the `CertificateChainPolicy` to
ignore the `RevocationStatusUnknown` error.

Let's use the same approach here.
@github-actions github-actions bot locked and limited conversation to collaborators Apr 25, 2025
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.

3 participants