Skip to content

compiler: add retry loop and enable allowEmptyChecksums on Windows - #12962

Merged
kannanjgithub merged 2 commits into
grpc:masterfrom
kannanjgithub:windows_ci_failure
Aug 13, 2026
Merged

compiler: add retry loop and enable allowEmptyChecksums on Windows#12962
kannanjgithub merged 2 commits into
grpc:masterfrom
kannanjgithub:windows_ci_failure

Conversation

@kannanjgithub

@kannanjgithub kannanjgithub commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Enables allowEmptyChecksums globally on Chocolatey and implements a 3-attempt retry loop for pkgconfiglite to prevent Windows CI failures caused by transient network or SourceForge mirror errors. Even though --allow-empty-checksums is passed to choco install, newer Chocolatey versions do not propagate this CLI flag to the nested PowerShell installer script (chocolateyInstall.ps1). The inner script fails when downloading the binary from non-secure HTTP SourceForge mirrors unless the allowEmptyChecksums feature is globally enabled via choco feature beforehand.
This change also makes the script exit prematurely if pkg-config installation still failed instead of continuing and failing later at the linking step.

Failed Kokoro build logs example.

Enables allowEmptyChecksums globally on Chocolatey and implements a
3-attempt retry loop for pkgconfiglite to prevent Windows CI failures
caused by transient network or SourceForge mirror errors.
Even though --allow-empty-checksums is passed to choco install,
newer Chocolatey versions do not propagate this CLI flag to the nested
PowerShell installer script (chocolateyInstall.ps1). The inner script
fails when downloading the binary from non-secure HTTP SourceForge
mirrors unless the allowEmptyChecksums feature is globally enabled
via choco feature beforehand.
@@ -1,4 +1,20 @@
choco feature enable -n allowEmptyChecksums

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this modifies the global Chocolatey state, do we need to disable it (choco feature disable -n allowEmptyChecksums) after the installation finishes? Or is it safe to leave it permanently enabled?

Comment thread buildscripts/make_dependencies.bat Outdated

set RETRY=0
:install_pkgconfig
choco install -y pkgconfiglite --allow-empty-checksums

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

--allow-empty-checksums this flag becomes redundant because it is enabled globally?

ping -n 6 127.0.0.1 >nul
goto :install_pkgconfig
)
echo Failed to install pkgconfiglite after 3 attempts.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should either loop 2 times for this statement to hold true. Or we can say here-
echo Failed to install pkgconfiglite after 4 attempts.

@shivaspeaks

Copy link
Copy Markdown
Member

Is there a way to run Windows CI with this updated file and paste the link here?

…p to guarantee a clean retry, recovering correctly if previous attempts left the package in a broken half-installed state.

Introduces a reusable ':RunPowershellWithRetry' helper to automatically re-attempt PowerShell 'Invoke-WebRequest' downloads (Protobuf, Abseil, CMake) when GitHub or connection timeouts occur."
@kannanjgithub

Copy link
Copy Markdown
Contributor Author

Is there a way to run Windows CI with this updated file and paste the link here?

btx/invocations/b9fed0c6-c526-4396-a435-ef579062da0f

@kannanjgithub
kannanjgithub merged commit ab104f8 into grpc:master Aug 13, 2026
17 of 18 checks passed
@kannanjgithub
kannanjgithub deleted the windows_ci_failure branch August 13, 2026 12:49
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.

2 participants