Skip to content

fix(bootstrap): use retry loop for win32 version lookup in site init template#3842

Merged
rickeylev merged 2 commits into
bazel-contrib:mainfrom
rickeylev:sync-win32-version-lookup
Jun 23, 2026
Merged

fix(bootstrap): use retry loop for win32 version lookup in site init template#3842
rickeylev merged 2 commits into
bazel-contrib:mainfrom
rickeylev:sync-win32-version-lookup

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Align the Windows path resolution in the site initialization template
with the bootstrap template to prevent flaky platform lookup errors on
Windows 2022. This is achieved by wrapping the win32 version retrieval
in a retrying loop.

Fixes #3721

…template

Align the Windows path resolution in the site initialization template
with the bootstrap template to prevent flaky platform lookup errors on
Windows 2022. This is achieved by wrapping the win32 version retrieval
in a retrying loop.

Fixes bazel-contrib#3721
@rickeylev rickeylev requested a review from aignas as a code owner June 22, 2026 15:52

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request attempts to resolve a flaky error on Windows 2022 during site initialization by retrying the platform.win32_ver() lookup. However, the feedback points out a critical bug where comparing version strings lexicographically (e.g., "6.1.7601" >= "10.0.14393") incorrectly evaluates to True, which could bypass the UNC prefix on older Windows versions. Additionally, the reviewer recommends catching a broader Exception during the lookup to prevent startup crashes and provides a robust suggestion to parse and compare the version components as integers.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread python/private/site_init_template.py
@rickeylev rickeylev added this pull request to the merge queue Jun 22, 2026
Merged via the queue into bazel-contrib:main with commit 1a15c3b Jun 23, 2026
5 checks passed
@rickeylev rickeylev deleted the sync-win32-version-lookup branch June 23, 2026 00:01
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.

Python bootstrapper fails on Windows after recent windows update

2 participants