mirror of
https://github.com/vale981/ray
synced 2025-03-05 18:11:42 -05:00
fix external dashboard url if connecting to existing cluster (#27807)
Signed-off-by: Nikita Vemuri <nikitavemuri@gmail.com>
This commit is contained in:
parent
b1cad0a112
commit
87dd078e1e
2 changed files with 23 additions and 1 deletions
|
@ -903,7 +903,7 @@ class Node:
|
|||
]
|
||||
self.get_gcs_client().internal_kv_put(
|
||||
b"webui:url",
|
||||
self._webui_url.encode(),
|
||||
self._webui_url_with_protocol.encode(),
|
||||
True,
|
||||
ray_constants.KV_NAMESPACE_DASHBOARD,
|
||||
)
|
||||
|
|
|
@ -165,6 +165,28 @@ def test_hosted_external_dashboard_url_with_ray_client(
|
|||
assert info.dashboard_url == "external_dashboard_url"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"call_ray_start",
|
||||
["ray start --head --ray-client-server-port 25553 --port 0"],
|
||||
indirect=True,
|
||||
)
|
||||
def test_hosted_external_dashboard_url_with_connecting_to_existing_cluster(
|
||||
set_override_dashboard_url, call_ray_start
|
||||
):
|
||||
"""
|
||||
Test setting external dashboard URL through environment variable
|
||||
when connecting to existing Ray cluster
|
||||
"""
|
||||
info = ray.init()
|
||||
assert info.dashboard_url == "external_dashboard_url"
|
||||
assert info.address_info["webui_url"] == "external_dashboard_url"
|
||||
assert (
|
||||
ray._private.worker._global_node.webui_url_with_protocol
|
||||
== "https://external_dashboard_url"
|
||||
)
|
||||
assert ray_address_to_api_server_url("auto") == "https://external_dashboard_url"
|
||||
|
||||
|
||||
def test_shutdown_and_reset_global_worker(shutdown_only):
|
||||
ray.init(job_config=ray.job_config.JobConfig(code_search_path=["a"]))
|
||||
ray.shutdown()
|
||||
|
|
Loading…
Add table
Reference in a new issue