Skip to content

Commit e6f6e37

Browse files
committed
Allow blocking call in kubernetes-client WatchEventsListener
Motivation: Blockhound detects blocked thread after upgrading kubernetes-client 7.3.1 (#6271) Modification: - Remove `io.fabric8.kubernetes.client.http.StandardHttpRequest$Builder` from allow list, as it uses UUID created via AtomicLong now. - Add `io.fabric8.kubernetes.client.server.mock.WatchEventsListener` to allow list, because it is only used in the mock server. Result: Blockhound passes Signed-off-by: Seonghyeon Cho <[email protected]>
1 parent ce880eb commit e6f6e37

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

kubernetes/src/main/java/com/linecorp/armeria/client/kubernetes/KubernetesBlockHoundIntegration.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,8 @@ public void applyTo(Builder builder) {
3232
// a fully readable ByteBuffer.
3333
builder.allowBlockingCallsInside(
3434
"io.fabric8.kubernetes.client.http.HttpClientReadableByteChannel", "doLockedAndSignal");
35-
// StandardHttpRequest creates UUIDs using java.util.UUID.randomUUID() that uses SecureRandom.
36-
// The method is temporarily allowed until the problem is resolved in the upstream.
37-
// See: https://github.com/fabric8io/kubernetes-client/issues/5735
38-
// TODO(ikhoon): Remove this once the issue is fixed.
35+
// This only used in mock server.
3936
builder.allowBlockingCallsInside(
40-
"io.fabric8.kubernetes.client.http.StandardHttpRequest$Builder",
41-
"build");
37+
"io.fabric8.kubernetes.client.server.mock.WatchEventsListener", "onClosed");
4238
}
4339
}

0 commit comments

Comments
 (0)