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

Rewrite the update script in Python #112

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

alexcrichton
Copy link
Contributor

With various updates to this script such as having a different upstream for memory64 and otherwise including the wasm-3.0 test suite this script was getting relatively complicated which is typically not a great situation for any bash script to be in. Instead rewrite this script in Python to avoid many of bash's pitfalls and be a bit more readable/reviewable/modifiable.

With various updates to this script such as having a different upstream
for `memory64` and otherwise including the `wasm-3.0` test suite this
script was getting relatively complicated which is typically not a great
situation for any bash script to be in. Instead rewrite this script in
Python to avoid many of bash's pitfalls and be a bit more
readable/reviewable/modifiable.
@alexcrichton alexcrichton requested a review from a team as a code owner November 20, 2024 20:56
@alexcrichton alexcrichton requested review from sbc100 and removed request for a team November 20, 2024 20:56
@alexcrichton
Copy link
Contributor Author

Inspired by discussion on #110

Copy link
Member

@sbc100 sbc100 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 working on this!

lgtm % a whole bunch of python nits.

update-testsuite.py Outdated Show resolved Hide resolved
update-testsuite.py Outdated Show resolved Hide resolved
update-testsuite.py Outdated Show resolved Hide resolved
update-testsuite.py Outdated Show resolved Hide resolved
update-testsuite.py Outdated Show resolved Hide resolved
update-testsuite.py Outdated Show resolved Hide resolved
update-testsuite.py Show resolved Hide resolved
update-testsuite.py Outdated Show resolved Hide resolved
update-testsuite.py Outdated Show resolved Hide resolved
update-testsuite.py Outdated Show resolved Hide resolved
@alexcrichton
Copy link
Contributor Author

Thanks for the review! I also fixed an issue where if the spec repo itself had changed tests a commit wasn't made, but that should be fixed now too. (also apologies for the "clearly I'm not a Python programmer" python)

Copy link
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

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

lgtm

@sunfishcode are you OK with this change?

Repo('relaxed-simd'),
Repo('custom-page-sizes'),
Repo('wide-arithmetic'),
]
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be great if this list could be a purely declarative list of strings/data, but I guess since we this dependency between elements is probably easier this way.

Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for doing this 🎉

@sunfishcode
Copy link
Member

I haven't reviewed the code myself yet, but I have no special concerns here, and I trust the judgement of the people who have already reviewed it.

@alexcrichton
Copy link
Contributor Author

Ok I'm going to go ahead and merge this and I'll be on the hook for any failures that happen in the near future from this refactoring...

@alexcrichton alexcrichton merged commit 3d176e3 into WebAssembly:main Nov 21, 2024
@alexcrichton alexcrichton deleted the update-python branch November 21, 2024 21:57
@alexcrichton
Copy link
Contributor Author

Oh wow it's significantly faster than before! The last auto-update run was 5.5 minutes and a manually triggered run was 0.5 minutes.

Looks like stdout/stderr are interleaved there which isn't great though, but otherwise it seems to have at least run successfully in CI which is nice.

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.

4 participants