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

Off-by-one in the retries count in KilledWorker #8203

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions distributed/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8449,8 +8449,8 @@ def allowed_failures(self) -> int:

def __str__(self) -> str:
return (
f"Attempted to run task {self.task} on {self.allowed_failures} different "
"workers, but all those workers died while running it. "
f"Attempted to run task {self.task} on {self.allowed_failures + 1} "
"different workers, but all those workers died while running it. "
f"The last worker that attempt to run the task was {self.last_worker.address}. "
"Inspecting worker logs is often a good next step to diagnose what went wrong. "
"For more information see https://distributed.dask.org/en/stable/killed.html."
Expand Down
4 changes: 2 additions & 2 deletions distributed/tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4244,8 +4244,8 @@ async def test_KilledWorker_informative_message(s, a, b):
with pytest.raises(KilledWorker) as excinfo:
raise ex
msg = str(excinfo.value)
assert "Attempted to run task foo-bar" in msg
assert str(s.allowed_failures) in msg
assert "Attempted to run task foo-bar on 667 different workers" in msg
assert a.address in msg
assert "worker logs" in msg
assert "https://distributed.dask.org/en/stable/killed.html" in msg

Expand Down