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

Generate 8.0.0 snapshot client on master branch #631

Merged

Conversation

roycaihw
Copy link
Member

@roycaihw roycaihw commented Sep 28, 2018

... against Kubernetes 1.12.0 openapi spec. Also update README and CHANGELOG about new feature, bug fix and API change.

Some upstream API changes that I'm not sure if they are client-facing (I guess minor):

Also from what I see, we intended to add dryRun option to CREATE/UPDATE/PATCH/DELETE verbs, but only DELETE has the dryRun option documented and generated. I will investigate if it's a upstream openapi spec documentation problem.

The next step is to fork master branch into release-8.0 branch, update version constants, and generate a 8.0.0a1 client (no API change, only version numbers change)

/assign @yliaog

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 28, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roycaihw

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 28, 2018
@@ -3,8 +3,8 @@ No description provided (generated by Swagger Codegen https://github.com/swagger

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: v1.11.3
- Package version: 7.0.0-snapshot
- API version: v1.12.1
Copy link
Contributor

Choose a reason for hiding this comment

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

k8s latest release is v1.12.0, why is here v1.12.1?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I also noticed this during client generation. The API version comes from the currently checked-in openapi spec on k/k release branch https://github.com/kubernetes/kubernetes/blob/release-1.12/api/openapi-spec/swagger.json

  "swagger": "2.0",
  "info": {
   "title": "Kubernetes",
   "version": "v1.12.1"
  },

The other release branches have the same behavior. I suppose when a patch release is cut (e.g. 1.11.3), the generated openapi spec shows the version for next patch release (1.11.4) that is open for cherry-pick.

I think it's a problem in our client generation code. We should probably curl the released source code to get the openapi spec, instead of downloading from the release branch: https://github.com/kubernetes-client/gen/blob/4aa859fc518385886434d9169a8e383dd1fd16c2/openapi/preprocess_spec.py#L312-L315

We are also exposed to non-deterministic client generation-- currently the client is said to be generated against API version v1.12.1, but there might be new API change introduced later to 1.12.1 that we didn't catch. That being said, in general I don't expect major API change getting introduced to patch release.

@@ -122,6 +123,7 @@ between client-python versions.
| 6.0 | Kubernetes main repo, 1.10 branch | ✓ |
| 7.0 Alpha/Beta | Kubernetes main repo, 1.11 branch | ✗ |
| 7.0 | Kubernetes main repo, 1.11 branch | ✓ |
| 8.0 Alpha/Beta | Kubernetes main repo, 1.12 branch | ✓ |

Copy link
Contributor

Choose a reason for hiding this comment

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

i think k8s only supports 3 versions, should we mark the older python client releases here as 'unsupported'?

Copy link
Member Author

Choose a reason for hiding this comment

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

Great point! I updated the matrix and also documented the support policy below.

@roycaihw roycaihw force-pushed the generate-8.0.0-snapshot branch 3 times, most recently from 7e0eb64 to 684a24e Compare October 1, 2018 20:40
@roycaihw
Copy link
Member Author

roycaihw commented Oct 1, 2018

Verified the two API changes in the first comment aren't client-facing. Also tracked the dry-run openapi spec issue in kubernetes/kubernetes#69304.

To properly support dry-run feature in this client, we need to cherrypick the doc fix to 1.12 in Kubernetes, and re-generate the client. I'm not certain if the fix will make it in 1.12.1 (which is when we target the 8.0.0b1 release). If we want to re-generate the client to support the dry-run feature, we probably need to do a 8.0.1(b1/GA) release later. @yliaog WDYT?

@yliaog
Copy link
Contributor

yliaog commented Oct 1, 2018

have you addressed the concerns you raised in the PR description?

kubernetes/kubernetes#66807
kubernetes/kubernetes#66581
Also from what I see, we intended to add dryRun option to CREATE/UPDATE/PATCH/DELETE verbs, but only DELETE has the dryRun option documented and generated. I will investigate if it's a upstream openapi spec documentation problem.

@roycaihw roycaihw force-pushed the generate-8.0.0-snapshot branch 2 times, most recently from 39660af to 510509d Compare October 1, 2018 21:11
@yliaog
Copy link
Contributor

yliaog commented Oct 1, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 1, 2018
@k8s-ci-robot k8s-ci-robot merged commit 5b2e27c into kubernetes-client:master Oct 1, 2018
@roycaihw roycaihw deleted the generate-8.0.0-snapshot branch October 1, 2018 21:36
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants