-
Notifications
You must be signed in to change notification settings - Fork 64
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): Add Kubernetes refs to the JobSet OpenAPI swagger #810
fix(sdk): Add Kubernetes refs to the JobSet OpenAPI swagger #810
Conversation
Hi @andreyvelich. Thanks for your PR. I'm waiting for a kubernetes-sigs 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-sigs/prow repository. |
✅ Deploy Preview for kubernetes-sigs-jobset ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/ok-to-test |
Is this embedding all jobset api dependencies in jobset's python sdk? is this a common practice? |
/hold @andreyvelich is working on this for kubeflow. I don't have a strong stance on this but I'd like to get buy in from kubeflow's PR until we merge this one. |
Yes, otherwise the serialization will fail.
I noticed that Argo Workflows also import all Kubernetes dependencies in their SDK models: https://github.com/argoproj/argo-workflows/blob/main/sdks/python/client/argo_workflows/model/object_meta.py. Argo Workflows has the valid OpenAPI spec swagger with all definitions: https://github.com/argoproj/argo-workflows/blob/main/api/openapi-spec/swagger.json |
@kannon92 @ahg-g FYI, this fix also blocks us to use v0.8.0 JobSet Python package in our Kubeflow SDK. The same error user reported in Slack: |
Do we want to consider to cherry-pick it for v0.8.1 if that makes sense? |
I am ok to cherry-pick if this unblocks kubeflow trainer |
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.
/lgtm
Have we got consensus on the KubeFlow PR for this?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andreyvelich, kannon92 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 |
I think, so. |
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.
I'm ok for this PR:)
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.
/lgtm
Thank you.
Based on this comment. |
/cherry-pick release-0.8 |
1 similar comment
/cherry-pick release-0.8 |
@tenzen-y what are we missing to do this? Some kind of test-infra plugin? |
This one: kubernetes/test-infra#34463 |
/cherry-pick release-0.8 |
@tenzen-y: Failed to get PR patch from GitHub. This PR will need to be manually cherrypicked. Error messagestatus code 406 not one of [200], body: {"message":"Sorry, the diff exceeded the maximum number of lines (20000)","errors":[{"resource":"PullRequest","field":"diff","code":"too_large"}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#get-a-pull-request","status":"406"}In response to this:
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-sigs/prow repository. |
It seems that diff size exceeds the limits 😓 |
@andreyvelich can you create a manually cherry-pick for this into 0.8? |
…es-sigs#810) * Add Kubernetes refs to the JobSet OpenAPI spec * Remove SDK docs from generation
What type of PR is this?
/kind bug
What this PR does / why we need it:
After we migrated to the latest OpenAPI generator:
openapi-generator-cli:v7.11.0
, it generates JobSet models using the Pydantic library. It requires for all external models to be presented, otherwise serialization will fail:As you can see, the
JobsetV1alpha2JobSet
class depends onV1ObjectMeta
class which we don't import in thejobset_v1alpha2_job_set.py
file.To solve this problem, I've updated JobSet swagger to include external Kubernetes models, for instance
cc @tenzen-y @kannon92 @ahg-g @Electronic-Waste @danielvegamyhre @epicseven-cup @astefanutti
Special notes for your reviewer:
We need this fix for Kubeflow Trainer integration: kubeflow/trainer#2466
Does this PR introduce a user-facing change?