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

⬆️Upgrade dask related libraries and services (⚠️🚨) #6873

Merged
merged 27 commits into from
Dec 6, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add try catch
  • Loading branch information
sanderegg committed Dec 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 257cb687fc5f0ef6365aaa06d906d2c2282349ac
Original file line number Diff line number Diff line change
@@ -450,23 +450,30 @@ def _get_pipeline_statuses(
DaskSchedulerTaskState | None, task_statuses.get(job_id, "lost")
)
if dask_status == "erred":
# find out if this was a cancellation
exception = await distributed.Future(
job_id, client=self.backend.client
).exception(timeout=_DASK_DEFAULT_TIMEOUT_S)
assert isinstance(exception, Exception) # nosec

if isinstance(exception, TaskCancelledError):
running_states.append(DaskClientTaskState.ABORTED)
else:
assert exception # nosec
try:
# find out if this was a cancellation
exception = await distributed.Future(
job_id, client=self.backend.client
).exception(timeout=_DASK_DEFAULT_TIMEOUT_S)
assert isinstance(exception, Exception) # nosec

if isinstance(exception, TaskCancelledError):
running_states.append(DaskClientTaskState.ABORTED)
else:
assert exception # nosec
_logger.warning(
"Task %s completed in error:\n%s\nTrace:\n%s",
job_id,
exception,
"".join(traceback.format_exception(exception)),
)
running_states.append(DaskClientTaskState.ERRED)
except TimeoutError:
_logger.warning(
"Task %s completed in error:\n%s\nTrace:\n%s",
job_id,
exception,
"".join(traceback.format_exception(exception)),
"Task %s completed in error but was lost from dask-scheduler since then."
"TIP: This can happen when the future just disappeared from the dask-scheduler when this call was done."
)
running_states.append(DaskClientTaskState.ERRED)
running_states.append(DaskClientTaskState.LOST)
elif dask_status is None:
running_states.append(DaskClientTaskState.LOST)
else: