[jobs] Support ray client format of connection string address for external module (#22116)

Ray client currently supports connection strings for external modules of the format `"other_module://"`, however `ray job` commands don't support this format because trailing `/` is removed. Update so `ray job` commands also support this format.
This commit is contained in:
Nikita Vemuri 2022-02-04 11:35:10 -08:00 committed by GitHub
parent 014a9959f1
commit d9dc388082
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -98,7 +98,7 @@ def parse_cluster_info(
metadata: Optional[Dict[str, Any]] = None,
headers: Optional[Dict[str, Any]] = None,
) -> ClusterInfo:
module_string, inner_address = _split_address(address.rstrip("/"))
module_string, inner_address = _split_address(address)
# If user passes http(s):// or ray://, go through normal parsing.
if module_string in {"http", "https", "ray"}:

View file

@ -21,6 +21,7 @@ from ray._private.test_utils import (
"localhost:1234",
"localhost:1234/url?params",
"1.2.3.4/cluster-1?test_param=param1?",
"",
],
)
def test_split_address(address):