Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
BlockHoundIntegration
for kubernetes integration moulde (#5426)
Motivation: The following method is detected as a blocking operation because `doLockedAndSignal` acquires a lock with `ReentranceLock`. ``` at io.fabric8.kubernetes.client.http.HttpClientReadableByteChannel.doLockedAndSignal(HttpClientReadableByteChannel.java:71) ``` The lock is used to read the remaining data from the given `ByteBuffer`. The Armeria integration creates a fully readable `ByteBuffer` so the lock condition would not happen. https://github.com/fabric8io/kubernetes-client/blob/2c4d01d6bbc3ef5f077e07611f3723ad49388b5a/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/http/HttpClientReadableByteChannel.java#L128-L130 Modification: - Add `KubernetesBlockHoundIntegration` and register `HttpClientReadableByteChannel.doLockedAndSignal()` as a safe call. Result: - No false positive BlockBound report. - Fixes #5424
- Loading branch information