Skip to content

Commit

Permalink
Increment version to 2.13; change ad plugin jar dependency; increment…
Browse files Browse the repository at this point in the history
… byte-buddy version (#288)

* Increament version to 2.13; change ad plugin jar dependency; increment byte-buddy version

Signed-off-by: zane-neo <[email protected]>

* fix AD tests compilation failure issue

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
(cherry picked from commit de2e2d7)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Apr 18, 2024
1 parent b61f8ee commit 36928b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 4 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import org.opensearch.gradle.test.RestIntegTestTask
import java.util.concurrent.Callable
import org.opensearch.gradle.testclusters.OpenSearchCluster
import java.nio.file.Paths
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin

Expand Down Expand Up @@ -54,9 +53,9 @@ lombok {

repositories {
mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
}

allprojects {
Expand Down Expand Up @@ -108,7 +107,7 @@ task addJarsToClasspath(type: Copy) {
into("$buildDir/classes")

from(fileTree(dir: adJarDirectory)) {
include "opensearch-anomaly-detection-${opensearch_build}.jar"
include "opensearch-time-series-analytics-${opensearch_build}.jar"
}
into("$buildDir/classes")
}
Expand All @@ -125,7 +124,7 @@ dependencies {
// Plugin dependencies
compileOnly group: 'org.opensearch', name:'opensearch-ml-client', version: "${opensearch_build}"
implementation fileTree(dir: jsJarDirectory, include: ["opensearch-job-scheduler-${opensearch_build}.jar"])
implementation fileTree(dir: adJarDirectory, include: ["opensearch-anomaly-detection-${opensearch_build}.jar"])
implementation fileTree(dir: adJarDirectory, include: ["opensearch-time-series-analytics-${opensearch_build}.jar"])
implementation fileTree(dir: sqlJarDirectory, include: ["opensearch-sql-${opensearch_build}.jar", "ppl-${opensearch_build}.jar", "protocol-${opensearch_build}.jar"])
compileOnly "org.opensearch:common-utils:${opensearch_build}"
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.opensearch.action.ActionType;
import org.opensearch.action.search.SearchResponse;
import org.opensearch.ad.model.AnomalyDetector;
import org.opensearch.ad.model.IntervalTimeConfiguration;
import org.opensearch.ad.transport.GetAnomalyDetectorAction;
import org.opensearch.ad.transport.GetAnomalyDetectorResponse;
import org.opensearch.ad.transport.SearchAnomalyDetectorAction;
Expand All @@ -46,6 +45,7 @@
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.ml.common.spi.tools.Tool;
import org.opensearch.search.SearchHit;
import org.opensearch.timeseries.model.IntervalTimeConfiguration;

public class SearchAnomalyDetectorsToolTests {
@Mock
Expand Down Expand Up @@ -85,6 +85,7 @@ public void setup() {
Instant.now(),
Collections.emptyList(),
null,
null,
null
);
}
Expand Down Expand Up @@ -125,7 +126,7 @@ public void testRunWithSingleAnomalyDetector() throws Exception {
content.field("last_update_time", testDetector.getLastUpdateTime().toEpochMilli());
content.endObject();
SearchHit[] hits = new SearchHit[1];
hits[0] = new SearchHit(0, testDetector.getDetectorId(), null, null).sourceRef(BytesReference.bytes(content));
hits[0] = new SearchHit(0, testDetector.getId(), null, null).sourceRef(BytesReference.bytes(content));
SearchResponse getDetectorsResponse = TestHelpers.generateSearchResponse(hits);
String expectedResponseStr = getExpectedResponseString(testDetector);

Expand Down Expand Up @@ -460,7 +461,7 @@ private String getExpectedResponseString(AnomalyDetector testDetector) {
return String
.format(
"AnomalyDetectors=[{id=%s,name=%s,type=%s,description=%s,index=%s,lastUpdateTime=%d}]TotalAnomalyDetectors=%d",
testDetector.getDetectorId(),
testDetector.getId(),
testDetector.getName(),
testDetector.getDetectorType(),
testDetector.getDescription(),
Expand Down

0 comments on commit 36928b6

Please sign in to comment.