Skip to content

Conversation

@douglasdavis
Copy link
Member

@douglasdavis douglasdavis commented Aug 25, 2021

the Scheduler.get_task_stream method creates a TaskStreamPlugin and adds it to the scheduler plugins via Scheduler.add_plugin; but TaskStreamPlugin.__init__ was also calling Scheduler.add_plugin, hence the warning. I removed the Scheduler.add_plugin call from TaskStreamPlugin.__init__, so I updated other TaskStreamPlugin tests to explicitly use Scheduler.add_plugin instead of relying on initialization to add the plugin.

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @douglasdavis! It looks like we're still getting

 distributed/dashboard/tests/test_scheduler_bokeh.py::test_simple
distributed/dashboard/tests/test_scheduler_bokeh.py::test_https_support
  /home/runner/work/distributed/distributed/distributed/scheduler.py:5483: UserWarning: Scheduler already contains a plugin with name graph-layout; overwriting.

Comment on lines 1945 to 1949
if GraphLayout.name in scheduler.plugins:
self.layout = scheduler.plugins[GraphLayout.name]
else:
self.layout = GraphLayout(scheduler)
scheduler.add_plugin(self.layout)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out that using a unique name here breaks the task graph dashboard plot even though tests pass. Instead of seeing the rendered task graph, the plot is blank.

Locally I tested out assigning a unique name and this seems to fixes things (both tests pass and when I manually look at the task graph plot, everything is as expected). I suspect this is an unexpected side-effect which has always been here, but previously went unnoticed, and the recent switch around how we store scheduler plugins made this more obvious.

Ideally we'd only have a single GraphLayout plugin running on the scheduler and multiple dashboard plots can then access the state stored on that plugin. I'll spend a few minutes seeing if I can get things to work in this manner. If I'm not successful after a bit, let's just go with generating a unique name for each GraphLayout plugin and open an issue to track follow-up work.

Copy link
Member

@jrbourbeau jrbourbeau Sep 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going with using a unique name for each GraphLayout plugin instance. This is inefficient, but consistent what our previous behavior was. I'll open an issue to track future work

Copy link
Member Author

@douglasdavis douglasdavis Sep 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jrbourbeau thanks for picking this up! I was wrestling this earlier in the week and and also went the uuid route (which I also thought was a bit of a band-aid, so I wanted to come back and try to think of something else). I also agree with your take on the unnoticed previous behavior. I'll be happy to follow up on a new issue after getting this taken care of for the release.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds great. It sounds like you did some of the same debugging I did and have a good understanding of the issue we want to address here. Could I ask you to open up an issue which documents this? No worries if you're busy with other things

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Just opened #5294

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @douglasdavis!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduler plugin warnings

2 participants