-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Explore adding a reproducibility test to rust test infrastructure. #139793
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
base: master
Are you sure you want to change the base?
Conversation
r? @marcoieni rustbot has assigned @marcoieni. Use |
e5f3dfb
to
95d3d7e
Compare
fe3b2c7
to
35d08c2
Compare
238555f
to
916f799
Compare
4272cba
to
cfc6ce8
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 |
|
||
jobs: | ||
build_and_compare: | ||
runs-on: ubuntu-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runs-on: ubuntu-latest | |
runs-on: ubuntu-24.04 |
Let's pin the ubuntu version to avoid surprises
pull_request: | ||
branches: | ||
- master | ||
- reproducible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pull_request: | |
branches: | |
- master | |
- reproducible |
If this job takes 4 hours we can't run it on pull requests because it would be too slow.
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uses: actions/checkout@v2 | |
uses: actions/checkout@v4 |
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' # Adjust to the version you need | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' # Adjust to the version you need |
can't we use the default python preinstalled in github actions runners?
I think this is what we do when we run x.py
usually.
actions/setup-python
is not used in the codebase
@@ -0,0 +1,79 @@ | |||
name: Build and Diff Projects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a comment explaining what this job does and what problem does it solve.
cp -r "$STAGE2_DIR" . | ||
echo "Contents stage 2 dir : `ls stage2`" | ||
rm -rf build | ||
popd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the code is the same but the directory is different. Can you deduplicate this code?
Also add comments to explain what you are doing.
fi | ||
|
||
# Perform a diff between the two builds | ||
diff -r ../buildA/stage2 ../buildA_extended/stage2 || echo "Differences found!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain what the user should do in case of differences and what does it mean that there are differences.
uses: actions/upload-artifact@v4 | ||
with: | ||
name: buildA_extended | ||
path: buildA_extended.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add comments:
- What are those artifacts?
- Why are the artifacts useful?
- What should we do with these build artifacts?
- Should we manually inspect them every time a PR is merged?
please write this as a comment in the code 👍 |
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