Skip to content

Commit 2e8a51c

Browse files
authored
remove double declaration of unified api version (opensearch-project#21589)
Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
1 parent b7f49bd commit 2e8a51c

2 files changed

Lines changed: 22 additions & 16 deletions

File tree

sandbox/plugins/analytics-engine/build.gradle

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515
apply plugin: 'opensearch.internal-cluster-test'
1616

17-
// SQL Unified Query API version (aligned with OpenSearch build version)
18-
def sqlUnifiedQueryVersion = '3.6.0.0-SNAPSHOT'
19-
2017
opensearchplugin {
2118
description = 'Analytics engine hub: discovers and wires query extensions via ExtensiblePlugin SPI.'
2219
classname = 'org.opensearch.analytics.AnalyticsPlugin'
@@ -28,6 +25,17 @@ opensearchplugin {
2825

2926
java { sourceCompatibility = JavaVersion.toVersion(25); targetCompatibility = JavaVersion.toVersion(25) }
3027

28+
// Force mavenLocal to position 0 so the transitive unified-query SNAPSHOT (pulled in via the
29+
// `:sandbox:plugins:test-ppl-frontend` project dep) resolves against a freshly-published
30+
// local SQL plugin checkout instead of ci.opensearch.org. Sandbox-only; CI's empty `~/.m2/`
31+
// makes this a no-op there. Transitive resolution uses the consumer's repo list, not the
32+
// dependee's, so test-ppl-frontend's own mavenLocal precedence isn't enough.
33+
repositories {
34+
def local = mavenLocal()
35+
remove(local)
36+
add(0, local)
37+
}
38+
3139
// Guava comes transitively from calcite-core and unified-query — forbidden on
3240
// compile classpaths by OpenSearch. Main sources don't need it; test sources do
3341
// (Calcite API exposes ImmutableList, Predicate). Bypass via custom config.
@@ -133,17 +141,6 @@ dependencies {
133141
testRuntimeOnly "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}"
134142
testRuntimeOnly "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson_annotations}"
135143

136-
// SQL Unified Query API for PPL parsing
137-
testImplementation("org.opensearch.query:unified-query-api:${sqlUnifiedQueryVersion}") {
138-
exclude group: 'org.opensearch'
139-
}
140-
testImplementation("org.opensearch.query:unified-query-core:${sqlUnifiedQueryVersion}") {
141-
exclude group: 'org.opensearch'
142-
}
143-
testImplementation("org.opensearch.query:unified-query-ppl:${sqlUnifiedQueryVersion}") {
144-
exclude group: 'org.opensearch'
145-
}
146-
147144
// Arrow Flight streaming transport for ITs
148145
internalClusterTestImplementation project(':plugins:arrow-flight-rpc')
149146

sandbox/plugins/test-ppl-frontend/build.gradle

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ java { sourceCompatibility = JavaVersion.toVersion(25); targetCompatibility = Ja
2323
// declared below carries the published 3.7.x.x-SNAPSHOT artifacts; for local
2424
// development against an unpublished sql-repo HEAD, run
2525
// `./gradlew :ppl:publishUnifiedQueryPublicationToMavenLocal` from the sql repo first.
26-
def sqlUnifiedQueryVersion = '3.7.0.0-SNAPSHOT'
26+
// Override via `-PsqlUnifiedQueryVersion=<version>` for local development against an
27+
// out-of-tree SQL plugin checkout (e.g. feature/mustang-ppl-integration).
28+
def sqlUnifiedQueryVersion = providers.gradleProperty('sqlUnifiedQueryVersion').getOrElse('3.7.0.0-SNAPSHOT')
2729

2830
opensearchplugin {
2931
description = 'Test PPL front-end: REST endpoint backed by the unified PPL pipeline.'
@@ -32,11 +34,18 @@ opensearchplugin {
3234
}
3335

3436
repositories {
35-
mavenLocal()
3637
maven {
3738
name = 'OpenSearch Snapshots'
3839
url = 'https://ci.opensearch.org/ci/dbc/snapshots/maven/'
3940
}
41+
// Force mavenLocal to position 0. Declaring `mavenLocal()` first inside this block isn't
42+
// enough: `apply plugin: 'opensearch.test'` above contributes its own remote repos at
43+
// plugin-application time (before this block runs), so any mavenLocal() here lands at
44+
// position 5+ and gradle resolves the remote SNAPSHOT first. Sandbox-only; CI's empty
45+
// `~/.m2/` makes this a no-op there.
46+
def local = mavenLocal()
47+
remove(local)
48+
add(0, local)
4049
}
4150

4251
// Guava comes transitively from calcite-core and unified-query — forbidden on

0 commit comments

Comments
 (0)