-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(sdk): Respect namespace if set on client #7056
fix(sdk): Respect namespace if set on client #7056
Conversation
Hi @casassg. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
/ok-to-test
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.
/hold
sdk/python/kfp/_client.py
Outdated
@@ -188,8 +194,7 @@ def __init__(self, | |||
api_client) | |||
self._healthz_api = kfp_server_api.api.healthz_service_api.HealthzServiceApi( |
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.
Actually, self.get_kfp_healthz()
relies on self._healthz_api
being initialized first. If you move self.get_kfp_healthz()
up, it will never succeed.
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.
True that. Made logic simpler.
I basically set the namespace if user has explicitly called out namespace. I only ovewrite current instance though to avoid having side effects and changing the default which is written in the file.
@chensun guessing you are on vacation, just wanted to gently message here :D Happy holidays! |
/lgtm @casassg Can you please add a release note for this change? Thanks! |
@chensun I can create the cherry-pick as it gets merged, since commit will be squashed then |
sdk/RELEASE.md
Outdated
@@ -9,6 +9,7 @@ | |||
* Add ImporterSpec v2 [\#6917](https://github.com/kubeflow/pipelines/pull/6917) | |||
* Add add set_env_variable for Pipeline task [\#6919](https://github.com/kubeflow/pipelines/pull/6919) | |||
* Add metadata field for importer [\#7112](https://github.com/kubeflow/pipelines/pull/7112) | |||
* kfp.Client uses namespace from initialization if set for the instance context. |
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.
nit: Add a link to the PR like the rest.
/lgtm Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chensun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* respect namespace if set on client * make sure is_multi_user * overwrite directly context_setting * revert non-related changes * revert overwrite_namespace * expand text * add release notes * add PR link
…7182 into sdk/release-1.8 branch. (#7200) * test: fix tfx presubmit test. (#7143) * fix(sdk): Respect namespace if set on client (#7056) * respect namespace if set on client * make sure is_multi_user * overwrite directly context_setting * revert non-related changes * revert overwrite_namespace * expand text * add release notes * add PR link * fix(sdk): Support per workflow TTL (ttl_seconds_after_finished) with new format of Argo workflow manifest (#7141) * Support per workflow TTL (ttl_seconds_after_finished) with new format of Argo workflow manifest * Update test for TTL * Declare fix in release note of SDK * update syntaxe * Update RELEASE.md Add Braking change due to incompatibility with KFP pre 1.7 due to Argo 2.X * chore(sdk): Remove redundant check in set_gpu_limit (#6866) * remove redundant check in set_gpu_limit * release note * fix(sdk): Fix create_runtime_artifact not covering all types. (#7168) * Fix create_runtime_artifact not covering all types. * release note * fix(sdk): bumps up absl version to 1.x for compatibility with TF 2.8+. Fixes #7171 (#7172) * Bumps up absl version to 1.x for compatibility with TF 2.8+. * Adds a release note for absl version. * chore(sdk): Update SDK release note for the upcoming 1.8.11 release (#7182) Co-authored-by: Gerard Casas Saez <gcasassaez@twitter.com> Co-authored-by: Seb <sebastien.blin@gmail.com> Co-authored-by: Jiyong Jung <jiyongjung@google.com>
Description of your changes:
Currently kfp.Client ignores if namespace is set on constructor. This leads to having to shortly after having to invoke set_user_namespace, which makes it non-obvious.
Instead here, we add set_user_namespace on constructor, which allows us to avoid having to do 2 calls.