From bd858030ec719539f1ea7cf20870c308aa4958d7 Mon Sep 17 00:00:00 2001 From: Chen Sun Date: Thu, 2 Apr 2020 17:19:46 -0700 Subject: [PATCH] Skip host name preprocess for the IAP case (#3427) --- sdk/python/kfp/_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/python/kfp/_client.py b/sdk/python/kfp/_client.py index 84215afcde6..67d86df141a 100644 --- a/sdk/python/kfp/_client.py +++ b/sdk/python/kfp/_client.py @@ -118,7 +118,9 @@ 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. - host = re.sub(r'^(http|https)://', '', host).rstrip('/') + # This should only be done for non-IAP cases (when client_id is None). IAP requires preserving the protocol. + if not client_id: + host = re.sub(r'^(http|https)://', '', host).rstrip('/') if host: config.host = host