-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Migrate to openapi-generator and okhttp3 #709
Conversation
Welcome @fabiokung! |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fabiokung The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @yue9944882 |
Tests are also passing with a patched |
I take it back, bootstrapping SSL needs some work (okhttp3 does not like a |
What do you mean "Schema changed for IntOrString" the Schema should definitely not change in the API. The last time I tried this, the custom type registration stuff in the generator (e.g. the stuff that makes IntOrString work correctly) was broken, that was the main problem that prevented us from switching. Please make sure that IntOrString, Quantity, and the other custom types are parsing correctly. Thanks! |
I see. I meant that I was just assuming the new generator explicitly wanted to map IntOrString to String. I missed the custom generators stuff. Your comment makes sense. I will take a look later today or tomorrow. |
I had a thread (a while ago) with one of the OpenAPI maintainers. If you send mail to bburns [at] microsoft I will try to add you to the thread where I discussed some of the challenges I saw... |
hi @fabiokung any plans to revive this thread? |
Hi! Yes. I just had no time in the past weeks, but I can spend some cycles early next week, unless you want to pick it up? |
appreciated if you can continue the work! i added this to my list, and will be coming back for review soon! |
CI's complaining about failing to find |
@fabiokung the diff is so large that my browser can hardly load it, i did review locally in my IDE:
--- Thanks, Min |
@brendandburns do you think we should cut an alpha release for this pull? it will be breaking compatiblities and we can probably missing sth in this migration.. i can start by trying the alpha release out in our internal projects. |
I mentioned this in the PR description, we need to wait until sundrio/sundrio#156 gets merged, then update this to the right released version. In order to test this I had a locally built snapshot in my local maven repo, with the patched sundrio. |
@yue9944882 comments inline:
Sure, let me give it a try.
I'm reviewing the custom types with the new openapi-generator, and we may not need this anymore with openapi-generator.
These are not unrelated changes, they are part of moving to okhttp3 (used by openapi-generator). The previous swagger-codegen used an older version of okhttp.
Same thing, the |
Regenerated against 1.15, and fixed the merge conflict. Now we wait for OpenAPITools/openapi-generator#4182 to get |
Custom types look OK now. The last remaining issue is that SSL bootstraping in ApiClient (as generated by openapi-generator) is currently throwing |
Thanks for the continued effort here, I'm looking forward to merging this! |
@yue9944882 AFAICT all the necessary changes have been merged to |
Master branch is fine with me. Thanks for the effort here!
…On Thu, Oct 24, 2019, 4:42 PM Fabio Kung ***@***.***> wrote:
@yue9944882 <https://github.com/yue9944882> AFAICT all the necessary
changes have been merged to openapi-generator, and sundrio. I will leave
it up to you if pointing kubernetes-client/gen to the master branch of
openapi-generator is acceptable and regenerating all clients and models
with it, or if we need to wait for a formal release of openapi-generator
first.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#709?email_source=notifications&email_token=AAJZQXULEF22UCMOM4NP6W3QQIXEXA5CNFSM4IY4SK42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECGX3MA#issuecomment-546143664>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJZQXWN74WZKFKFVNRHK3TQQIXEXANCNFSM4IY4SK4Q>
.
|
Changes required to make everything compile with models generated by openapi-generator (instead of swagger-codegen). These changes break backwards compatibility, it will require a new major version release.
it includes sundrio/sundrio#156
Using a generator with OpenAPITools/openapi-generator#4226 applied.
to make javax.annotation.Generated work with Java 9
... when tests take more than 10min to complete.
Reapply changes from kubernetes-client#366 to the code generated by openapi-generator, and keep the JSON file pinned (ignored by the generator) until those changes make it into the generator.
had confirmed w/ @wing328, the next release 4.2.0 will be landing by the end of october. https://github.com/OpenAPITools/openapi-generator/milestone/25. how about wait for 5-ish days? @brendandburns @fabiokung |
Waiting 5 days is fine with me. Thanks for the update.
…On Thu, Oct 24, 2019, 8:46 PM Min Kim ***@***.***> wrote:
had confirmed w/ @wing328 <https://github.com/wing328>, the next release
4.2.0 will be landing by the end of october.
https://github.com/OpenAPITools/openapi-generator/milestone/25. how about
wait for 5-ish days? @brendandburns <https://github.com/brendandburns>
@fabiokung <https://github.com/fabiokung>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#709?email_source=notifications&email_token=AAJZQXQRLL4LZ3VMKSTZG4TQQJTZRA5CNFSM4IY4SK42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECHC5WA#issuecomment-546189016>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJZQXXA37FLD4354Y5LEPDQQJTZRANCNFSM4IY4SK4Q>
.
|
sgtm, no worries |
@fabiokung can you rename the generated package name to /**
* @deprecated As of release 7.0.0, replaced by {@link io.kubernetes.openapi;}
*/
@Deprecated
package io.kubernetes.client; // TODO: completely remove it after release 9.0.0 |
I will give that a try, not sure some of the non-generated classes will be backwards compatible, so keeping old classes may not do much. I will update with more info as I learn more. |
can you elaborate? there's no non-generated classes under |
@fabiokung am changing my mind, let's completely remove the old generated classes and re-generated w/ the new name |
Awesome! I've been pretty swamped this week, but will get to it asap. |
@fabiokung anything i can help to move it forward? thanks |
On my end I still haven't been able to carve up some time to work on it. I expect to be able to get it done by the end of this week. Would that work for you? If not, we can find ways to hand over the remaining work to you. |
@fabiokung @brendandburns i just opened a pull to continue the work from this pull #778, PTAL |
@yue9944882 would you rather I bring your commits to this PR and rebase everything here, or continue on your PR? There's some important history here, but either way works for me. |
it's fine to separate the discussion/history and the actual pull #778 i suppose. thank you for your great effort in moving this forward! |
continuing in #778 |
Replaces #595. Requires yue9944882/gen#1 and sundrio/sundrio#156,
.kubernetes/pom.xml
needs to be updated in this PR after it gets mergedFixes #482.
@yue9944882 @brendanburns I got everything compiling with these changes. They will break backwards compatibility, so a new major version release will be required.
EDIT: more requirements: OpenAPITools/openapi-generator#4226, OpenAPITools/openapi-generator#4182