From 522977fde98265fb5c5000b537592b4bee16b30c Mon Sep 17 00:00:00 2001 From: Renmin Date: Thu, 30 Jul 2020 11:38:30 +0800 Subject: [PATCH] fix(sdk/client): reserve the host protocal (http or https) so that http host can work. Fixes #4277 (#4285) --- sdk/python/kfp/_client.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sdk/python/kfp/_client.py b/sdk/python/kfp/_client.py index 076bc7f7372..18df4aea326 100644 --- a/sdk/python/kfp/_client.py +++ b/sdk/python/kfp/_client.py @@ -139,11 +139,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: