-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Upgrade to okhttp3 or better yet, use a HTTP client facade like Feign #430
Comments
This code is all auto-generated by swagger-codegen: I see that there is a feign generator, you could try re-generating with that generator... Alternately you could upgrade the okhttp-gson client to use okhttp3: |
@brendandburns I'm not clear on what you're suggesting. I'm not compiling the code myself, I'm picking up the |
@asarkar I don't think that the 2.7 and 3.0 APIs are the same, thus I don't think we can just upgrade the pom file. either way, we can't make changes to the generated code (or pom) in this repository, it needs to be done in the swagger-codegen repository. |
@brendandburns It's unlikely that swagger will agree to simply upgrading a client version; perhaps a new module could be created for okhttp3? What do you think? |
Maybe we should just try generating with the I think either path would be fine. Let me know if you need pointers to the code to get started. |
I use Spring Boot and Cloud out of cluster, and call in-cluster services by using kubernetes proxy api. By new RestTemplate(new OkHttpClientHttpRequestFactory(client.getHttpClient())) Everything goes as expect. However, after I upgrade Spring framework, okhttp2 had been removed, only So it will be a great help if client-java upgrade okhttp to v3.* |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Since 20 August 2019 JFrog X-Ray is reporting a High Severity security issue with OkHttp 2.70-2.75: "OkHttp Cached HTTP / HTTP/2 Headers Non-ASCII Character Handling Remote DoS" This is getting flagged in a scan on a project using Java Kubernetes Client 5.0.0 as OkHttp 2.75 is a dependency. |
I have a PR open on swagger to update the okhttp-gson client to version 3.x, if anyone is interested in chiming in: swagger-api/swagger-codegen#9632 I was also made aware today that swagger-codegen was forked last year into openapi-generator, and there is also a ticket to switch to using that library: kubernetes-client/gen/issues/93. openapi-generator already uses 3.x of OkHttp, so this would most likely solve for this issue. @brendanburns - thoughts on closing this out in favor of the openapi-generator route? |
Here's the link to the equivalent client in openapi-generator using the latest 3.x version of OkHttp: |
We want to get to openapi-generator but there are currently build errors
with their generated code, Min was looking into it a while ago...
…On Tue, Aug 27, 2019, 7:42 AM Nick Travers ***@***.***> wrote:
Here's the link to the equivalent client in openapi-generator using the
latest 3.x version of OkHttp:
https://github.com/OpenAPITools/openapi-generator/blob/v4.1.1/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache#L312
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#430?email_source=notifications&email_token=AAJZQXT7AE3HO7B2NN4B6MLQGU4M7A5CNFSM4GCXPUV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5H7HJA#issuecomment-525333412>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJZQXWAJV6OLOQH2F43SJTQGU4M7ANCNFSM4GCXPUVQ>
.
|
Update, we just merged the switch to openapi generator and okhttp3. We will cut a 7.0.0 release soon. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Closing this as we have switched to okhttp3 in the latest clients. |
I see that a
4.0.0.-beta-1
branch is in development. This will be a good time to upgrade the OkHttp client to the latest. The migration is relatively painless. The2.7.5
version been used is almost 2.5 years old, and of course, has been abandoned in favor of okhttp3.Another option, albeit more ambitious, would be to use a Facade like Feign that lets the users plugin in their own HTTP clients. That would be extremely useful in many projects where people heavily customize HTTP clients for timeouts, SSL settings and what not.
The text was updated successfully, but these errors were encountered: