-
Notifications
You must be signed in to change notification settings - Fork 197
test: add CI cache for rpc snapshot tests to mitigate flackyness issue #5978
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
Merged
LesnyRumcajs
merged 16 commits into
main
from
hm/run-rpc-snapshot-tests-with-cargo-test
Aug 26, 2025
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1b343e8
test: run rpc snapshots with `cargo test` instead of `nextest`
hanabi1224 a52c947
update test prefix to avoid false positive in filter
hanabi1224 c48a67d
apply AI suggestion
hanabi1224 671f5c2
CI cache for rpc snapshots
hanabi1224 3712b63
Merge branch 'main' into hm/run-rpc-snapshot-tests-with-cargo-test
hanabi1224 0e902af
switch back to nextest
hanabi1224 8464707
Merge remote-tracking branch 'origin/main' into hm/run-rpc-snapshot-t…
hanabi1224 d1c270f
fix nextest config
hanabi1224 d1bf0fc
fix cache path
hanabi1224 cf76ac2
yml fmt
hanabi1224 6cc77af
Merge branch 'main' into hm/run-rpc-snapshot-tests-with-cargo-test
hanabi1224 0f351a1
fix cache key
hanabi1224 d472ae8
enable for draft for testing
hanabi1224 38bd144
revert
hanabi1224 70dfb99
Merge branch 'main' into hm/run-rpc-snapshot-tests-with-cargo-test
hanabi1224 fa84780
apply AI comments
hanabi1224 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Make hashing/saving robust; avoid step failures on empty/missing files and save even when tests fail.
ls -lhR ~/.cache/.../rpc_test/*will exit non‑zero if the directory is empty or missing, failing the job.openssl md5is brittle; prefersha256sumwhich is present on runners.cache/savewon’t run ifmake test-releasefails; you likely want to persist downloaded snapshots to help subsequent retries.Apply this diff to harden the steps:
Optional guard (if you see flaky/corrupted snapshots): add a quick JSON validation before saving to avoid caching error pages/rate-limit bodies.
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.
That's fine. The test will re-download proper snapshot if checksum does not match the http head header
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.
@hanabi1224, understood! Thanks for the clarification about the checksum validation against HTTP HEAD headers - that's a solid fallback mechanism that handles the corruption scenarios I was concerned about. Your current implementation makes sense given that validation layer.
✏️ Learnings added
🧠 Learnings used