Explore adding a reproducibility test to rust test infrastructure.#139793
Explore adding a reproducibility test to rust test infrastructure.#139793biabbas wants to merge 3 commits intorust-lang:mainfrom
Conversation
|
r? @marcoieni rustbot has assigned @marcoieni. Use |
238555f to
916f799
Compare
cfc6ce8 to
46485be
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@rustbot label -T-bootstrap |
|
@rustbot label +T-infra |
please write this as a comment in the code 👍 |
4babe2f to
4f8cb89
Compare
There was a problem hiding this comment.
The PR looks good overall, the comments are great, thanks!
I left a few more minor comments.
I want to involve @Kobzol to ask him if he agrees with the overall strategy here. I.e.:
- do we want to add this workflow?
- does it solve the problem in the right way?
|
While it would be great to have some reproducibility checks on CI, I don't think that the current approach used by this PR is the right one, for a few reasons.
I think that this is something that we should ideally discuss with t-infra first to gather consensus and come up with some plan, before starting with the implementation. |
7333dce to
db9e6e2
Compare
I'm not fully sure of this. The test seems too slow to be run on each PR. If we do this as a post merge, this would require some effort again to be fixed. Also there are reproducibility issues already with rustdoc, cargo-clippy etc. I suggest that this test be run as post merge test and reproducibility issues to be fixed before releases.
I did try adding diffoscope for this, but diffoscope takes up too much time. When I tried adding this test diffoscope always got cancelled, I think this is because the test had already crossed 5 hours.
This sounds good. We should provide infrastructure to run this test locally.
This could work. |
As I noted above, I don't expect the test to take more than 1.5 hours on Linux, if we simply do two stage 2 build with proper caching. So form this point of view I think it should be fine to run on every merge.
Could you clarify why it wouldn't be enough? |
Sorry, I missed reading the part where you moved the sources to a new location, so now this does make sense. |
Add a new host tool that checks whether Rust builds are reproducible. It builds the stage-2 toolchain (or a full distribution) twice in separate workspaces and compares the resulting sysroots byte-for-byte using SHA-256. Differences are reported in an HTML file. The tool writes a minimal deterministic `bootstrap.toml` for each build, hashes files in parallel with Rayon, and supports the usual flags (`--jobs`, `--exclude-pattern`, `--path-delta`, `--full-dist`, etc.). Refs rust-lang#139793, rust-lang#134589, rust-lang#144669. Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
I have a related PR open: #149888. This PR adds a repro-check host tool that performs the core function of building the toolchain twice and comparing outputs, which could serve as the basis for a CI test. |
Fixes #75362
Trying to add a reproducibility check on rust infrastructure itself to detect reproducibility issues.
These were the issues encountered till now:
Questions:
This is also related to issue: Rust reproducibility issue - Finding the proper fix #134589
Zulip discussion thread:
#t-infra > Add reproducibility check to detect reproducibility issues