Skip to content

Conversation

@crusaderky
Copy link
Collaborator

Closes #5688
Supersedes #5691

Revisit the test suite around rebalance() to be faster, simpler to maintain, and more robust to variations in unmanaged memory (which is very hard to control).

@crusaderky crusaderky mentioned this pull request Jan 24, 2022
3 tasks
@crusaderky crusaderky marked this pull request as ready for review January 25, 2022 11:24
@crusaderky
Copy link
Collaborator Author

All test failures are unrelated; ready for review and merge
CC @gjoseph92 if you have time

@crusaderky crusaderky self-assigned this Jan 25, 2022
@gjoseph92 gjoseph92 self-requested a review January 25, 2022 20:55
Copy link
Collaborator

@gjoseph92 gjoseph92 left a comment

Choose a reason for hiding this comment

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

The switch to managed memory and non-Nanny workers is way nicer to read, big improvement.



@gen_cluster(client=True, config=REBALANCE_MANAGED_CONFIG)
async def test_rebalance_managed_memory(c, s, a, b):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this a duplicate of test_client.py::test_rebalance (besides calling rebalance on the client vs the scheduler)? I understand wanting to unit-test the actual rebalance logic on the scheduler, and test that the client is invoking it correctly, but testing so much of the rebalance logic in the client tests too feels a little redundant? (Same goes for other tests here.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All tests on test_client specifically test the Client API. It's very easy to accidentally forget a parameter or to convert a None to an empty list (which have different meanings).

Additionally, some behaviour is slightly different on Client.rebalance vs Scheduler.rebalance (not my design):

  • test_rebalance_unprepared: Client waits for unfinished tasks. Scheduler expects all tasks to be already finished.
  • test_rebalance_raises_on_explicit_missing_data: exception handling is specifically implemented client side

@crusaderky crusaderky merged commit 682a7b1 into dask:main Jan 25, 2022
@crusaderky crusaderky deleted the test_rebalance branch January 25, 2022 22:14
gjoseph92 pushed a commit to gjoseph92/distributed that referenced this pull request Feb 1, 2022
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.

Regression: P2P shuffle skeleton (#5520) causes test flakiness

2 participants