Skip to content

Commit

Permalink
Add http_proxy to client & Fix deviceflow (#1611)
Browse files Browse the repository at this point in the history
* Add http_proxy to client & Fix deviceflow

RB=3890720

Signed-off-by: byhsu <byhsu@linkedin.com>

* nit

Signed-off-by: byhsu <byhsu@linkedin.com>

* lint!

Signed-off-by: byhsu <byhsu@linkedin.com>

---------

Signed-off-by: byhsu <byhsu@linkedin.com>
Co-authored-by: byhsu <byhsu@linkedin.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
2 people authored and eapolinario committed Jul 10, 2023
1 parent ebd916a commit 88afc39
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions flytekit/clients/auth/token_client.py
Original file line number Diff line number Diff line change
@@ -105,6 +105,9 @@ def get_token(
proxies = {"https": http_proxy_url, "http": http_proxy_url} if http_proxy_url else None
response = requests.post(token_endpoint, data=body, headers=headers, proxies=proxies, verify=verify)

proxies = {"https": http_proxy_url, "http": http_proxy_url} if http_proxy_url else None
response = requests.post(token_endpoint, data=body, headers=headers, proxies=proxies)

if not response.ok:
j = response.json()
if "error" in j:
1 change: 0 additions & 1 deletion flytekit/configuration/__init__.py
Original file line number Diff line number Diff line change
@@ -428,7 +428,6 @@ def auto(cls, config_file: typing.Optional[typing.Union[str, ConfigFile]] = None
kwargs = set_if_exists(kwargs, "auth_mode", _internal.Credentials.AUTH_MODE.read(config_file))
kwargs = set_if_exists(kwargs, "endpoint", _internal.Platform.URL.read(config_file))
kwargs = set_if_exists(kwargs, "console_endpoint", _internal.Platform.CONSOLE_ENDPOINT.read(config_file))

kwargs = set_if_exists(kwargs, "http_proxy_url", _internal.Platform.HTTP_PROXY_URL.read(config_file))
return PlatformConfig(**kwargs)

0 comments on commit 88afc39

Please sign in to comment.