-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
fix: update isolation as new fixtures of certain scopes arrive #2277
base: main
Are you sure you want to change the base?
Conversation
52d9aee
to
d9eb681
Compare
0
and avoid restore during failure
0
and avoid restore during failure
suspecting something with the runner now... |
54c04c3
to
c590099
Compare
|
Update, mentioned on Telegram but I am pretty sure I actually found the bug; I am still working on the full fix this PR is not ready for testing yet). Standby for updates. |
If you want to see the most magical part(s), look at the changes made to the |
This is "working" but may have performance issues if users don't use |
|
Can we store extra info in the cache? Such as block height of last access? If auto-mining is used, that would roughly correspond to 1 block = 1 transaction, so this is a good approximation (If auto-mining is turned off, this would not work) |
Yes, this is how we would do it. I just can't figure out how to know which fixture is responsible. It seems really complicated. For example, if you were using multiple module-scoped fixtures at the same time and some caused height increase and some didn't, the chain height would be higher the next usage for all of them, so how does one know which fixture caused the bump? Edit: Going to see if there a hook for when fixtures run, that may work... liike |
Fixed by 4beeaf3 |
|
Notes:
|
08b3b7c
to
518d04b
Compare
518d04b
to
0fe3f89
Compare
|
b58c06a
to
01e42ff
Compare
So before I merge this, I am going to add a few more projects to the integration tester thing. |
ApePay this branch main |
Once I get #2327 to where I like, I want to also compare running Ape's tests w/ and w/o this feature. |
070e579
to
6149aa8
Compare
40e1e69
to
39ec0dc
Compare
39ec0dc
to
3e9fdb4
Compare
What I did
Make isolation "work" on session, package, module, and class scopes.
Basically, the bug was that as new fixtures of certain scopes come in after a snapshot was taken in that scope, they wouldn't really persist as the scope below left, like if the module changes or something
fixes: #2262
fixes: #1287
How I did it
Awful. Basically the only way to fix this is to rebase the blockchain as new upper scopes up.
A new session comes in later, we have to undo to the module (or closest lowest) snapshot invalidate those fixture, inject those fixtures in the correct order, and re-set all the snapshots.
How to verify it
Can technically uses scopes / parametrized fixtures in any way now... and it should also "work"... it is just is slow if using higher scoped fixtures later on in the test suite, can be really bad actually. I definitely don't recommend using parametrized fixtures unless I can figure out a more optimal way with those
Checklist