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 cannot uncache novel objs #4493
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
5f7402a
to
26e63a0
Compare
Codecov Report
@@ Coverage Diff @@
## master #4493 +/- ##
=======================================
Coverage 93.43% 93.44%
=======================================
Files 273 273
Lines 10696 10711 +15
Branches 1282 1285 +3
=======================================
+ Hits 9994 10009 +15
Misses 565 565
Partials 137 137
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
26e63a0
to
715899b
Compare
|
||
try: | ||
return get_query_object_by_id(connection, query_id) | ||
except (EOFError, ModuleNotFoundError, AttributeError) as exc: |
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.
Do we want UnpicklingError
here as well?
Where the query object in cache was actually pickleable when created but can't be unpickled here
715899b
to
fac36b8
Compare
Co-Authored-By: Thingus <3050091+Thingus@users.noreply.github.com>
q.store(store_dependencies=True).result() | ||
Query._QueryPool.clear() | ||
yield q_id, nested_id | ||
|
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.
Only extra test I can think of here is nesting a novel in a not-novel or vice versa
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.
Wait, novel in not-novel would never happen (if I've understood correctly) and from what I've seen, nesting two novel queries encapsulates nesting a not-novel in a novel, so disregard.
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.
👍
Closes #4008
I have:
Description
Deals with queries which were defined outside the server process (e.g. interactive session, defined in an imported module in an interactive session) being un-invalidatable outside the defining session by unpickling them to a stub class which does nothing but preserve their dependency links and query id.
I was hoping to deal with this by pickling them using dill, but that can't pickle them either outside of a
__main__
. One could also pickle to a stub where not pickleable, but I think this is marginally more robust because it doesn't rely on everyone immediately using an up to date FlowMachine.