diff --git a/metadata-ingestion/src/datahub/cli/cli_utils.py b/metadata-ingestion/src/datahub/cli/cli_utils.py index 1b9cccb1cbc215..f80181192ba583 100644 --- a/metadata-ingestion/src/datahub/cli/cli_utils.py +++ b/metadata-ingestion/src/datahub/cli/cli_utils.py @@ -327,6 +327,8 @@ def _ensure_valid_gms_url_acryl_cloud(url: str) -> str: url = f"{url}/gms" elif url.endswith("acryl.io/"): url = f"{url}gms" + if url.endswith("acryl.io/api/gms"): + url = url.replace("acryl.io/api/gms", "acryl.io/gms") return url diff --git a/metadata-ingestion/tests/unit/cli/test_cli_utils.py b/metadata-ingestion/tests/unit/cli/test_cli_utils.py index af3a184d97e41c..c9693c75d96fe9 100644 --- a/metadata-ingestion/tests/unit/cli/test_cli_utils.py +++ b/metadata-ingestion/tests/unit/cli/test_cli_utils.py @@ -66,6 +66,10 @@ def test_fixup_gms_url(): assert cli_utils.fixup_gms_url("http://localhost:8080") == "http://localhost:8080" assert cli_utils.fixup_gms_url("http://localhost:8080/") == "http://localhost:8080" assert cli_utils.fixup_gms_url("http://abc.acryl.io") == "https://abc.acryl.io/gms" + assert ( + cli_utils.fixup_gms_url("http://abc.acryl.io/api/gms") + == "https://abc.acryl.io/gms" + ) def test_guess_frontend_url_from_gms_url():