Skip to content

Defend against parallel package builds via a file lock #1032

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

Merged
merged 4 commits into from
Oct 4, 2018
Merged

Conversation

gaborbernat
Copy link
Member

Resolves #1026.

@gaborbernat gaborbernat force-pushed the 1026 branch 2 times, most recently from 0de3d69 to 83def3d Compare October 4, 2018 11:19
We create a hard link (if possible, otherwise copy of the
built package) inside a temp folder. This way subsequent sessions are
free to remove dist folder and we also guarantee that the built package
during the build is what tox environments use (even if the package
gets rebuilt in the meantime).
@gaborbernat gaborbernat force-pushed the 1026 branch 15 times, most recently from 9588075 to 8acf739 Compare October 4, 2018 19:30

reader.addsubstitutions(distdir=config.distdir)
config.distshare = reader.getpath("distshare", dist_share_default)
self._make_thread_safe_path(config, "distshare", unique_id)
config.temp_dir = reader.getpath("temp_dir", "{toxworkdir}/.tmp")
Copy link
Contributor

Choose a reason for hiding this comment

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

@gaborbernat if I'm reading this right, you forgot to add it to substitutions

Copy link
Member Author

Choose a reason for hiding this comment

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

This is meant as an internal implementation detail folder, not meant for public usage.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, the docs suggest otherwise...

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, I guess now it's supported.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hyrum's Law, huh?

webknjaz added a commit to webknjaz/tox that referenced this pull request Jun 28, 2020
This change recovers a missing `temp_dir` substitution.
The docs for it were added in tox-dev#1032 but it never actually worked.

Fixes tox-dev#1608
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.

3 participants