Skip to content

Commit 6926de1

Browse files
authored
Fix distribution build: pin analytics-api dep to 3.7.0-SNAPSHOT (#5455)
* Pin analytics-api dep to 3.7.0-SNAPSHOT for release builds The distribution build (./build.sh -s false) sets -Dopensearch.version=3.7.0, which made the dep declared as ${opensearch_version} resolve to "3.7.0" — a release coordinate that will never exist for org.opensearch.sandbox:analytics-api. OpenSearch core's sandbox/build.gradle deliberately disables publish tasks for sandbox artifacts unless -Dsandbox.enabled=true AND build.snapshot=true, explicitly to "prevent accidental inclusion of these artifacts in a release distribution". Build 11942 fails at :opensearch-sql-plugin:compileJava with `Could not find org.opensearch.sandbox:analytics-api:3.7.0`. Hardcode the dep version to "3.7.0-SNAPSHOT" — same pattern already used by core/build.gradle:67 for the same artifact. The bundled jar continues to ship inside the SQL plugin so QueryPlanExecutor remains resolvable at runtime even when the analytics-engine plugin is absent (verified by loading the rebuilt plugin into a 3.7.0 cluster — all 11 plugins load cleanly, cluster transitions to GREEN). Resolves #5434 Signed-off-by: Ashish Agrawal <ashisagr@amazon.com> * Use opensearch_version-derived snapshot coord for analytics-api Address review feedback: instead of hardcoding "3.7.0-SNAPSHOT", derive the snapshot version from ${opensearch_version} via the same tokenize pattern build.gradle:12 already uses for opensearch_build. The dep now auto-tracks version bumps and resolves correctly in both release-mode CI (${opensearch_version}=3.7.0) and local snapshot builds (${opensearch_version}=3.7.0-SNAPSHOT) without producing a malformed "-SNAPSHOT-SNAPSHOT" suffix. Signed-off-by: Ashish Agrawal <ashisagr@amazon.com> --------- Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
1 parent 817f7f3 commit 6926de1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ dependencies {
160160

161161
api project(":ppl")
162162
api project(':api')
163-
implementation("org.opensearch.sandbox:analytics-api:${opensearch_version}")
163+
implementation "org.opensearch.sandbox:analytics-api:${opensearch_version.tokenize('-')[0]}-SNAPSHOT"
164164
api project(':legacy')
165165
api project(':opensearch')
166166
api project(':prometheus')

0 commit comments

Comments
 (0)