diff --git a/sandbox/plugins/analytics-engine/build.gradle b/sandbox/plugins/analytics-engine/build.gradle index 78fe8da9d709d..dfcd1902267ba 100644 --- a/sandbox/plugins/analytics-engine/build.gradle +++ b/sandbox/plugins/analytics-engine/build.gradle @@ -14,9 +14,6 @@ apply plugin: 'opensearch.internal-cluster-test' -// SQL Unified Query API version (aligned with OpenSearch build version) -def sqlUnifiedQueryVersion = '3.6.0.0-SNAPSHOT' - opensearchplugin { description = 'Analytics engine hub: discovers and wires query extensions via ExtensiblePlugin SPI.' classname = 'org.opensearch.analytics.AnalyticsPlugin' @@ -28,6 +25,17 @@ opensearchplugin { java { sourceCompatibility = JavaVersion.toVersion(25); targetCompatibility = JavaVersion.toVersion(25) } +// Force mavenLocal to position 0 so the transitive unified-query SNAPSHOT (pulled in via the +// `:sandbox:plugins:test-ppl-frontend` project dep) resolves against a freshly-published +// local SQL plugin checkout instead of ci.opensearch.org. Sandbox-only; CI's empty `~/.m2/` +// makes this a no-op there. Transitive resolution uses the consumer's repo list, not the +// dependee's, so test-ppl-frontend's own mavenLocal precedence isn't enough. +repositories { + def local = mavenLocal() + remove(local) + add(0, local) +} + // Guava comes transitively from calcite-core and unified-query — forbidden on // compile classpaths by OpenSearch. Main sources don't need it; test sources do // (Calcite API exposes ImmutableList, Predicate). Bypass via custom config. @@ -133,17 +141,6 @@ dependencies { testRuntimeOnly "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}" testRuntimeOnly "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson_annotations}" - // SQL Unified Query API for PPL parsing - testImplementation("org.opensearch.query:unified-query-api:${sqlUnifiedQueryVersion}") { - exclude group: 'org.opensearch' - } - testImplementation("org.opensearch.query:unified-query-core:${sqlUnifiedQueryVersion}") { - exclude group: 'org.opensearch' - } - testImplementation("org.opensearch.query:unified-query-ppl:${sqlUnifiedQueryVersion}") { - exclude group: 'org.opensearch' - } - // Arrow Flight streaming transport for ITs internalClusterTestImplementation project(':plugins:arrow-flight-rpc') diff --git a/sandbox/plugins/test-ppl-frontend/build.gradle b/sandbox/plugins/test-ppl-frontend/build.gradle index 9c2d79c306c9c..81ec1c5b49a57 100644 --- a/sandbox/plugins/test-ppl-frontend/build.gradle +++ b/sandbox/plugins/test-ppl-frontend/build.gradle @@ -23,7 +23,9 @@ java { sourceCompatibility = JavaVersion.toVersion(25); targetCompatibility = Ja // declared below carries the published 3.7.x.x-SNAPSHOT artifacts; for local // development against an unpublished sql-repo HEAD, run // `./gradlew :ppl:publishUnifiedQueryPublicationToMavenLocal` from the sql repo first. -def sqlUnifiedQueryVersion = '3.7.0.0-SNAPSHOT' +// Override via `-PsqlUnifiedQueryVersion=` for local development against an +// out-of-tree SQL plugin checkout (e.g. feature/mustang-ppl-integration). +def sqlUnifiedQueryVersion = providers.gradleProperty('sqlUnifiedQueryVersion').getOrElse('3.7.0.0-SNAPSHOT') opensearchplugin { description = 'Test PPL front-end: REST endpoint backed by the unified PPL pipeline.' @@ -32,11 +34,18 @@ opensearchplugin { } repositories { - mavenLocal() maven { name = 'OpenSearch Snapshots' url = 'https://ci.opensearch.org/ci/dbc/snapshots/maven/' } + // Force mavenLocal to position 0. Declaring `mavenLocal()` first inside this block isn't + // enough: `apply plugin: 'opensearch.test'` above contributes its own remote repos at + // plugin-application time (before this block runs), so any mavenLocal() here lands at + // position 5+ and gradle resolves the remote SNAPSHOT first. Sandbox-only; CI's empty + // `~/.m2/` makes this a no-op there. + def local = mavenLocal() + remove(local) + add(0, local) } // Guava comes transitively from calcite-core and unified-query — forbidden on