You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using fabric8 with JDKHttpClient, as recommended by RedHat and as means to workaround #4562 , we get the error: Invalid duration: PT0S
From a short debugging it appears that when PodOperationsImpl builds HttpClient in setupConnectionToPod() it uses 0 as readTimeout. But JDKHttpClient doesn't handle this well and throws error.
In JDKHttpClient inside HttpRequestBuilderImpl they make a validation against negative and zero values:
if (duration.isNegative() || Duration.ZERO.equals(duration))
throw new IllegalArgumentException("Invalid duration: " + duration);
Fabric8 Kubernetes Client version
6.2.0
Steps to reproduce
Use fabric8 version 6.2.0 with JDKHttpClient. For example using Gradle:
implementation ("io.fabric8:kubernetes-client:${fabricVersion}"){
exclude group: "io.fabric8", module: "kubernetes-httpclient-okhttp"
}
implementation ("io.fabric8:kubernetes-httpclient-jdk:${fabricVersion}"){
force = true
}
Try to connect to Kubernetes using fabric8
Expected behavior
Either pass a value different than 0, or make it configurable.
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
other (please specify in additional context)
Environment
Amazon
Fabric8 Kubernetes Client Logs
Invalid duration: PT0S
Additional context
Kubernetes version: 1.19
The text was updated successfully, but these errors were encountered:
This is a regression from #4490 - the new configuration logic is effectively omitting the 0 duration check. I'm not sure why there wasn't coverage for that.
Describe the bug
When using fabric8 with
JDKHttpClient
, as recommended by RedHat and as means to workaround #4562 , we get the error: Invalid duration: PT0SFrom a short debugging it appears that when
PodOperationsImpl
buildsHttpClient
insetupConnectionToPod()
it uses 0 asreadTimeout
. ButJDKHttpClient
doesn't handle this well and throws error.In JDKHttpClient inside
HttpRequestBuilderImpl
they make a validation against negative and zero values:Fabric8 Kubernetes Client version
6.2.0
Steps to reproduce
Use fabric8 version 6.2.0 with JDKHttpClient. For example using Gradle:
implementation ("io.fabric8:kubernetes-client:${fabricVersion}"){
exclude group: "io.fabric8", module: "kubernetes-httpclient-okhttp"
}
implementation ("io.fabric8:kubernetes-httpclient-jdk:${fabricVersion}"){
force = true
}
Try to connect to Kubernetes using fabric8
Expected behavior
Either pass a value different than 0, or make it configurable.
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
other (please specify in additional context)
Environment
Amazon
Fabric8 Kubernetes Client Logs
Additional context
Kubernetes version: 1.19
The text was updated successfully, but these errors were encountered: