Skip to content
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

feat(sdk): Add version description optionally to Py SDK. Part of #6256 #6472

Merged

Conversation

casassg
Copy link
Contributor

@casassg casassg commented Aug 30, 2021

@google-oss-robot
Copy link

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@casassg
Copy link
Contributor Author

casassg commented Aug 30, 2021

@Bobgy should we bump up the kfp-server-api dep here to make sure it doesnt break when description is released? or should I add a better warning if it fails?

@Bobgy
Copy link
Contributor

Bobgy commented Sep 7, 2021

@Bobgy should we bump up the kfp-server-api dep here to make sure it doesnt break when description is released? or should I add a better warning if it fails?

Hi @casassg, sorry for late reply.

I think a better warning is more appropriate, because users' kfp-server-api should always be the same version as their KFP backend. Forcing users who upgraded their SDKs to also upgrade the kfp-server-api version is not a good practice.

cc @chensun @capri-xiyue what are your thoughts?

@capri-xiyue
Copy link
Contributor

@Bobgy should we bump up the kfp-server-api dep here to make sure it doesnt break when description is released? or should I add a better warning if it fails?

Hi @casassg, sorry for late reply.

I think a better warning is more appropriate, because users' kfp-server-api should always be the same version as their KFP backend. Forcing users who upgraded their SDKs to also upgrade the kfp-server-api version is not a good practice.

cc @chensun @capri-xiyue what are your thoughts?

I think warning makes more sense.

@casassg casassg force-pushed the gcasassaez/fix-kdp-sdk-description branch from cf0dd67 to f38ecb3 Compare September 8, 2021 02:07
@casassg
Copy link
Contributor Author

casassg commented Sep 8, 2021

Use try/except to do backwards compatible support. I could use if/else statement based on server version, but it may make code more complex. Happy to implement though!

pipeline_package_path, **kwargs)
except kfp_server_api.exceptions.ApiTypeError as e:
# ToDo: Remove this once we drop support for kfp_server_api < 1.7
if 'description' in e.message:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I wonder if there could be a more specific and reliable check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a bit more of specific. But it's hard since the arguments accepted are just a local variable of the function generated by OpenAPI spec. Open to alternatives

@chensun
Copy link
Member

chensun commented Sep 8, 2021

/ok-to-test

@chensun
Copy link
Member

chensun commented Sep 10, 2021

/lgtm

except kfp_server_api.exceptions.ApiTypeError as e:
# ToDo: Remove this once we drop support for kfp_server_api < 1.7
if 'description' in e.message:
logging.warning(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure of what others think, but my understanding is to just throw this error message.
Because it's better the user upgrades KFP server api when they see this error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, on a second thought, error might be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a NotImplementedError?

sdk/python/kfp/_client.py Outdated Show resolved Hide resolved
@chensun chensun removed the lgtm label Sep 13, 2021
@zijianjoy
Copy link
Collaborator

Friendly ping @casassg , would you like to update this PR according to comments? We can close the issue after merging this PR. Feel free to hand it over to @Bobgy @chensun if you don't have time.

@casassg
Copy link
Contributor Author

casassg commented Sep 28, 2021

(sorry folks, went on PTO to visit back home for 2 weeks, will try to get to this early next week. if someone is available before then please don't hesitate to take it from me!)

@casassg
Copy link
Contributor Author

casassg commented Sep 29, 2021

Also, note that until 19b3de4 gets released, we don't have a public version that supports this. This is due to me forgetting about the upload_pipeline_version method which does not use the protobuf definition.

Assumed in wording it's the 1.7.1 release, but lmk if that's not the case.

@casassg
Copy link
Contributor Author

casassg commented Oct 6, 2021

Bringing it back up @chensun @Bobgy

@chensun
Copy link
Member

chensun commented Oct 12, 2021

/lgtm

@Bobgy do you want to take a look as well?

@casassg
Copy link
Contributor Author

casassg commented Oct 12, 2021

also, is there a release for KFP upcoming for KF 1.4?

@casassg
Copy link
Contributor Author

casassg commented Oct 22, 2021

rebumping this up @Bobgy

@chensun
Copy link
Member

chensun commented Oct 25, 2021

/approve

@google-oss-robot
Copy link

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot google-oss-robot merged commit 5dfae1d into kubeflow:master Oct 25, 2021
@casassg casassg deleted the gcasassaez/fix-kdp-sdk-description branch October 26, 2021 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants