From 14baec94a49776c39859e6a900644a66180a7421 Mon Sep 17 00:00:00 2001 From: Kai Huang Date: Thu, 30 Apr 2026 20:32:36 -0700 Subject: [PATCH 1/2] Exclude httpcore5-h2, httpcore5-reactive, httpclient5 from SQL bundle The analytics-engine plugin bundles httpcore5-h2-5.4.jar, httpcore5-reactive-5.4.jar, and httpclient5-5.6.jar in addition to httpcore5-5.4.jar. The existing bundlePlugin exclusion list only covered httpcore5-5*.jar, so the other three variants leaked into the SQL bundle and tripped JarHell at install time when analytics-engine was already installed: jar hell! class: org.apache.hc.core5.http2.H2ConnectionException jar1: /httpcore5-h2-5.4.jar jar2: /httpcore5-h2-5.4.jar Adding the missing exclusions matches the existing pattern of stripping shared jars provided by the analytics-engine extendedPlugins classloader. Signed-off-by: Kai Huang --- plugin/build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/build.gradle b/plugin/build.gradle index 4c80603d077..883682a70ae 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -81,6 +81,9 @@ bundlePlugin { exclude 'jackson-annotations-*.jar' exclude 'jackson-databind-*.jar' exclude 'httpcore5-5*.jar' + exclude 'httpcore5-h2-*.jar' + exclude 'httpcore5-reactive-*.jar' + exclude 'httpclient5-*.jar' exclude 'commons-text-*.jar' // Calcite transitive deps now bundled in analytics-engine 3.7 — exclude from sql to avoid jar hell. exclude 'commons-math3-*.jar' From af5835a6cd6cd9febf834bb5c6e7ec166101513d Mon Sep 17 00:00:00 2001 From: Kai Huang Date: Thu, 30 Apr 2026 21:32:39 -0700 Subject: [PATCH 2/2] Add TODO referencing AnalyticsFrontEndExtension SPI cleanup Per Peter's review on #5400: flag the three new httpcore5/httpclient5 exclusions (and ideally the entire bundlePlugin exclusion block) for removal once analytics-engine becomes an optional dependency via the AnalyticsFrontEndExtension SPI in opensearch-project/OpenSearch#21449. Signed-off-by: Kai Huang --- plugin/build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/build.gradle b/plugin/build.gradle index 883682a70ae..4306235b13d 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -81,6 +81,10 @@ bundlePlugin { exclude 'jackson-annotations-*.jar' exclude 'jackson-databind-*.jar' exclude 'httpcore5-5*.jar' + // TODO: Remove the three httpcore5/httpclient5 exclusions below — and ideally this entire + // bundlePlugin exclusion block — once analytics-engine becomes an optional dependency via the + // AnalyticsFrontEndExtension SPI (opensearch-project/OpenSearch#21449). The shared-classloader + // jar deduplication that requires this hand-maintained list goes away with the SPI. exclude 'httpcore5-h2-*.jar' exclude 'httpcore5-reactive-*.jar' exclude 'httpclient5-*.jar'