You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preload teardown failure interferes with scheduler idle timeout #6437
Earlier today I ran into a situation where a scheduler preload script had a teardown method failure which caused the scheduler's automatic idle timeout to not work. Here's a quick reproducer in the form of a test:
importasynciofromdistributed.utils_testimportgen_clusterfromdistributed.coreimportStatusbad_preload_text="""def dask_setup(scheduler): scheduler.foo = 'setup'def dask_teardown(scheduler): raise ValueError('ASDF')"""@gen_cluster(client=True,config={"distributed.scheduler.idle-timeout": "5s","distributed.scheduler.preload": [bad_preload_text], },)asyncdeftest_idle_timeout_preload_error(c, s, a, b):
asserts.foo=="setup"# Confirm preload was run on setupwhiles.status!=Status.closed:
print(f"{s.status=}")
awaitasyncio.sleep(0.1)
Currently this test hangs due to the ValueError raised in the preload dask_teardown method. If you replace, for example, raise ValueError('ASDF') with a simple return then the test passes
Activity