Skip to content

Commit

Permalink
fix(cli): don't use /api in gms url
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal committed Dec 10, 2024
1 parent 61fffb2 commit 7b3ba95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metadata-ingestion/src/datahub/cli/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions metadata-ingestion/tests/unit/cli/test_cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 7b3ba95

Please sign in to comment.