What happened:
When calling on the Scheduller the method add_plugin the method start on the SchedullerPlugin is not called.
What you expected to happen:
I expect the method start to be called. This is what is happening to the plugins set from the __init___ method of the scheduler. However I'm not sure this is expected behavior or bug. Please confirm why they are this discrepancy, as I would expect the scheduler to call the start method on all the plugins.
Minimal Complete Verifiable Example:
@pytest.mark.asyncio
async def test_k8s_plugin_initialize_cluster(k8s_cluster, docker_image):
scheduler = Scheduler()
await scheduler.start()
pod_spec = make_pod_spec(
docker_image,
extra_container_config={
"imagePullPolicy": "IfNotPresent",
"securityContext": {"runAsUser": 0},
},
)
plugin = KubernetesAutoScaler(pod_spec, 0, 4)
scheduler.add_plugin(plugin)
# await plugin.start(scheduler=scheduler)
assert plugin._cluster is not None
assert plugin._cluster.status ==Status.running
Anything else we need to know?:
This is for a new plugin I'm writing for kubernetes dask/dask-kubernetes#377
Environment:
- Dask version: Latest
- Python version: All
- Operating System: Na
- Install method (conda, pip, source): Implementing new test
What happened:
When calling on the
Schedullerthe methodadd_pluginthe methodstarton theSchedullerPluginis not called.What you expected to happen:
I expect the method
startto be called. This is what is happening to the plugins set from the__init___method of the scheduler. However I'm not sure this is expected behavior or bug. Please confirm why they are this discrepancy, as I would expect the scheduler to call thestartmethod on all the plugins.Minimal Complete Verifiable Example:
Anything else we need to know?:
This is for a new plugin I'm writing for kubernetes dask/dask-kubernetes#377
Environment: