question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Couldn't create client with custom dispatcher after v5.11

See original GitHub issue

Describe the bug

val dispatcher = new Dispatcher(ThreadUtils.newDaemonCachedThreadPool("kubernetes-dispatcher"))
val baseHttpClient = HttpClientUtils.createHttpClient(config)
val httpClientWithCustomDispatcher = baseHttpClient.newBuilder()
  .dispatcher(dispatcher)
  .build()
new DefaultKubernetesClient(httpClientWithCustomDispatcher, config)

Before v5.11, we can set dispatcher using below code, in v5.11 we do feactor on okhttp usage in https://github.com/fabric8io/kubernetes-client/pull/3549.

Looks like we should add new interface to set custom dispatcher in io.fabric8.kubernetes.client.http.HttpClient.Builder to keep compatibility?

Fabric8 Kubernetes Client version

next (development version)

Steps to reproduce

As below

Expected behavior

We can set dispatcher

Runtime

Kubernetes (vanilla)

Kubernetes API Server version

1.22.3@latest

Environment

Linux

Fabric8 Kubernetes Client Logs

value dispatcher is not a member of io.fabric8.kubernetes.client.http.HttpClient.Builder

Additional context

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
shawkinscommented, Dec 19, 2021

The likely plan will be to support both the okhttpclient and a jdk based https://github.com/shawkins/httpclient simultaneous for a while.

Before that new httpclient is supported there is also some additional refatoring needed to create either an httpclient api or a full client api module - #3645 has a draft pr of what a full client api would look like. Then we’ll likely want to bump the minimum jre support up to 11 - however there is a java bug that prevents the jdk client from working properly unless running on java 16+, so that may not be an option for every user.

1reaction
manusacommented, Dec 21, 2021

Thanks for taking care of this Steven. Closing the issue because I think that your problem was solved. Please feel free to open a new one if you problem persists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem about Dispatcher - Siemens Communities
Hi guys,. I installed dispatcher onto the corporate server with the client also. It seems to work when I start printing services as...
Read more >
c# - App freezes after Dispatcher.Invoke - Stack Overflow
The simplest solution is to replace all the Dispatcher.Invoke with Dispatcher.BeginInvoke and give it a priority that will run once your RunClient is...
Read more >
Coroutines Dispatchers.Default and Dispatchers.IO ...
My argument against Kotlin Coroutines' default background dispatchers: Dispatchers.Default and Dispatchers.IO.
Read more >
TypeScript doesn't allow event : CustomEvent in ... - GitHub
In my TypeScript project, I'm trying to write the following code: buttonEl. ... i can dispatch custom event without type errors. window.
Read more >
Some useful techniques to troubleshoot Web Assistant ...
What you can try to do is to implement only basic parameters in the Fiori Launchpad configuration and put remaining ones that actually...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found