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

Updated fetch_shas utility to use the channel manifest tomls #2840

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

UebelAndre
Copy link
Collaborator

@UebelAndre UebelAndre commented Sep 6, 2024

Updating shas was taking much longer than it used to. I've refactored the shell script into python so to manage increased complexity. The script now fetches the channel-rust-*.toml files which contains additional sha256 values. This script still falls back to brute force fetching of artifacts to account for any that are missing. The runtime was reduced from ~20 min to ~80s.

python3.11 ./util/fetch_shas/fetch_shas.py
2024-09-06 08:57:22 - INFO - Fetching known sha256 data...
2024-09-06 08:57:22 - INFO - Downloading data...
2024-09-06 08:57:29 - INFO - Done.
2024-09-06 08:57:29 - INFO - Deserializing 119 tomls...
2024-09-06 08:57:36 - INFO - Done.
2024-09-06 08:57:36 - INFO - Parsing artifacts...
2024-09-06 08:57:36 - INFO - Done. Identified 52790 artifacts.
2024-09-06 08:57:36 - INFO - Checking for 81514 missing artifacts...
2024-09-06 08:58:26 - INFO - Done.
2024-09-06 08:58:29 - INFO - Downloading 404 missing artifacts...
2024-09-06 08:58:29 - INFO - Done.
2024-09-06 08:58:36 - INFO - Done. Wrote rust/known_shas.bzl

Note that beta sha256 values have been removed in this change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This could probably have been written in Rust but at the time this seemed the most expedient thing to do and closer to the previous implementation.

Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this all up! 🎉 🙏

I wonder if at some point we should remove versions before our MSRV from this list to speed up running the script? 🤷 We currently claim to support 1.72.1 and newer, so 64 of the 76 versions we currently fetch we claim not to support...

@UebelAndre UebelAndre added this pull request to the merge queue Sep 10, 2024
@UebelAndre
Copy link
Collaborator Author

Thanks for fixing this all up! 🎉 🙏

I wonder if at some point we should remove versions before our MSRV from this list to speed up running the script? 🤷 We currently claim to support 1.72.1 and newer, so 64 of the 76 versions we currently fetch we claim not to support...

I'm down for removing some of the older things. Now that users are notified when they should add the shas (#2593), I can open a PR for that.

Merged via the queue into bazelbuild:main with commit dca03c9 Sep 10, 2024
4 checks passed
@UebelAndre
Copy link
Collaborator Author

Thanks for fixing this all up! 🎉 🙏
I wonder if at some point we should remove versions before our MSRV from this list to speed up running the script? 🤷 We currently claim to support 1.72.1 and newer, so 64 of the 76 versions we currently fetch we claim not to support...

I'm down for removing some of the older things. Now that users are notified when they should add the shas (#2593), I can open a PR for that.

#2850

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.

2 participants