-
Notifications
You must be signed in to change notification settings - Fork 22
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
chore(blockifier_reexecution): add blockifier reexecution test to ci #1857
base: main
Are you sure you want to change the base?
Conversation
Artifacts upload triggered. View details here |
28ba6d1
to
61ea9d2
Compare
9b59603
to
87a2d96
Compare
Artifacts upload triggered. View details here |
61ea9d2
to
41381bb
Compare
87a2d96
to
0926455
Compare
Artifacts upload triggered. View details here |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1857 +/- ##
==========================================
+ Coverage 40.10% 42.14% +2.04%
==========================================
Files 26 204 +178
Lines 1895 23943 +22048
Branches 1895 23943 +22048
==========================================
+ Hits 760 10091 +9331
- Misses 1100 13386 +12286
- Partials 35 466 +431 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
0926455
to
582d756
Compare
Artifacts upload triggered. View details here |
582d756
to
00aabb1
Compare
Artifacts upload triggered. View details here |
00aabb1
to
eafed7d
Compare
Artifacts upload triggered. View details here |
eafed7d
to
7b90002
Compare
Artifacts upload triggered. View details here |
7b90002
to
f53de53
Compare
Artifacts upload triggered. View details here |
f53de53
to
2a12aef
Compare
Artifacts upload triggered. View details here |
2a12aef
to
b330615
Compare
Artifacts upload triggered. View details here |
b330615
to
4f7def5
Compare
Artifacts upload triggered. View details here |
4f7def5
to
6261b64
Compare
Artifacts upload triggered. View details here |
Blocking myself until rebased and can be uncommented Code quote: // Commented out until fix integrated.
// #[case::v_0_13_1(620978)] |
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.
Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 11 unresolved discussions (waiting on @aner-starkware and @AvivYossef-starkware)
a discussion (no related file):
we now need a README.md file for this crate. Can you write one?
(it can be a separate PR)
the readme should cover:
- All CLI commands and their meaning
- How to run the RPC tests (using
TEST_URL=<ENDPOINT>
)
crates/blockifier_reexecution/src/state_reader/raw_rpc_json_test.rs
line 170 at r1 (raw file):
Previously, aner-starkware wrote…
Blocking myself until rebased and can be uncommented
also blocking because blocking self sometimes doesn't actually work
crates/blockifier_reexecution/resources/offline_reexecution_files_prefix
line 1 at r1 (raw file):
4f7def520
not that it matters much, but... where is this value from?
Code quote:
4f7def520
.github/workflows/blockifier_ci.yml
line 57 at r1 (raw file):
# transaction_serde is not activated by any workspace crate; test the build. - run: cargo build -p blockifier --features transaction_serde - run: cargo test -p blockifier --features transaction_serde
I think this is still worth keeping. I know reexecution feature always activates this serde feature but we shouldn't assume this will be true forever IMO.
Code quote:
# transaction_serde is not activated by any workspace crate; test the build.
- run: cargo build -p blockifier --features transaction_serde
- run: cargo test -p blockifier --features transaction_serde
.github/workflows/blockifier_reexecution_ci.yml
line 9 at r1 (raw file):
- main-v[0-9].** tags: - v[0-9].**
do we want to run this CI on post-merge? I doubt it; it should only block PRs
Code quote:
push:
branches:
- main
- main-v[0-9].**
tags:
- v[0-9].**
.github/workflows/blockifier_reexecution_ci.yml
line 11 at r1 (raw file):
- v[0-9].** # TODO(Dori, 1/9/2024): Decide when exactly native-blockifier artifacts will be built. Until # then, keep the 'paths' key empty and build on every push to a release branch / tag.
irrelevant (copied from somewhere?)
Code quote:
# TODO(Dori, 1/9/2024): Decide when exactly native-blockifier artifacts will be built. Until
# then, keep the 'paths' key empty and build on every push to a release branch / tag.
.github/workflows/blockifier_reexecution_ci.yml
line 26 at r1 (raw file):
- '.github/workflows/blockifier_ci.yml' - '.github/workflows/upload_artifacts_workflow.yml' - 'build_native_in_docker.sh'
why should these three trigger this workflow?
Code quote:
- '.github/workflows/blockifier_ci.yml'
- '.github/workflows/upload_artifacts_workflow.yml'
- 'build_native_in_docker.sh'
.github/workflows/blockifier_reexecution_ci.yml
line 31 at r1 (raw file):
- 'crates/blockifier/**' - 'crates/native_blockifier/**' - 'scripts/build_native_blockifier.sh'
why? reexecution doesn't depend on native blockifier
Code quote:
- 'crates/native_blockifier/**'
- 'scripts/build_native_blockifier.sh'
.github/workflows/blockifier_reexecution_ci.yml
line 44 at r1 (raw file):
blockifier_reexecution: runs-on: starkware-ubuntu-latest-medium if: ${{ github.event_name == 'pull_request' }}
see above - don't run this workflow on push
events at all, and remove this if
Code quote:
if: ${{ github.event_name == 'pull_request' }}
.github/workflows/blockifier_reexecution_ci.yml
line 52 at r1 (raw file):
uses: "google-github-actions/auth@v2" with: credentials_json: ${{ secrets.SA_REEXECUTION_ARTIFACTS_READ_ACCESS_KEY }}
the point with public access was to allow running this CI without secrets.
otherwise, external PRs from external devs cannot run the CI.
why do you need this for read access?
Code quote:
${{ secrets.SA_REEXECUTION_ARTIFACTS_READ_ACCESS_KEY }}
.github/workflows/blockifier_reexecution_ci.yml
line 57 at r1 (raw file):
- run: gcloud storage cp -r gs://reexecution_artifacts/$REEXECUTION_INPUT_FILES_PREFIX/resources/* ./crates/blockifier_reexecution/resources/ # Run blockifier re-execution tests. - run: cargo test --release -p blockifier_reexecution -- --ignored
I can see that the reexecution itself did not run. the raw json tests ran, but that's it.
once you fix this, please check which is faster: with or without --release
.
- how much time required for compilation in both cases?
- how much time required for running the test in both cases?
Code quote:
- run: cargo test --release -p blockifier_reexecution -- --ignored
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.
Reviewable status: all files reviewed, 12 unresolved discussions (waiting on @aner-starkware and @AvivYossef-starkware)
.github/workflows/blockifier_reexecution_ci.yml
line 22 at r1 (raw file):
paths: # Other than code-related changes, all changes related to the blockifier should trigger the build. - 'crates/blockifier_reexecution/**'
move this down (sort this list)
Code quote:
- 'crates/blockifier_reexecution/**'
1a432c7
to
c87d64b
Compare
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.
Reviewable status: 1 of 4 files reviewed, 12 unresolved discussions (waiting on @AvivYossef-starkware and @dorimedini-starkware)
.github/workflows/blockifier_reexecution_ci.yml
line 9 at r1 (raw file):
Previously, dorimedini-starkware wrote…
do we want to run this CI on post-merge? I doubt it; it should only block PRs
Done.
.github/workflows/blockifier_reexecution_ci.yml
line 11 at r1 (raw file):
Previously, dorimedini-starkware wrote…
irrelevant (copied from somewhere?)
Done.
.github/workflows/blockifier_reexecution_ci.yml
line 22 at r1 (raw file):
Previously, dorimedini-starkware wrote…
move this down (sort this list)
Done.
.github/workflows/blockifier_reexecution_ci.yml
line 26 at r1 (raw file):
Previously, dorimedini-starkware wrote…
why should these three trigger this workflow?
I basically copied everything from the blockifier CI, reasoning that if there's a reason to run the blockifier checks, then reexecution checks should also be run
.github/workflows/blockifier_reexecution_ci.yml
line 44 at r1 (raw file):
Previously, dorimedini-starkware wrote…
see above - don't run this workflow on
push
events at all, and remove thisif
Done.
.github/workflows/blockifier_reexecution_ci.yml
line 52 at r1 (raw file):
Previously, dorimedini-starkware wrote…
the point with public access was to allow running this CI without secrets.
otherwise, external PRs from external devs cannot run the CI.
why do you need this for read access?
That's not what I recall; look at your request in the conversation.
.github/workflows/blockifier_reexecution_ci.yml
line 57 at r1 (raw file):
Previously, dorimedini-starkware wrote…
I can see that the reexecution itself did not run. the raw json tests ran, but that's it.
once you fix this, please check which is faster: with or without
--release
.
- how much time required for compilation in both cases?
- how much time required for running the test in both cases?
OK, will check.
Previously, dorimedini-starkware wrote…
OK, will do it in a separate PR. |
c87d64b
to
5dc406e
Compare
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.
Reviewable status: 0 of 4 files reviewed, 12 unresolved discussions (waiting on @AvivYossef-starkware and @dorimedini-starkware)
crates/blockifier_reexecution/resources/offline_reexecution_files_prefix
line 1 at r1 (raw file):
Previously, dorimedini-starkware wrote…
not that it matters much, but... where is this value from?
Hash of some commit; probably already amended that commit or rebased, but the hash doesn't change (since it's the folder - need to change it manually)
crates/blockifier_reexecution/src/state_reader/raw_rpc_json_test.rs
line 170 at r1 (raw file):
Previously, dorimedini-starkware wrote…
also blocking because blocking self sometimes doesn't actually work
Done.
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.
Reviewable status: 0 of 4 files reviewed, 12 unresolved discussions (waiting on @AvivYossef-starkware and @dorimedini-starkware)
.github/workflows/blockifier_ci.yml
line 57 at r1 (raw file):
Previously, dorimedini-starkware wrote…
I think this is still worth keeping. I know reexecution feature always activates this serde feature but we shouldn't assume this will be true forever IMO.
Done.
Previously, aner-starkware wrote…
Actually, I think it was reversed - the reexecution tests ran, but all other tests did not. Now all tests run... But I'll split the tests file (in a separate PR), so that it will make more sense. |
5dc406e
to
6912a1e
Compare
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.
Reviewed 2 of 3 files at r2, 1 of 1 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @aner-starkware and @AvivYossef-starkware)
.github/workflows/blockifier_reexecution_ci.yml
line 26 at r1 (raw file):
Previously, aner-starkware wrote…
I basically copied everything from the blockifier CI, reasoning that if there's a reason to run the blockifier checks, then reexecution checks should also be run
If there's a reason to run blockifier checks, then yes,
but
- changes in the blockifier CI are changes in the checks, not changes in the crate, so no reason to trigger reexecution checks
- native blockifier is not a dependency of reexecution, so changes in the native blockifier shouldn't trigger reexecution - the blockifier CI also runs native blockifier stuff (actually, only the upload_artifacts workflow should really be triggered on changes to native blockifier, we can probably update the blockifier CI triggers to reflect this).
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.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @aner-starkware and @AvivYossef-starkware)
.github/workflows/blockifier_reexecution_ci.yml
line 57 at r1 (raw file):
Previously, aner-starkware wrote…
Actually, I think it was reversed - the reexecution tests ran, but all other tests did not. Now all tests run... But I'll split the tests file (in a separate PR), so that it will make more sense.
without --release
, compilation takes 3:20 and reexecution seems to take ~15 minutes.
also, I don't see that the 0_13_1_1 case finished, but the tests seem to have passed... why?
also, 15 minutes is a bit much, please try again with --release
... hopefully it should decrease the runtime dramatically
Previously, dorimedini-starkware wrote…
Without With |
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.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @aner-starkware and @AvivYossef-starkware)
.github/workflows/blockifier_reexecution_ci.yml
line 57 at r1 (raw file):
Previously, aner-starkware wrote…
Without
--release
: compilation 4 minutes, tests 14 minutes (total: 18 minutes); this solution isn't scalable, if you test reexecution on more blocks then it will grow significantly...With
--release
: compilation 10 minutes, tests 1 minute (total 11 minutes); this solution is more scalable since you can add many tests and it won't dramatically increase the time
cool! let's go with --release then
Previously, dorimedini-starkware wrote…
|
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.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @aner-starkware and @AvivYossef-starkware)
.github/workflows/blockifier_reexecution_ci.yml
line 57 at r1 (raw file):
Previously, aner-starkware wrote…
test state_reader::raw_rpc_json_test::test_block_reexecution::case_03_v_0_13_1_1 ... ok
Seems to have finished...
ah, missed that..
4db00dc
to
d5aae46
Compare
d5aae46
to
bf185f6
Compare
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.
Reviewable status: 3 of 4 files reviewed, 4 unresolved discussions (waiting on @AvivYossef-starkware and @dorimedini-starkware)
.github/workflows/blockifier_reexecution_ci.yml
line 26 at r1 (raw file):
Previously, dorimedini-starkware wrote…
If there's a reason to run blockifier checks, then yes,
but
- changes in the blockifier CI are changes in the checks, not changes in the crate, so no reason to trigger reexecution checks
- native blockifier is not a dependency of reexecution, so changes in the native blockifier shouldn't trigger reexecution - the blockifier CI also runs native blockifier stuff (actually, only the upload_artifacts workflow should really be triggered on changes to native blockifier, we can probably update the blockifier CI triggers to reflect this).
Done.
.github/workflows/blockifier_reexecution_ci.yml
line 31 at r1 (raw file):
Previously, dorimedini-starkware wrote…
why? reexecution doesn't depend on native blockifier
Done.
.github/workflows/blockifier_reexecution_ci.yml
line 57 at r1 (raw file):
Previously, dorimedini-starkware wrote…
ah, missed that..
Done.
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.
Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @aner-starkware and @AvivYossef-starkware)
.github/workflows/blockifier_reexecution_ci.yml
line 52 at r1 (raw file):
Previously, aner-starkware wrote…
That's not what I recall; look at your request in the conversation.
discussed offline, we want a secret-less solution..
No description provided.