Skip to content

Commit

Permalink
Add support for instance based storge in nightly benchmark run (opens…
Browse files Browse the repository at this point in the history
…earch-project#5097)

Signed-off-by: Rishabh Singh <[email protected]>
  • Loading branch information
rishabh6788 authored Oct 11, 2024
1 parent ec34a44 commit 42c8d1e
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 55 deletions.
23 changes: 16 additions & 7 deletions jenkins/opensearch/benchmark-test.jenkinsfile

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TestRunBenchmarkTestScriptDistributionUrl extends BuildPipelineTest {
void setUp() {
helper.registerSharedLibrary(
library().name('jenkins')
.defaultVersion('6.8.0')
.defaultVersion('7.0.0')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down Expand Up @@ -96,6 +96,7 @@ class TestRunBenchmarkTestScriptDistributionUrl extends BuildPipelineTest {
binding.setVariable('TEST_WORKLOAD', 'nyc-taxis')
binding.setVariable('WEBHOOK_URL', 'test://artifact.url')
binding.setVariable('TELEMETRY_PARAMS', '')
binding.setVariable('ENABLE_INSTANCE_BASED_STORAGE', 'true')

super.setUp()
}
Expand Down Expand Up @@ -131,7 +132,7 @@ class TestRunBenchmarkTestScriptDistributionUrl extends BuildPipelineTest {

assertThat(testScriptCommands.size(), equalTo(1))
assertThat(testScriptCommands, hasItems(
"set +x && ./test.sh benchmark-test execute-test --distribution-url https://artifacts.com/artifact.tar.gz --distribution-version 3.0.0 --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag run-type:test,security-enabled:false,jenkins-build-id:307 --without-security --use-50-percent-heap --suffix 307 --manager-node-count 3 --data-node-count 3 --data-instance-type r5-4xlarge --test-procedure append-no-conflicts --data-node-storage 100".toString()
"set +x && ./test.sh benchmark-test execute-test --distribution-url https://artifacts.com/artifact.tar.gz --distribution-version 3.0.0 --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag run-type:test,security-enabled:false,jenkins-build-id:307 --without-security --use-50-percent-heap --enable-instance-storage --suffix 307 --manager-node-count 3 --data-node-count 3 --data-instance-type r5-4xlarge --test-procedure append-no-conflicts --data-node-storage 100".toString()
))
}

Expand Down
8 changes: 3 additions & 5 deletions tests/jenkins/TestRunNonSecBenchmarkTestScript.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TestRunNonSecBenchmarkTestScript extends BuildPipelineTest{
void setUp() {
helper.registerSharedLibrary(
library().name('jenkins')
.defaultVersion('6.8.0')
.defaultVersion('7.0.0')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down Expand Up @@ -96,6 +96,7 @@ class TestRunNonSecBenchmarkTestScript extends BuildPipelineTest{
binding.setVariable('TEST_WORKLOAD', 'nyc-taxis')
binding.setVariable('WEBHOOK_URL', 'test://artifact.url')
binding.setVariable('TELEMETRY_PARAMS', '')
binding.setVariable('ENABLE_INSTANCE_BASED_STORAGE', 'true')

super.setUp()
}
Expand Down Expand Up @@ -139,10 +140,7 @@ class TestRunNonSecBenchmarkTestScript extends BuildPipelineTest{
}

assertThat(testScriptCommands.size(), equalTo(1))
assertThat(testScriptCommands, hasItem(
"set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:false,jenkins-build-id:307 --without-security --use-50-percent-heap --suffix 307 --manager-node-count 3 --data-node-count 3 --data-instance-type r5-4xlarge --test-procedure append-no-conflicts --exclude-tasks type:search,scroll --include-tasks type:search,scroll --data-node-storage 100".toString()
))
}
assertThat(testScriptCommands, hasItem("set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:false,jenkins-build-id:307 --without-security --use-50-percent-heap --enable-instance-storage --suffix 307 --manager-node-count 3 --data-node-count 3 --data-instance-type r5-4xlarge --test-procedure append-no-conflicts --exclude-tasks type:search,scroll --include-tasks type:search,scroll --data-node-storage 100".toString()))}

@Test
void testRunSecurityBenchmarkTestScript_verifyJob_aborted() {
Expand Down
7 changes: 4 additions & 3 deletions tests/jenkins/TestRunSecureBenchmarkTestScript.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TestRunSecureBenchmarkTestScript extends BuildPipelineTest{
void setUp() {
helper.registerSharedLibrary(
library().name('jenkins')
.defaultVersion('6.8.0')
.defaultVersion('7.0.0')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down Expand Up @@ -96,6 +96,7 @@ class TestRunSecureBenchmarkTestScript extends BuildPipelineTest{
binding.setVariable('TEST_WORKLOAD', 'nyc-taxis')
binding.setVariable('WEBHOOK_URL', 'test://artifact.url')
binding.setVariable('TELEMETRY_PARAMS', '{"telemetry_setting":"value"}')
binding.setVariable('ENABLE_INSTANCE_BASED_STORAGE', 'false')

super.setUp()
}
Expand Down Expand Up @@ -141,8 +142,8 @@ class TestRunSecureBenchmarkTestScript extends BuildPipelineTest{

assertThat(testScriptCommands.size(), equalTo(2))
assertThat(testScriptCommands, hasItems(
"set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:true,jenkins-build-id:307 --use-50-percent-heap --enable-remote-store --capture-segment-replication-stat --suffix 307-secure --manager-node-count 3 --data-node-count 3 --data-node-storage 100 --telemetry-params '{\"telemetry_setting\":\"value\"}'".toString(),
"set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:false,jenkins-build-id:307 --without-security --use-50-percent-heap --enable-remote-store --capture-segment-replication-stat --suffix 307 --manager-node-count 3 --data-node-count 3 --data-node-storage 100 --telemetry-params '{\"telemetry_setting\":\"value\"}'".toString()
"set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:true,jenkins-build-id:307 --use-50-percent-heap --enable-remote-store --capture-segment-replication-stat --suffix 307-secure --manager-node-count 3 --data-node-count 3 --data-node-storage 100 --telemetry-params '{\"telemetry_setting\":\"value\"}'".toString(),
"set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:false,jenkins-build-id:307 --without-security --use-50-percent-heap --enable-remote-store --capture-segment-replication-stat --suffix 307 --manager-node-count 3 --data-node-count 3 --data-node-storage 100 --telemetry-params '{\"telemetry_setting\":\"value\"}'".toString()
))
}

Expand Down
Loading

0 comments on commit 42c8d1e

Please sign in to comment.