Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions distributed/dashboard/templates/file.html
Copy link
Member

Choose a reason for hiding this comment

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

@DimitriPapadopoulos this way we get full backwards/forwards compat

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for helping out, I wouldn't have guessed {% extends "file.html.jinja" %} can fail silently and fall back on {% extends "file.html" %}.

Looks perfect now.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{# Compatibility shim: bokeh >=3.9 renamed file.html to file.html.jinja #}
{% extends "file.html.jinja" %}
7 changes: 2 additions & 5 deletions distributed/dashboard/tests/test_scheduler_bokeh.py
Original file line number Diff line number Diff line change
Expand Up @@ -1341,10 +1341,7 @@ async def test_prefix_bokeh(s, a, b):
f"http://localhost:{s.http_server.port}/{prefix}/status"
)
assert response.code == 200
assert (
f'<script type="text/javascript" src="/{prefix}/static/'
in response.body.decode()
)
assert f'src="/{prefix}/static/' in response.body.decode()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps keep the leading space:

Suggested change
assert f'src="/{prefix}/static/' in response.body.decode()
assert f' src="/{prefix}/static/' in response.body.decode()


bokeh_app = s.http_application.applications[0]
assert isinstance(bokeh_app, BokehTornado)
Expand Down Expand Up @@ -1373,7 +1370,7 @@ async def test_bokeh_relative(s, a, b):
http_client = AsyncHTTPClient()
response = await http_client.fetch(f"http://localhost:{s.http_server.port}/status")
assert response.code == 200
assert '<script type="text/javascript" src="static/' in response.body.decode()
assert 'src="static/' in response.body.decode()


@gen_cluster(client=True, scheduler_kwargs={"dashboard": True})
Expand Down
Loading