-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Release 11.0.0a1 #931
Release 11.0.0a1 #931
Conversation
Do you mean 11.0.0a1? |
@@ -47,6 +47,13 @@ if [[ -z ${GEN_ROOT:-} ]]; then | |||
GEN_ROOT="${TEMP_FOLDER}/gen" | |||
echo ">>> Cloning gen repo" | |||
git clone --recursive https://github.com/kubernetes-client/gen.git "${GEN_ROOT}" | |||
# pick https://github.com/kubernetes-client/gen/pull/97 | |||
cd "${GEN_ROOT}" | |||
git remote add tomplus https://github.com/tomplus/gen.git |
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.
it is a personal repo. does openapi generator have an official repo?
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 think Roy is trying to pick the kubernetes-client/gen changes by tomplus
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.
Why not merge this kubernetes-client/gen#97 it first?
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.
Talked with @yliaog offline. This is picking kubernetes-client/gen#97 into gen
repo before we have it approved and merged. Timing-wise I can go with having this pick for the alpha release. For beta release we should definitely use upstream gen
with kubernetes-client/gen#97 merged
CHANGELOG.md
Outdated
- The Python client will be generated by openapi-generator, with the following breaking changes [kubernetes-client/gen#97](https://github.com/kubernetes-client/gen/pull/97) | ||
- `kubernetes.client.apis` package is renamed to `kubernetes.client.api` | ||
- `kubernetes` package code now uses absolute import instead of relative import | ||
- API requests won't have `Content-Type` specified in HTTP headers |
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.
would this not cause problem? we use json, or proto.
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 interpreted the change wrong. The code generator just omitted the content type if the request doesn't have a body. I removed this note from the changelog since it's not user-facing.
kubernetes/README.md
Outdated
@@ -17,9 +17,9 @@ Python 2.7 and 3.4+ | |||
If the python package is hosted on Github, you can install directly from Github | |||
|
|||
```sh | |||
pip install git+https://github.com/kubernetes-kubernetes.client/python.git |
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.
so it was not working before? what caused this change?
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.
this is an old issue. Filed #952 to track the fix.
kubernetes/client/rest.py
Outdated
if headers['Content-Type'] == 'application/json-patch+json': | ||
if not isinstance(body, list): | ||
headers['Content-Type'] = \ | ||
'application/strategic-merge-patch+json' |
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.
why is this fix needed?
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.
The patch is from https://github.com/kubernetes-client/python/blob/master/scripts/rest_client_patch.diff, which is a old hack for supporting strategic merge patch in the generated client.
This commit is needed, because the new code generator changed the generated client, and invalidates the old patch. I re-created the patch so the hack works again.
Filed #951 to track adding a test, which ensures strategic merge patch is always supported.
8b1f23e
to
e6fd7de
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: roycaihw, yliaog 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 |
Switching to openapi-generator + API changes in Kubernetes 1.15.
As planned in #926, we are going to do a 11.0.0a1 release with openapi-generator in the release branch. The master branch keeps using swagger-codegen for now. In 11.0.0b1 release we will switch the master branch to use openapi-generator.
Notes:
/assign @yliaog