From aa41202fc08b209fa852e2926aea0765a028c4c1 Mon Sep 17 00:00:00 2001 From: Khushboo Rajput Date: Tue, 5 Sep 2023 18:50:36 -0700 Subject: [PATCH] Add changes for release v2.10 Signed-off-by: Khushboo Rajput --- INSTALL.md | 4 ++-- build.gradle | 10 +++++----- docker/docker-compose.yml | 4 ++-- .../opensearch/performanceanalyzer/rca/Version.java | 9 ++++++--- .../rca/store/OpenSearchAnalysisGraph.java | 3 ++- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 44400fda5..700a8cfd6 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -67,7 +67,7 @@ This package uses the [Gradle](https://docs.gradle.org/current/userguide/usergui 2. Clone the Performance Analyzer plugin repository as follows: - `git clone -b 2.9 --single-branch https://github.com/opensearch-project/performance-analyzer.git` + `git clone -b 2.10 --single-branch https://github.com/opensearch-project/performance-analyzer.git` 3. `cd performance-analyzer` @@ -114,7 +114,7 @@ You can use the packaged Dockerfile and docker-compose.yml files [here](./docker 2. Build and tag the Docker image with our RCA framework. - `docker build -t opensearch/pa-rca:2.9 .` + `docker build -t opensearch/pa-rca:2.10 .` 3. Spin up a two node cluster as follows: diff --git a/build.gradle b/build.gradle index a0b573bcb..7a7387971 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { buildVersionQualifier = System.getProperty("build.version_qualifier", "") buildDockerJdkVersion = System.getProperty("build.docker_jdk_ver", "11") - // 2.9.0-SNAPSHOT -> 2.9.0.0-SNAPSHOT + // 2.x.0-SNAPSHOT -> 2.x.0.0-SNAPSHOT version_tokens = opensearch_version.tokenize('-') opensearch_build = version_tokens[0] + '.0' if (buildVersionQualifier) { @@ -20,7 +20,7 @@ buildscript { if (isSnapshot) { opensearch_build += "-SNAPSHOT" } - gitPaBranch = '2.9' + gitPaBranch = '2.10' gitPaRepo = "https://github.com/opensearch-project/performance-analyzer.git" runGauntletTests = "true" == System.getProperty("run.gauntlet.tests", "false") } @@ -186,7 +186,7 @@ jacocoTestCoverageVerification { } } } - } + } else { violationRules { rule { @@ -194,7 +194,7 @@ jacocoTestCoverageVerification { minimum = 0.6 } } - } + } } } @@ -471,7 +471,7 @@ task copyReaderMetricsFiles(type: Copy) { task buildDocker(type: Exec) { dependsOn(copyAllArtifacts) workingDir(dockerArtifactsDir) - commandLine 'docker', 'build', '-t', 'opensearch/pa-rca:2.9', '.', '--build-arg', "JDK_VER=${buildDockerJdkVersion}" + commandLine 'docker', 'build', '-t', 'opensearch/pa-rca:2.10', '.', '--build-arg', "JDK_VER=${buildDockerJdkVersion}" } task runDocker(type: Exec) { diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 564436675..d463cb6cf 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -13,7 +13,7 @@ version: '2.1' services: opensearch1: container_name: opensearch1 - image: opensearch/pa-rca:2.9 + image: opensearch/pa-rca:2.10 mem_limit: 4g networks: opensearchnet: @@ -34,7 +34,7 @@ services: container_name: opensearch2 environment: - node.cluster_manager=false - image: opensearch/pa-rca:2.9 + image: opensearch/pa-rca:2.10 mem_limit: 4g networks: - opensearchnet diff --git a/src/main/java/org/opensearch/performanceanalyzer/rca/Version.java b/src/main/java/org/opensearch/performanceanalyzer/rca/Version.java index bfc85fcd3..402013cf7 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/rca/Version.java +++ b/src/main/java/org/opensearch/performanceanalyzer/rca/Version.java @@ -19,11 +19,14 @@ public final class Version { * transferred packets should be dropped. Every increment here should be accompanied with a line * describing the version bump. * - * Note: The RCA version is agnostic of OpenSearch version. + *

Note: The RCA version is agnostic of OpenSearch version. */ static final class Major { - // Bumping this post the Commons Lib(https://github.com/opensearch-project/performance-analyzer-commons/issues/2) - // and Service Metrics(https://github.com/opensearch-project/performance-analyzer-commons/issues/8) change + // Bumping this post the Commons + // Lib(https://github.com/opensearch-project/performance-analyzer-commons/issues/2) + // and Service + // Metrics(https://github.com/opensearch-project/performance-analyzer-commons/issues/8) + // change static final int RCA_MAJ_VERSION = 1; } diff --git a/src/main/java/org/opensearch/performanceanalyzer/rca/store/OpenSearchAnalysisGraph.java b/src/main/java/org/opensearch/performanceanalyzer/rca/store/OpenSearchAnalysisGraph.java index e144f2ee1..80763befb 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/rca/store/OpenSearchAnalysisGraph.java +++ b/src/main/java/org/opensearch/performanceanalyzer/rca/store/OpenSearchAnalysisGraph.java @@ -183,7 +183,8 @@ public void construct() { // Use EVALUATION_INTERVAL_SECONDS instead of RCA_PERIOD which resolved to 12 seconds. // This is resulting in this RCA not getting executed in every 5 seconds. Rca> threadMetricsRca = - new ThreadMetricsRca(threadBlockedTime, threadWaitedTime, EVALUATION_INTERVAL_SECONDS); + new ThreadMetricsRca( + threadBlockedTime, threadWaitedTime, EVALUATION_INTERVAL_SECONDS); threadMetricsRca.addTag( RcaConsts.RcaTagConstants.TAG_LOCUS, RcaConsts.RcaTagConstants.LOCUS_DATA_CLUSTER_MANAGER_NODE);