From 984ecdf8f53028576cdf369a6ab1dfe6fc755786 Mon Sep 17 00:00:00 2001 From: cgivre Date: Tue, 14 Jul 2026 23:35:24 -0400 Subject: [PATCH] Connect Splunk tests over HTTPS and pin the container image The splunk/splunk:9.3 tag was republished on 2026-07-01 to point at 9.3.14, turning CI red on every branch. Identical test code passed on 2026-06-26 against 9.3.13 and fails on 9.3.14, so the image is the only variable. 9.3.14 serves HTTPS on the management port despite SPLUNKD_SSL_ENABLE=false, so the plaintext client failed every connection with "Unexpected end of file from server". Disabling splunkd SSL is a path Splunk has regressed repeatedly (splunk/docker-splunk#639, still open), so talk to the default HTTPS listener instead and turn off certificate and hostname validation for the self-signed container cert. Pin the patch version so an upstream push cannot break the build on its own. Also correct the constructor argument comment, which listed five names for six values and hid validateHostname=true on the shared-user config. --- .../exec/store/splunk/SplunkTestSuite.java | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java b/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java index 8530270c1c5..eaa00263cea 100644 --- a/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java +++ b/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java @@ -107,14 +107,22 @@ private static java.io.File createDefaultYmlFile() { } } + // Pin the patch version. "splunk/splunk:9.3" is a mutable tag; it was + // republished on 2026-07-01 and silently broke CI on every branch. Bump this + // deliberately so an upstream push can never turn the build red on its own. + // + // Talk to splunkd over its default HTTPS listener rather than setting + // SPLUNKD_SSL_ENABLE=false. Disabling splunkd SSL is a path Splunk has + // regressed repeatedly (see splunk/docker-splunk#639, still open), and it + // broke again in 9.3.14. The container's cert is self-signed, so the plugin + // configs below turn off certificate and hostname validation. @ClassRule public static GenericContainer splunk = new GenericContainer<>( - DockerImageName.parse("splunk/splunk:9.3") + DockerImageName.parse("splunk/splunk:9.3.14") ) .withExposedPorts(8089, 8089) .withEnv("SPLUNK_START_ARGS", "--accept-license") .withEnv("SPLUNK_PASSWORD", SPLUNK_PASS) - .withEnv("SPLUNKD_SSL_ENABLE", "false") .withCopyFileToContainer( org.testcontainers.utility.MountableFile.forHostPath( createDefaultYmlFile().toPath() @@ -159,8 +167,11 @@ public static void initSplunk() throws Exception { StoragePluginRegistry pluginRegistry = cluster.drillbit().getContext().getStorage(); SPLUNK_STORAGE_PLUGIN_CONFIG = new SplunkPluginConfig( SPLUNK_LOGIN, SPLUNK_PASS, - "http", hostname, port, - null, null, null, null, false, true, // app, owner, token, cookie, validateCertificates + "https", hostname, port, + // app, owner, token, cookie, validateCertificates, validateHostname. + // The container serves a self-signed cert for a hostname that never matches + // the mapped localhost port, so both checks must be off. + null, null, null, null, false, false, "1", "now", null, 4, @@ -181,8 +192,9 @@ public static void initSplunk() throws Exception { SPLUNK_STORAGE_PLUGIN_CONFIG_WITH_USER_TRANSLATION = new SplunkPluginConfig( null, null, // username, password - "http", hostname, port, - null, null, null, null, false, false, // app, owner, token, cookie, validateCertificates + "https", hostname, port, + // app, owner, token, cookie, validateCertificates, validateHostname + null, null, null, null, false, false, "1", "now", credentialsProvider, 4,