redhat-developer / intellij-common

4 stars 11 forks source link

Clients gets closed when returning ClusterInfo Object #174

Closed sbouchet closed 1 year ago

sbouchet commented 1 year ago

in 1.9.0-SNAPSHOT, with kubernetes-client 6.4.0, when calling ClusterHelper.getClusterInfo(client), the client gets closed by the try-with-resources calls and then when the same client is used to perfoms operations, i get the following exception:

io.fabric8.kubernetes.client.KubernetesClientException: The okhttp client executor has been shutdown. More than likely this is because the KubernetesClient.close method (see debug logging) has been called - please ensure that is intentional. Dispatcher: okhttp3.Dispatcher@6af9a28b

the stack calls of close() method points to it directly:

close:130, BaseClient (io.fabric8.kubernetes.client.impl)
getOpenShiftVersion:58, ClusterHelper (com.redhat.devtools.intellij.common.kubernetes)
getClusterInfo:32, ClusterHelper (com.redhat.devtools.intellij.common.kubernetes)