Skip to content

bootstrap.py: add lockfile #143854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lolbinarycat
Copy link
Contributor

@lolbinarycat lolbinarycat commented Jul 12, 2025

the rust part of bootstrap already has a lockfile, but that's not good enough,
the python side also shouldn't race with itself.

fixes #143756

@rustbot
Copy link
Collaborator

rustbot commented Jul 12, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 12, 2025
@rust-log-analyzer

This comment has been minimized.

@lolbinarycat lolbinarycat force-pushed the bootstrap-py-lock-143756 branch from f033e32 to 9d46820 Compare July 12, 2025 20:59
@rust-log-analyzer

This comment has been minimized.

@lolbinarycat lolbinarycat force-pushed the bootstrap-py-lock-143756 branch from 9d46820 to 4ac0afb Compare July 12, 2025 21:25
the rust part of bootstrap already has a lockfile,
but that's not good enough,
the python side also shouldn't race with itself.

fixes RUST-143756
@lolbinarycat lolbinarycat force-pushed the bootstrap-py-lock-143756 branch from 4ac0afb to 1c6986f Compare July 12, 2025 21:48
run(args, env=env, verbose=build.verbose, is_bootstrap=True)
finally:
# always remove the lockfile
os.remove(lock_path)
Copy link
Member

Choose a reason for hiding this comment

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

Could we remove the lockfile earlier? It feels a bit odd to remove it only after (IIUC) we run the Rust part -- then the Rust lockfile is never considered, right? And the Rust part has far more extensive code (e.g., we print the PID and such, IIRC)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bootstrap.py needs a lockfile to prevent concurrent invocations
4 participants