fix(bootstrap): use retry loop for win32 version lookup in site init template#3842
fix(bootstrap): use retry loop for win32 version lookup in site init template#3842rickeylev wants to merge 2 commits into
Conversation
…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
There was a problem hiding this comment.
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.
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