Repository navigation
Closed
Description
CI has started failing after bokeh was upgraded from 2.2 to 2.3:
______________________________ test_profiler_plot ______________________________
[gw1] linux -- Python 3.8.8 /usr/share/miniconda3/envs/test-environment/bin/python
@pytest.mark.skipif("not bokeh")
@ignore_abc_warning
def test_profiler_plot():
with prof:
get(dsk, "e")
p = prof.visualize(
plot_width=500,
plot_height=300,
tools="hover",
title="Not the default",
show=False,
save=False,
)
> assert p.plot_width == 500
E AssertionError: assert 800 == 500
E + where 800 = Figure(id='1002', ...).plot_width
dask/diagnostics/tests/test_profiler.py:241: AssertionError
_________________________ test_resource_profiler_plot __________________________
[gw1] linux -- Python 3.8.8 /usr/share/miniconda3/envs/test-environment/bin/python
@pytest.mark.skipif("not bokeh")
@pytest.mark.skipif("not psutil")
@ignore_abc_warning
def test_resource_profiler_plot():
with ResourceProfiler(dt=0.01) as rprof:
get(dsk2, "c")
p = rprof.visualize(
plot_width=500,
plot_height=300,
tools="hover",
title="Not the default",
show=False,
save=False,
)
> assert p.plot_width == 500
E AssertionError: assert 800 == 500
E + where 800 = Figure(id='1038', ...).plot_width
dask/diagnostics/tests/test_profiler.py:268: AssertionError
___________________________ test_cache_profiler_plot ___________________________
[gw1] linux -- Python 3.8.8 /usr/share/miniconda3/envs/test-environment/bin/python
@pytest.mark.skipif("not bokeh")
@ignore_abc_warning
def test_cache_profiler_plot():
with CacheProfiler(metric_name="non-standard") as cprof:
get(dsk, "e")
p = cprof.visualize(
plot_width=500,
plot_height=300,
tools="hover",
title="Not the default",
show=False,
save=False,
)
> assert p.plot_width == 500
E AssertionError: assert 800 == 500
E + where 800 = Figure(id='1095', ...).plot_width
dask/diagnostics/tests/test_profiler.py:303: AssertionError
Metadata
Metadata
Assignees
Labels
No labels
Activity
jrbourbeau commentedon Mar 1, 2021
Thanks for reporting @crusaderky. Cross-referencing dask/distributed#4534 as it's likely related. Also cc @quasiben visibility
jrbourbeau commentedon Mar 1, 2021
xref bokeh/bokeh#10978
quasiben commentedon Mar 1, 2021
Thanks for the ping @jrbourbeau and @crusaderky for reporting. I'll take a look
bryevdv commentedon Mar 1, 2021
The change was to use
widthandheightfor plots, to (finally) bring them in to alignment with every single other layout-able in Bokeh. However, we leftplot_widthandplot_heightas read/writable aliases, and thought that would be sufficient compatibility (but evidently not). Some thoughts:widthandheightMost importantly (to me) why are these tests not part of the downstream tests we run?
https://github.com/bokeh/bokeh/runs/2001140304?check_suite_focus=true#step:11:24
For reference the test runs
pytest distributed/dashboardI care very deeply about not breaking Dask specifically, but we need some collaboration/dask expertise in order to have the most thorough downstream tests possible.Also last question: is this only an issue for tests on your end? I.e. does it not affect actual users during normal usage? I was not able to see any problems when I was testing manually with Dask before the release, but I may just not know enough to spot problems. If it is just an issue with tests, then I think the minimal appropriate response is to just update the tests.
jrbourbeau commentedon Mar 1, 2021
Thank you for your help @bryevdv. Should we dispatch using
width/heightorplot_width/plot_heightbased on the version ofbokehusers have or is usingwidth/heightbackwards compatible?It looks like bokeh-related tests for
distributedare run but not the bokeh-related tests insidedask. For reference,pytest dask/diagnosticsshould catch all tests bokeh-related tests within thedaskcodebase. Also, it's really great to see the existence of an upstream CI build inbokeh: )This does impact users which specify their own
plot_width=/plot_height=keyword argument. Looking atit appears that a user's request for a specific width / height is ignored today
bryevdv commentedon Mar 1, 2021
AFAIK it is backwards compatible up to some point, but I will have to investigate and get back to you about just how far back that was introduced. cc @mattpap
bryevdv commentedon Mar 1, 2021
@jrbourbeau This seems to work at least as far back as 1.0.0
Is that far enough?
widthandheightare also part ofproperties()as welljrbourbeau commentedon Mar 1, 2021
Going back to 1.0.0 is perfect as that's our minimum supported bokeh version
dask/setup.py
Line 26 in ff63ae7
Also, FWIW I opened up bokeh/bokeh#10979 to add
dask/dasktests to bokeh's downstream CI build