Closed jacobtomlinson closed 1 month ago
_See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests._
25 files ±0 25 suites ±0 10h 18m 23s :stopwatch: - 5m 4s 4 130 tests ±0 4 016 :white_check_mark: +1 110 :zzz: ±0 4 :x: - 1 47 708 runs ±0 45 607 :white_check_mark: - 1 2 096 :zzz: +1 5 :x: ±0
For more details on these failures, see this check.
Results for commit 9be2d8db. ± Comparison against base commit 9bec841a.
The
Client.register_plugin()
method uses@functools.singledispatchmethod
to dispatch to the correct plugin registration method. Howeversingledispatchmethod
doesn't like thedask.distributed
import shim and can't determine thatdask.distributed.diagnostics.plugins.WorkerPlugin
is the same asdistributed.diagnostics.plugins.WorkerPlugin
.This means that plugins based on classes like
dask.distributed.diagnostics.plugins.WorkerPlugin
raise theTypeError("Registering duck-typed plugins is not allowed. Please inherit from NannyPlugin, WorkerPlugin, or SchedulerPlugin to create a plugin.")
exception.I explored importing the base classes from the
dask.distributed
path and registering those for dispatch too, but it's not possible to import them fromdask.distributed.diagnostics.plugins
whiledistributed
is being imported. And it's not possible to register them at runtime, only at import time.Therefore the best option here appears to be to improve the error message. So this PR checks for plugins based on classes from
dask.distributed.diagnostics.plugins
and makes the error message more helpful.Closes #8778
pre-commit run --all-files