Skip to content
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

Fix non-determinism of package_data in generated setup.py files #15292

Merged
merged 2 commits into from
May 1, 2022

Conversation

stuhood
Copy link
Member

@stuhood stuhood commented May 1, 2022

As described in #14843, (some) tests which consumed runtime_package_dependencies would always miss the cache.

This was because the dists generated for each run were slightly different, which came down to the package_data generated for resources being in a non-deterministic order due to iterating over a set. See #14195 (comment) for some thoughts on how to avoid this kind of issue in the future.

Fixes #14843: warm CI times should drop by about 1 minute from ~3m to ~2m.

stuhood added 2 commits April 30, 2022 14:19
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@stuhood stuhood added the category:bugfix Bug fixes for released features label May 1, 2022
Copy link
Contributor

@jsirois jsirois left a comment

Choose a reason for hiding this comment

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

Excellent.

@stuhood stuhood merged commit 000be2f into pantsbuild:main May 1, 2022
@stuhood stuhood deleted the stuhood/dist-determinism branch May 1, 2022 03:48
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Thanks! Should this be cherry picked?

@stuhood
Copy link
Member Author

stuhood commented May 2, 2022

Probably, yes. Same boat as #15294 though probably: can wait for a followup.

@stuhood stuhood added this to the 2.11.x milestone May 2, 2022
stuhood added a commit to stuhood/pants that referenced this pull request May 2, 2022
…antsbuild#15292)

As described in pantsbuild#14843, (some) tests which consumed `runtime_package_dependencies` would always miss the cache.

This was because the dists generated for each run were slightly different, which came down to the `package_data` generated for `resources` being in a non-deterministic order due to iterating over a `set`. See pantsbuild#14195 (comment) for some thoughts on how to avoid this kind of issue in the future.

Fixes pantsbuild#14843: warm CI times should drop by about 1 minute from ~3m to ~2m.
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]
stuhood added a commit to stuhood/pants that referenced this pull request May 2, 2022
…antsbuild#15292)

As described in pantsbuild#14843, (some) tests which consumed `runtime_package_dependencies` would always miss the cache.

This was because the dists generated for each run were slightly different, which came down to the `package_data` generated for `resources` being in a non-deterministic order due to iterating over a `set`. See pantsbuild#14195 (comment) for some thoughts on how to avoid this kind of issue in the future.

Fixes pantsbuild#14843: warm CI times should drop by about 1 minute from ~3m to ~2m.
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]
stuhood added a commit that referenced this pull request May 2, 2022
…Cherry-pick of #15292) (#15299)

As described in #14843, (some) tests which consumed `runtime_package_dependencies` would always miss the cache.

This was because the dists generated for each run were slightly different, which came down to the `package_data` generated for `resources` being in a non-deterministic order due to iterating over a `set`. See #14195 (comment) for some thoughts on how to avoid this kind of issue in the future.

Fixes #14843: warm CI times should drop by about 1 minute from ~3m to ~2m.

[ci skip-rust]
stuhood added a commit that referenced this pull request May 2, 2022
…Cherry-pick of #15292) (#15300)

As described in #14843, (some) tests which consumed `runtime_package_dependencies` would always miss the cache.

This was because the dists generated for each run were slightly different, which came down to the `package_data` generated for `resources` being in a non-deterministic order due to iterating over a `set`. See #14195 (comment) for some thoughts on how to avoid this kind of issue in the future.

Fixes #14843: warm CI times should drop by about 1 minute from ~3m to ~2m.


[ci skip-rust]
@Eric-Arellano Eric-Arellano removed this from the 2.11.x milestone May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build_runtime_package_dependencies might not be deterministic
3 participants