-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
improving how httpclients can be configured #4490
Conversation
58dead8
to
42fc791
Compare
This seems fine, we can deprecate them and remove them in a subsequent release |
d0abd6e
to
9717fa9
Compare
I think I broke the feature while rebasing :( sorry :( |
Sure, let me see. |
The pr currently has them removed - the rationale is that since they are probably used through the builder, a user unfortunately won't know they are deprecated unless they read the release notes. |
that works too |
SonarCloud Quality Gate failed. |
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, thx
Description
The first commit is to fix #4472 - refined withRequestConfig so that a new client is not created. This removes the need / ambiguity or exposing the factory via the client - which is needed for #4471. It also makes withRequestConfig much lighter weight as it no longer creates an entirely new client. On the downside it requires a lot of wiring and a new Inteceptor method so that it can pick up the modified, rather than the default Config. The 6.0 changes allowed the maxConcurrentRequests and maxConcurrentRequestsPerHost to actually work - but as far as I can tell those did not work in 5.x. I vote for removing those methods from the RequestConfig entirely. I'll update the changes with docs based upon whatever we agree upon.
The second commit fixes #4471 - it adds a KubernetesClientBuilder.withHttpClientBuilderConsumer that can be used to configure the Builder that is created. We still need the KubernetesClientBuilder to take a Factory as TokenRefreshInterceptor expects to use the newBuilder() method to create a "fresh" client instance - that logic could be refactored of course, but that's too much for right now.
Type of change
test, version modification, documentation, etc.)
Checklist