Skip to content

Commit edac755

Browse files
authored
simplify the url pattern for cluster_id (#272)
rather than requiring it to look like a UUID, accept any single URL path component results in clearer error: "no such cluster" instead of generic 404 with no matching router and allows for alternate id patterns (e.g. Gateway clusters, which already have ids)
1 parent 39b69ac commit edac755

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dask_labextension/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def load_jupyter_server_extension(nb_server_app):
3030
Args:
3131
nb_server_app (NotebookWebApplication): handle to the Notebook webserver instance.
3232
"""
33-
cluster_id_regex = r"(?P<cluster_id>\w+-\w+-\w+-\w+-\w+)"
33+
cluster_id_regex = r"(?P<cluster_id>[^/]+)"
3434
web_app = nb_server_app.web_app
3535
base_url = web_app.settings["base_url"]
3636
get_cluster_path = url_path_join(base_url, "dask/clusters/" + cluster_id_regex)

0 commit comments

Comments
 (0)