Skip to content

Conversation

@fjetter
Copy link
Member

@fjetter fjetter commented Feb 23, 2023

This is breaking out all the changes to Events, Variables, etc. in #7564 to allow for deserialization in a context w/out worker or client, i.e. on a scheduler.

All of these objects share quite some common infrastructure but I consider refactoring this out of scope.

Note: A minor behavioral change is that the roundtrips no longer preserve scheduler addresses, i.e. the will establish a connection to whatever client is returned by get_client (which internally has some defined precedence of where to look up the client, e.g. it starts with a worker client).

I don't believe we have the case of cross-scheduler serialization in reality

@fjetter fjetter changed the title Unpickle objects safely Unpickle Events, Variables, Queues and Semaphore safely without Client context Feb 23, 2023
async with Client(s.address, asynchronous=True):
obj3 = pickle.loads(pickled)
await obj3.set(42)
assert await obj3.get() == 42
Copy link
Member

Choose a reason for hiding this comment

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

Nice.

@github-actions
Copy link
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

       24 files  ±  0         24 suites  ±0   10h 0m 33s ⏱️ - 23m 48s
  3 349 tests +  4    3 250 ✔️ +  5       99 💤  -   1  0 ±0 
39 482 runs  +48  37 669 ✔️ +61  1 813 💤  - 13  0 ±0 

Results for commit fb05807. ± Comparison against base commit 41fdb91.

@fjetter fjetter merged commit 790d852 into dask:main Feb 23, 2023
@fjetter fjetter deleted the unpickle_objects_safely branch February 23, 2023 14:55
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.

2 participants