Skip to content
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

Restore retire workers API #8939

Merged
merged 4 commits into from
Nov 27, 2024
Merged

Conversation

fjetter
Copy link
Member

@fjetter fjetter commented Nov 15, 2024

#8935 accidentally changed the public API for retire workers. I thought this was used only internally but it is used by client.retire_workers as well (and of course whenever the request handler is being used directly)

This should restore the API without reverting the changes to the logged event that was the primary intention of #8935

Copy link
Contributor

github-actions bot commented Nov 15, 2024

Unit Test Results

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

    29 files  ±    0      29 suites  ±0   11h 53m 49s ⏱️ - 30m 56s
 4 132 tests +    2   4 015 ✅ +    2    113 💤 + 2  4 ❌  - 2 
54 430 runs   - 1 409  52 043 ✅  - 1 362  2 381 💤  - 45  6 ❌  - 2 

For more details on these failures, see this check.

Results for commit bcddae4. ± Comparison against base commit 0660dab.

♻️ This comment has been updated with latest results.

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks @fjetter

Looks like we need to update distributed/tests/test_active_memory_manager.py::test_RetireWorker_with_actor_proxy too

diff --git a/distributed/tests/test_active_memory_manager.py b/distributed/tests/test_active_memory_manager.py
index bcc0d48d..1bc9855b 100644
--- a/distributed/tests/test_active_memory_manager.py
+++ b/distributed/tests/test_active_memory_manager.py
@@ -1250,7 +1250,7 @@ async def test_RetireWorker_with_actor_proxy(c, s, a, b):
     assert "y" in b.data

     out = await c.retire_workers([b.address])
-    assert out == (b.address,)
+    assert out.keys() == {b.address}
     assert "x" in a.state.actors
     assert "y" in a.data

@@ -7675,7 +7675,7 @@ async def _track_retire_worker(
f"Could not retire worker {ws.address!r}: unique data could not be "
f"moved to any other worker ({stimulus_id=!r})"
)
return ws.address, "no-recipients"
return ws.address, "no-recipients", ws.identity()
Copy link
Member

Choose a reason for hiding this comment

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

I could be missing something, but it looks like we're adding back the verbose thing removed in #8935 now. Just wanted to make sure that's intentional

@jrbourbeau jrbourbeau mentioned this pull request Nov 21, 2024
7 tasks
Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

@fjetter FYI I merged main here to resolve some unrelated test failures

@fjetter fjetter merged commit 03a45a8 into dask:main Nov 27, 2024
26 of 35 checks passed
@fjetter fjetter deleted the restore_retire_workers branch November 27, 2024 12:26
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