Skip to content

Commit c4396f9

Browse files
committed
Update vendored analytics JARs from 3.6 to 3.7
Replace libs/ JARs with 3.7.0-SNAPSHOT versions built from the OpenSearch sandbox. Update build files to reference 3.7 file names. Keep files() references instead of Maven coordinates so CI can resolve dependencies without publishToMavenLocal. Signed-off-by: Ahmed Khatib <ahkcs@amazon.com> Signed-off-by: Kai Huang <ahkcs@amazon.com>
1 parent 0e3f98f commit c4396f9

8 files changed

Lines changed: 28 additions & 22 deletions

build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ allprojects {
127127
version += "-SNAPSHOT"
128128
}
129129

130+
// Path to the analytics-engine plugin ZIP. Override with
131+
// `-PanalyticsEngineZip=/path/to/zip` if needed.
132+
ext.analyticsEngineZip = project.findProperty('analyticsEngineZip') ?:
133+
"${rootDir}/libs/analytics-engine-3.7.0-SNAPSHOT.zip"
134+
130135
plugins.withId('java') {
131136
java {
132137
sourceCompatibility = JavaVersion.VERSION_21

core/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ plugins {
3333
}
3434

3535
repositories {
36+
mavenLocal()
3637
mavenCentral()
3738
}
3839

@@ -63,8 +64,12 @@ dependencies {
6364
}
6465
api 'org.apache.calcite:calcite-linq4j:1.41.0'
6566
api project(':common')
66-
compileOnly files("${rootDir}/libs/analytics-framework-3.6.0-SNAPSHOT.jar")
67-
testImplementation files("${rootDir}/libs/analytics-framework-3.6.0-SNAPSHOT.jar")
67+
compileOnly files("${rootDir}/libs/analytics-framework-3.7.0-SNAPSHOT.jar")
68+
// Needed because the analytics-framework's QueryPlanExecutor signature uses
69+
// org.opensearch.core.action.ActionListener; AnalyticsExecutionEngine references that type.
70+
compileOnly group: 'org.opensearch', name: 'opensearch-core', version: "${opensearch_version}"
71+
testImplementation files("${rootDir}/libs/analytics-framework-3.7.0-SNAPSHOT.jar")
72+
testImplementation group: 'org.opensearch', name: 'opensearch-core', version: "${opensearch_version}"
6873
implementation "com.github.seancfoley:ipaddress:5.4.2"
6974
implementation "com.jayway.jsonpath:json-path:2.9.0"
7075

-16.8 KB
Binary file not shown.
188 KB
Binary file not shown.
-11.7 KB
Binary file not shown.
42.5 KB
Binary file not shown.

plugin/build.gradle

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -60,44 +60,40 @@ opensearchplugin {
6060
noticeFile rootProject.file("NOTICE")
6161
}
6262

63-
// Exclude jars provided by analytics-engine plugin (shared via extendedPlugins classloader).
64-
// Must match exactly what's in the analytics-engine ZIP to avoid both jar hell and missing classes.
63+
// Exclude jars provided by the analytics-engine plugin (shared via extendedPlugins classloader).
64+
// MUST match what's actually in the analytics-engine ZIP to avoid both jar hell (when analytics-engine
65+
// ships it) and ClassNotFoundException at runtime (when it doesn't). Last verified against
66+
// analytics-engine-3.7.0-SNAPSHOT — keep this list aligned when bumping versions.
6567
bundlePlugin {
6668
exclude 'calcite-core-*.jar'
6769
exclude 'calcite-linq4j-*.jar'
6870
exclude 'avatica-core-*.jar'
69-
exclude 'avatica-metrics-*.jar'
7071
exclude 'guava-*.jar'
7172
exclude 'failureaccess-*.jar'
7273
exclude 'slf4j-api-*.jar'
7374
exclude 'commons-codec-*.jar'
7475
exclude 'commons-compiler-*.jar'
76+
exclude 'commons-io-*.jar'
77+
exclude 'commons-lang3-*.jar'
7578
exclude 'janino-*.jar'
7679
exclude 'joou-java-6-*.jar'
77-
exclude 'memory-0*.jar'
78-
exclude 'sketches-core-*.jar'
79-
exclude 'commons-lang3-*.jar'
80+
exclude 'json-path-*.jar'
81+
exclude 'jackson-annotations-*.jar'
82+
exclude 'jackson-databind-*.jar'
83+
exclude 'httpcore5-5*.jar'
8084
exclude 'commons-text-*.jar'
85+
// Calcite transitive deps now bundled in analytics-engine 3.7 — exclude from sql to avoid jar hell.
8186
exclude 'commons-math3-*.jar'
8287
exclude 'commons-dbcp2-*.jar'
83-
exclude 'commons-io-*.jar'
8488
exclude 'commons-pool2-*.jar'
8589
exclude 'uzaygezen-core-*.jar'
86-
exclude 'icu4j-*.jar'
87-
exclude 'error_prone_annotations-*.jar'
90+
exclude 'sketches-core-*.jar'
91+
exclude 'memory-0*.jar'
8892
exclude 'jts-io-common-*.jar'
8993
exclude 'proj4j-*.jar'
90-
exclude 'json-path-*.jar'
9194
exclude 'json-smart-*.jar'
9295
exclude 'accessors-smart-*.jar'
9396
exclude 'asm-9*.jar'
94-
exclude 'httpclient5-*.jar'
95-
exclude 'httpcore5-5*.jar'
96-
exclude 'httpcore5-h2-*.jar'
97-
exclude 'httpcore5-reactive-*.jar'
98-
exclude 'antlr4-runtime-4.13.2.jar'
99-
exclude 'jackson-annotations-*.jar'
100-
exclude 'jackson-databind-*.jar'
10197
}
10298

10399
publishing {
@@ -201,8 +197,8 @@ dependencies {
201197

202198
api project(":ppl")
203199
api project(':api')
204-
compileOnly files("${rootDir}/libs/analytics-framework-3.6.0-SNAPSHOT.jar")
205-
compileOnly files("${rootDir}/libs/analytics-engine-3.6.0-SNAPSHOT.jar")
200+
compileOnly files("${rootDir}/libs/analytics-framework-3.7.0-SNAPSHOT.jar")
201+
compileOnly files("${rootDir}/libs/analytics-engine-3.7.0-SNAPSHOT.jar")
206202
api project(':legacy')
207203
api project(':opensearch')
208204
api project(':prometheus')
@@ -348,7 +344,7 @@ def getJobSchedulerPlugin() {
348344

349345
testClusters.integTest {
350346
plugin(getJobSchedulerPlugin())
351-
plugin provider { (RegularFile) (() -> file("${rootDir}/libs/analytics-engine-3.6.0-SNAPSHOT.zip")) }
347+
plugin provider { (RegularFile) (() -> file("${analyticsEngineZip}")) }
352348
plugin(project.tasks.bundlePlugin.archiveFile)
353349
testDistribution = "ARCHIVE"
354350

0 commit comments

Comments
 (0)