Skip to content

Commit da52c07

Browse files
RenminBobgy
Renmin
authored andcommitted
fix(sdk/client): reserve the host protocal (http or https) so that http host can work. Fixes #4277 (#4285)
1 parent 9c16e12 commit da52c07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk/python/kfp/_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ def _load_config(self, host, client_id, namespace, other_client_id, other_client
122122

123123
host = host or ''
124124
# Preprocess the host endpoint to prevent some common user mistakes.
125-
# This should only be done for non-IAP cases (when client_id is None). IAP requires preserving the protocol.
126125
if not client_id:
127-
host = re.sub(r'^(http|https)://', '', host).rstrip('/')
126+
# always preserving the protocol (http://localhost requires it)
127+
host = host.rstrip('/')
128128

129129
if host:
130130
config.host = host

0 commit comments

Comments
 (0)