Skip to content

fix: avoid ln race condition in bootstrap script#3797

Merged
rickeylev merged 2 commits into
bazel-contrib:mainfrom
rickeylev:fix-ln-race-condition-20260527
May 27, 2026
Merged

fix: avoid ln race condition in bootstrap script#3797
rickeylev merged 2 commits into
bazel-contrib:mainfrom
rickeylev:fix-ln-race-condition-20260527

Conversation

@rickeylev
Copy link
Copy Markdown
Collaborator

Avoid startup failures when multiple processes attempt to create the same symlinks simultaneously.

Ensure symlinks are created and ignore errors if they already exist, which can happen in a race condition during startup.

@rickeylev rickeylev requested a review from aignas as a code owner May 27, 2026 07:02
Copy link
Copy Markdown
Contributor

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

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 introduces dynamic toolchain registration by parsing python-build-standalone manifests, adding support for downloading and parsing SHA256SUMS files to dynamically register Python versions. It also updates the bootstrap template to handle symlink creation more robustly during startup. The review feedback highlights critical issues, including a Starlark runtime crash due to the unsupported rpartition method, a fragile platform matching strategy that fails with microarchitecture suffixes, potential startup failures from stale or broken symlinks in the bootstrap script, and a recommendation to strip leading asterisks from filenames in manifest files for increased robustness.

@rickeylev rickeylev marked this pull request as draft May 27, 2026 07:06
@rickeylev
Copy link
Copy Markdown
Collaborator Author

Argh, somehow it picked the wrong base commit or something. I gotta go futz with this...

@rickeylev rickeylev force-pushed the fix-ln-race-condition-20260527 branch from 0e4830a to af48d0c Compare May 27, 2026 07:07
rickeylev added 2 commits May 27, 2026 07:08
Avoid startup failures when multiple processes attempt to create the same
symlinks simultaneously.

Ensure symlinks are created and ignore errors if they already exist, which
can happen in a race condition during startup.
@rickeylev rickeylev force-pushed the fix-ln-race-condition-20260527 branch from af48d0c to 63757d6 Compare May 27, 2026 07:08
@bazel-contrib bazel-contrib deleted a comment from gemini-code-assist Bot May 27, 2026
@bazel-contrib bazel-contrib deleted a comment from gemini-code-assist Bot May 27, 2026
@bazel-contrib bazel-contrib deleted a comment from gemini-code-assist Bot May 27, 2026
@rickeylev rickeylev marked this pull request as ready for review May 27, 2026 07:10
@rickeylev
Copy link
Copy Markdown
Collaborator Author

Alright, fixed the commits. Ready for review

@rickeylev rickeylev added this pull request to the merge queue May 27, 2026
Merged via the queue into bazel-contrib:main with commit cef5a6a May 27, 2026
5 checks passed
@rickeylev rickeylev deleted the fix-ln-race-condition-20260527 branch May 27, 2026 08:35
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