Skip to content

Commit

Permalink
fix(cli): correct url ending with acryl.io:8080 (datahub-project#12289)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal authored Jan 8, 2025
1 parent 0fe4163 commit a4c47fa
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 @@ -330,6 +330,8 @@ def get_frontend_session_login_as(
def _ensure_valid_gms_url_acryl_cloud(url: str) -> str:
if "acryl.io" not in url:
return url
if url.endswith(":8080"):
url = url.replace(":8080", "")
if url.startswith("http://"):
url = url.replace("http://", "https://")
if url.endswith("acryl.io"):
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 @@ -70,6 +70,10 @@ def test_fixup_gms_url():
cli_utils.fixup_gms_url("http://abc.acryl.io/api/gms")
== "https://abc.acryl.io/gms"
)
assert (
cli_utils.fixup_gms_url("http://abcd.acryl.io:8080")
== "https://abcd.acryl.io/gms"
)


def test_guess_frontend_url_from_gms_url():
Expand Down

0 comments on commit a4c47fa

Please sign in to comment.