From 3c742aef3f4dc4149ac201c21a4316e6336b8fab Mon Sep 17 00:00:00 2001 From: Ikhun Um Date: Mon, 28 Jul 2025 18:23:15 +0900 Subject: [PATCH] Disable BlockHound reporting for Kubernetes client testing Motivation: It is inconvient and time-consuming to check all CI results due to the false-positive BlockHound reports. Therefore, I propose disabling BlockHound reporting until [the patched version](https://github.com/eclipse-vertx/vert.x/pull/5637) is released. Modifications: - Add `FastThreadLocalRunnable.run` to `allowBlockingCallsInside` for disabling the reports Result: Less noisy CI builds --- ...ubernetesTestingBlockHoundIntegration.java | 28 +++++++++++++++++++ ...ockhound.integration.BlockHoundIntegration | 1 + 2 files changed, 29 insertions(+) create mode 100644 kubernetes/src/test/java/com/linecorp/armeria/client/kubernetes/KubernetesTestingBlockHoundIntegration.java create mode 100644 kubernetes/src/test/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration diff --git a/kubernetes/src/test/java/com/linecorp/armeria/client/kubernetes/KubernetesTestingBlockHoundIntegration.java b/kubernetes/src/test/java/com/linecorp/armeria/client/kubernetes/KubernetesTestingBlockHoundIntegration.java new file mode 100644 index 00000000000..7e4b1aa53b0 --- /dev/null +++ b/kubernetes/src/test/java/com/linecorp/armeria/client/kubernetes/KubernetesTestingBlockHoundIntegration.java @@ -0,0 +1,28 @@ +/* + * Copyright 2025 LY Corporation + * + * LY Corporation licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +package com.linecorp.armeria.client.kubernetes; + +import reactor.blockhound.BlockHound.Builder; +import reactor.blockhound.integration.BlockHoundIntegration; + +public class KubernetesTestingBlockHoundIntegration implements BlockHoundIntegration { + @Override + public void applyTo(Builder builder) { + // TODO(ikhoon): Remove this once https://github.com/eclipse-vertx/vert.x/pull/5637 is released. + builder.allowBlockingCallsInside("io.netty.util.concurrent.FastThreadLocalRunnable", "run"); + } +} diff --git a/kubernetes/src/test/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration b/kubernetes/src/test/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration new file mode 100644 index 00000000000..c785a17f0a5 --- /dev/null +++ b/kubernetes/src/test/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration @@ -0,0 +1 @@ +com.linecorp.armeria.client.kubernetes.KubernetesTestingBlockHoundIntegration