Repository: dask/distributed

Issue:
Bokeh 3.0 interface changes break performance_report
**What happened**:

When `distributed` installed via pip `bokeh` `3.0.0dev2` is installed as a dependency. As of version `3`, the `render_mode` argument of `bokeh.models.annotations.LabelSet` has been removed, resulting in an error whilst producing the report. Bokeh [recommends](https://github.com/bokeh/bokeh/blob/b30d44b6759cf41236b6a5b90ab1531608a8dcb4/sphinx/source/docs/releases/3.0.0.rst#render_mode) replacing `LabelSet` with `HTMLLabelSet` where `render_mode="css"` was previously used.

For now I have pinned boken to `2.4.2` as a workaround.


**What you expected to happen**:

The code within the `performance_report` is executed, after which a report is produced.

**Minimal Complete Verifiable Example**:

```python
from distributed import Client, performance_report
client = Client() 

with performance_report():
    pass
```

**Anything else we need to know?**:

Happy to submit a PR to replace the instances of `LabelSet` [here](https://github.com/dask/distributed/blob/fa326d5b2c41b0bfe190559c676c0d57d42362ce/distributed/dashboard/components/shared.py#L445) & [here](https://github.com/dask/distributed/blob/fa326d5b2c41b0bfe190559c676c0d57d42362ce/distributed/dashboard/components/shared.py#L468) if that's the route to be taken.

**Environment**:

- Dask version: 2021.12.0
- Python version: 3.9.6
- Operating System: Red Hat Enterprise Linux release 8.5 (Ootpa)
- Install method (conda, pip, source): pip


Discussion:
A PR would definitely be welcome, but I'm also interested in how exactly you ended up with `bokeh 3.0.0dev2` installed. That feels like something that you should have to specifically try to get rather than coming by default. I tried to reproduce your install process:

```bash
conda create -n dask-pip python=3.9
conda activate dask-pip
pip install distributed  # does not install bokeh
pip install dask[complete]  # does install bokeh, but used bokeh 2.4.2 for me
```

I'm not sure if the reason I got bokeh 2.4.2 is just because I already had that cached though. 
Thanks @garryod, a PR would be welcome. It looks like `bokeh`s downstream CI build caught this (and other issues) https://github.com/bokeh/bokeh/runs/4551763507?check_suite_focus=true. cc @bryevdv for visibility 
Looks like our internal pypi server is to blame for serving me the wrong version. I've been unable to reproduce the issue using the official pypi server. Will pop the PR in regardless.
Do you actually need `render_mode="css"`? If not, a change compatible with 2.x and 3.x would be to just to remove that parameter and use default canvas rendering. 
Good point. It looks like we only use `render_mode=` in the system plot. I'm not sure if it's needed, when I comment it out locally the system plot looks the same. cc @charlesbluca who added `render_mode=` in https://github.com/dask/distributed/pull/4561
Thanks for the ping @jrbourbeau; I can't remember any obvious reason why I set `render_mode` explicitly in that PR, so I would say if things look the same when we leave it as default it should be safe to remove the kwargs.
CSS render mode is mostly useful if you need to have more sophisticated styling. Canvas basically has font size and font style (only normal, bold, italic) and that's it. If more options are needed, you can use CSS render mode and provide some custom CSS to add whatever fancier styles the label needs. 
Thanks for clarifying @charlesbluca @bryevdv. Sounds like we don't need `render_mode` -- @garryod if you could push up a PR that removes that keyword, that would be great 

Resolving patch:
diff --git a/distributed/dashboard/components/shared.py b/distributed/dashboard/components/shared.py
--- a/distributed/dashboard/components/shared.py
+++ b/distributed/dashboard/components/shared.py
@@ -449,7 +449,6 @@ def __init__(self, worker, height=150, last_count=None, **kwargs):
                 y_units="screen",
                 text="cpu",
                 text_font_size="1em",
-                render_mode="css",
                 source=self.label_source,
             )
         )
@@ -472,7 +471,6 @@ def __init__(self, worker, height=150, last_count=None, **kwargs):
                 y_units="screen",
                 text="memory",
                 text_font_size="1em",
-                render_mode="css",
                 source=self.label_source,
             )
         )


Test patch: