-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix get client in flyte-cli commands #1063
Conversation
…li/main.py Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1063 +/- ##
=======================================
Coverage 86.50% 86.51%
=======================================
Files 267 268 +1
Lines 24847 24864 +17
Branches 2797 2799 +2
=======================================
+ Hits 21493 21510 +17
Misses 2877 2877
Partials 477 477 ☔ View full report in Codecov by Sentry. |
@@ -276,7 +277,7 @@ def _get_client(host: str, insecure: bool) -> _friendly_client.SynchronousFlyteC | |||
if parent_ctx.obj["cacert"]: | |||
kwargs["root_certificates"] = parent_ctx.obj["cacert"] | |||
cfg = parent_ctx.obj["config"] | |||
cfg = cfg.with_parameters(endpoint=host, insecure=insecure) | |||
cfg = replace(cfg, endpoint=host, insecure=insecure) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL
* Replace fields of platform_config with dataclasses.replace in flyte-cli/main.py Signed-off-by: Eduardo Apolinario <[email protected]> * Remove with_parameters Signed-off-by: Eduardo Apolinario <[email protected]> Co-authored-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario [email protected]
TL;DR
Fix copy of dataclass in get_client in flyte-cli commands
Type
Are all requirements met?
Complete description
Used
dataclasses.replace
to generate a copy of the PlatformConfig instead of thewith_parameters
.Tracking Issue
flyteorg/flyte#2614
Follow-up issue
NA
OR
https://github.com/flyteorg/flyte/issues/