Skip to content

Commit

Permalink
fix(sdk/client): reserve the host protocal (http or https) so that ht…
Browse files Browse the repository at this point in the history
…tp host can work. Fixes #4277 (#4285)
  • Loading branch information
Renmin authored Jul 30, 2020
1 parent c7300c3 commit cc78bd1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sdk/python/kfp/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,8 @@ def _load_config(self, host, client_id, namespace, other_client_id, other_client

host = host or ''
# Preprocess the host endpoint to prevent some common user mistakes.
# This should only be done for non-IAP cases (when client_id is None). IAP requires preserving the protocol.
if not client_id:
# Per feedback in proxy env, http or https is still required
if not proxy:
host = re.sub(r'^(http|https)://', '', host)
# always preserving the protocol (http://localhost requires it)
host = host.rstrip('/')

if host:
Expand Down

0 comments on commit cc78bd1

Please sign in to comment.