FrankChen021 commented on code in PR #19364: URL: https://github.com/apache/druid/pull/19364#discussion_r3141594339
########## embedded-tests/src/test/java/org/apache/druid/testing/embedded/k8s/KubernetesPeonJvmConfigDockerTest.java: ########## @@ -0,0 +1,202 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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 + * + * http://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 org.apache.druid.testing.embedded.k8s; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import io.fabric8.kubernetes.api.model.OwnerReference; +import io.fabric8.kubernetes.api.model.Pod; +import io.fabric8.kubernetes.client.KubernetesClient; +import io.fabric8.kubernetes.client.LocalPortForward; +import org.apache.druid.common.utils.IdUtils; +import org.apache.druid.indexing.common.task.NoopTask; +import org.apache.druid.query.DruidMetrics; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URI; +import java.net.URL; +import java.util.List; +import java.util.Map; + +/** + * Regression test for https://github.com/apache/druid/issues/18791. + * + * Verifies that {@code distribution/docker/peon.sh} sources options from + * {@code jvm.config} and that those options reach the peon JVM as system + * properties. Before the fix, {@code peon.sh} silently ignored + * {@code jvm.config}, so any JVM flags set there — including memory limits + * users had configured to prevent OOMs — never applied. + * + * <p>The test uses an operator manifest that injects + * {@code -Ddruid.test.peon.jvmconfig.marker=true} into the cluster-level + * {@code jvm.options}. The Druid operator writes these to {@code jvm.config} + * on each node, including the overlord. When a peon is launched via the + * {@code K8sTaskAdapter}, it inherits the overlord's pod spec (including the + * mounted {@code jvm.config}); {@code peon.sh} then sources that file and + * prepends its contents to {@code JAVA_OPTS}. The marker therefore appears in + * the peon JVM's system properties, which this test asserts by querying + * {@code /status/properties} on the peon pod. + */ +@Disabled("requires charts.datainfra.io chart, see https://github.com/apache/druid/pull/19047") +public class KubernetesPeonJvmConfigDockerTest extends BaseKubernetesTaskRunnerDockerTest Review Comment: P2 Regression coverage is permanently disabled The new regression test that verifies peon.sh sources jvm.config is annotated with @Disabled, so the fix has no active automated coverage. Since this bug is specifically in container startup behavior, leaving the only regression test disabled means the same breakage can return without CI noticing. Please either make this test runnable in the existing embedded test setup or add a narrower active test around the script/config generation path. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
