Skip to content

Commit 69e08d4

Browse files
refactor sigv4 logic (#798)
Signed-off-by: Rishabh Singh <[email protected]> (cherry picked from commit 2dc5f4f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 0508906 commit 69e08d4

8 files changed

+22
-33
lines changed

tests/jenkins/TestRunBenchmarkTestScriptMultiNode.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class TestRunBenchmarkTestScriptMultiNode extends BuildPipelineTest {
4444
'false',
4545
'{"telemetry_setting":"value"}',
4646
'false',
47-
'true',
47+
'false',
4848
'',
4949
'4'
5050
))
@@ -77,7 +77,7 @@ class TestRunBenchmarkTestScriptMultiNode extends BuildPipelineTest {
7777
"set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/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,key1:value1,security-enabled:false --without-security --heap-size-in-gb 4 --enable-remote-store --capture-node-stat --suffix 307 --manager-node-count 3 --data-node-count 3 --workload-params '{\"key2\":\"value2\"}' --test-procedure custom-test-procedure --exclude-tasks index-append,default --include-tasks type:search,index --additional-config cluster.indices.replication.strategy:SEGMENT --data-node-storage 200 --ml-node-storage 200 --telemetry-params '{\"telemetry_setting\":\"value\"}'".toString()
7878
))
7979
assertThat(testScriptCommands, hasItem(
80-
"set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/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,key1:value1,security-enabled:true --sigv4 --heap-size-in-gb 4 --enable-remote-store --capture-node-stat --suffix 307-secure --manager-node-count 3 --data-node-count 3 --workload-params '{\"key2\":\"value2\"}' --test-procedure custom-test-procedure --exclude-tasks index-append,default --include-tasks type:search,index --additional-config cluster.indices.replication.strategy:SEGMENT --data-node-storage 200 --ml-node-storage 200 --telemetry-params '{\"telemetry_setting\":\"value\"}'".toString()
80+
"set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/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,key1:value1,security-enabled:true --heap-size-in-gb 4 --enable-remote-store --capture-node-stat --suffix 307-secure --manager-node-count 3 --data-node-count 3 --workload-params '{\"key2\":\"value2\"}' --test-procedure custom-test-procedure --exclude-tasks index-append,default --include-tasks type:search,index --additional-config cluster.indices.replication.strategy:SEGMENT --data-node-storage 200 --ml-node-storage 200 --telemetry-params '{\"telemetry_setting\":\"value\"}'".toString()
8181
))
8282
}
8383

tests/jenkins/TestRunCompareTestScript.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class TestRunCompareTestScript extends BuildPipelineTest {
4848
super.testPipeline("tests/jenkins/jobs/CompareTest_Jenkinsfile")
4949
}
5050

51-
@Test
51+
@Test
5252
void testRunCompareTestScript_verifyScriptExecutionSingleNode() {
5353
runScript("tests/jenkins/jobs/CompareTest_Jenkinsfile")
5454

tests/jenkins/jobs/BenchmarkTestMultinode_Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pipeline {
2424
distributionVersion: DISTRIBUTION_VERSION,
2525
workload: TEST_WORKLOAD,
2626
insecure: "false",
27-
sigv4: "true",
27+
sigv4: "false",
2828
region: "",
2929
service: "",
3030
singleNode: SINGLE_NODE_CLUSTER,

tests/jenkins/jobs/BenchmarkTestMultinode_Jenkinsfile.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,22 @@
1212
downloadBuildManifest.sh(curl -sSL --retry 5 test://artifact.url --output tests/data/opensearch-1.3.0-bundle.yml)
1313
downloadBuildManifest.readYaml({file=tests/data/opensearch-1.3.0-bundle.yml})
1414
BuildManifest.asBoolean()
15-
BenchmarkTestMultinode_Jenkinsfile.runBenchmarkTestScript({command=execute-test, bundleManifest=tests/data/opensearch-1.3.0-bundle.yml, distributionUrl=, distributionVersion=, workload=nyc_taxis, insecure=false, sigv4=true, region=, service=, singleNode=false, minDistribution=false, heapSizeInGb=4, enableRemoteStore=true, suffix=307-secure, managerNodeCount=3, dataNodeCount=3, clientNodeCount=, ingestNodeCount=, mlNodeCount=, dataInstanceType=, pluginUrl=, userTag=key1:value1,security-enabled:true, workloadParams={"key2":"value2"}, testProcedure=custom-test-procedure, excludeTasks=index-append,default, includeTasks=type:search,index, additionalConfig=cluster.indices.replication.strategy:SEGMENT, dataStorageSize=200, mlStorageSize=200, enableInstanceStorage=false, jvmSysProps=, captureNodeStat=true, captureSegmentReplicationStat=false, telemetryParams={"telemetry_setting":"value"}})
15+
BenchmarkTestMultinode_Jenkinsfile.runBenchmarkTestScript({command=execute-test, bundleManifest=tests/data/opensearch-1.3.0-bundle.yml, distributionUrl=, distributionVersion=, workload=nyc_taxis, insecure=false, sigv4=false, region=, service=, singleNode=false, minDistribution=false, heapSizeInGb=4, enableRemoteStore=true, suffix=307-secure, managerNodeCount=3, dataNodeCount=3, clientNodeCount=, ingestNodeCount=, mlNodeCount=, dataInstanceType=, pluginUrl=, userTag=key1:value1,security-enabled:true, workloadParams={"key2":"value2"}, testProcedure=custom-test-procedure, excludeTasks=index-append,default, includeTasks=type:search,index, additionalConfig=cluster.indices.replication.strategy:SEGMENT, dataStorageSize=200, mlStorageSize=200, enableInstanceStorage=false, jvmSysProps=, captureNodeStat=true, captureSegmentReplicationStat=false, telemetryParams={"telemetry_setting":"value"}})
1616
runBenchmarkTestScript.legacySCM(groovy.lang.Closure)
1717
runBenchmarkTestScript.library({[email protected], retriever=null})
1818
runBenchmarkTestScript.readYaml({file=tests/data/opensearch-1.3.0-bundle.yml})
1919
BuildManifest.asBoolean()
2020
runBenchmarkTestScript.withSecrets({secrets=[{envVar=ARTIFACT_BUCKET_NAME, secretRef=op://opensearch-infra-secrets/aws-resource-arns/jenkins-artifact-bucket-name}, {envVar=AWS_ACCOUNT_PUBLIC, secretRef=op://opensearch-infra-secrets/aws-accounts/jenkins-aws-account-public}]}, groovy.lang.Closure)
2121
runBenchmarkTestScript.withAWS({role=opensearch-test, roleAccount=dummy_account, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
2222
runBenchmarkTestScript.s3Download({file=config.yml, bucket=test_bucket, path=test_config/config.yml, force=true})
23-
runBenchmarkTestScript.s3Download({file=benchmark.ini, bucket=test_bucket, path=test_config/benchmark_sigv4.ini, force=true})
23+
runBenchmarkTestScript.s3Download({file=benchmark.ini, bucket=test_bucket, path=test_config/benchmark.ini, force=true})
2424
runBenchmarkTestScript.withSecrets({secrets=[{envVar=DATASTORE_USER, secretRef=op://opensearch-infra-secrets/benchmark-metrics/benchmark-metrics-datastore-user}, {envVar=DATASTORE_PASSWORD, secretRef=op://opensearch-infra-secrets/benchmark-metrics/benchmark-metrics-datastore-password}]}, groovy.lang.Closure)
2525
runBenchmarkTestScript.readFile({file=/tmp/workspace/benchmark.ini})
2626
runBenchmarkTestScript.writeFile({file=/tmp/workspace/benchmark.ini, text=})
2727
BuildManifest.getArtifactBuildId()
2828
BuildManifest.getArtifactArchitecture()
2929
BuildManifest.getCommitId(OpenSearch)
30-
runBenchmarkTestScript.withSecrets({secrets=[{envVar=PERF_TEST_ACCOUNT_ID, secretRef=op://opensearch-infra-secrets/aws-accounts/perf-test-account-id}]}, groovy.lang.Closure)
31-
runBenchmarkTestScript.withAWS({role=opensearch-full-access-nightlies, roleAccount=PERF_TEST_ACCOUNT_ID, duration=43200, roleSessionName=jenkins-session}, groovy.lang.Closure)
32-
runBenchmarkTestScript.sh(set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/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,key1:value1,security-enabled:true --sigv4 --heap-size-in-gb 4 --enable-remote-store --capture-node-stat --suffix 307-secure --manager-node-count 3 --data-node-count 3 --workload-params '{"key2":"value2"}' --test-procedure custom-test-procedure --exclude-tasks index-append,default --include-tasks type:search,index --additional-config cluster.indices.replication.strategy:SEGMENT --data-node-storage 200 --ml-node-storage 200 --telemetry-params '{"telemetry_setting":"value"}')
30+
runBenchmarkTestScript.sh(set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/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,key1:value1,security-enabled:true --heap-size-in-gb 4 --enable-remote-store --capture-node-stat --suffix 307-secure --manager-node-count 3 --data-node-count 3 --workload-params '{"key2":"value2"}' --test-procedure custom-test-procedure --exclude-tasks index-append,default --include-tasks type:search,index --additional-config cluster.indices.replication.strategy:SEGMENT --data-node-storage 200 --ml-node-storage 200 --telemetry-params '{"telemetry_setting":"value"}')
3331
BenchmarkTestMultinode_Jenkinsfile.stage(test-without-security, groovy.lang.Closure)
3432
BenchmarkTestMultinode_Jenkinsfile.script(groovy.lang.Closure)
3533
BenchmarkTestMultinode_Jenkinsfile.downloadBuildManifest({url=test://artifact.url, path=tests/data/opensearch-1.3.0-bundle.yml})
@@ -56,6 +54,4 @@
5654
BuildManifest.getArtifactBuildId()
5755
BuildManifest.getArtifactArchitecture()
5856
BuildManifest.getCommitId(OpenSearch)
59-
runBenchmarkTestScript.withSecrets({secrets=[{envVar=PERF_TEST_ACCOUNT_ID, secretRef=op://opensearch-infra-secrets/aws-accounts/perf-test-account-id}]}, groovy.lang.Closure)
60-
runBenchmarkTestScript.withAWS({role=opensearch-full-access-nightlies, roleAccount=PERF_TEST_ACCOUNT_ID, duration=43200, roleSessionName=jenkins-session}, groovy.lang.Closure)
61-
runBenchmarkTestScript.sh(set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/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,key1:value1,security-enabled:false --without-security --heap-size-in-gb 4 --enable-remote-store --capture-node-stat --suffix 307 --manager-node-count 3 --data-node-count 3 --workload-params '{"key2":"value2"}' --test-procedure custom-test-procedure --exclude-tasks index-append,default --include-tasks type:search,index --additional-config cluster.indices.replication.strategy:SEGMENT --data-node-storage 200 --ml-node-storage 200 --telemetry-params '{"telemetry_setting":"value"}')
57+
runBenchmarkTestScript.sh(set +x && ./test.sh benchmark-test execute-test --bundle-manifest tests/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,key1:value1,security-enabled:false --without-security --heap-size-in-gb 4 --enable-remote-store --capture-node-stat --suffix 307 --manager-node-count 3 --data-node-count 3 --workload-params '{"key2":"value2"}' --test-procedure custom-test-procedure --exclude-tasks index-append,default --include-tasks type:search,index --additional-config cluster.indices.replication.strategy:SEGMENT --data-node-storage 200 --ml-node-storage 200 --telemetry-params '{"telemetry_setting":"value"}')

tests/jenkins/jobs/BenchmarkTestNoManifest_Jenkinsfile.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
runBenchmarkTestScript.withSecrets({secrets=[{envVar=DATASTORE_USER, secretRef=op://opensearch-infra-secrets/benchmark-metrics/benchmark-metrics-datastore-user}, {envVar=DATASTORE_PASSWORD, secretRef=op://opensearch-infra-secrets/benchmark-metrics/benchmark-metrics-datastore-password}]}, groovy.lang.Closure)
1414
runBenchmarkTestScript.readFile({file=/tmp/workspace/benchmark.ini})
1515
runBenchmarkTestScript.writeFile({file=/tmp/workspace/benchmark.ini, text=})
16-
runBenchmarkTestScript.withSecrets({secrets=[{envVar=PERF_TEST_ACCOUNT_ID, secretRef=op://opensearch-infra-secrets/aws-accounts/perf-test-account-id}]}, groovy.lang.Closure)
17-
runBenchmarkTestScript.withAWS({role=opensearch-full-access-nightlies, roleAccount=PERF_TEST_ACCOUNT_ID, duration=43200, roleSessionName=jenkins-session}, groovy.lang.Closure)
18-
runBenchmarkTestScript.sh(set +x && ./test.sh benchmark-test execute-test --distribution-url https://www.example.com/example.tar.gz --plugin-url www.example.com/plugin.zip --distribution-version 3.0.0 --config /tmp/workspace/config.yml --workload nyc_taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag security-enabled:true --single-node --heap-size-in-gb 4 --enable-instance-storage --capture-segment-replication-stat --suffix 307-secure --data-instance-type r5.8xlarge --test-procedure custom-test-procedure --additional-config cluster.indices.replication.strategy:SEGMENT --data-node-storage 200 --ml-node-storage 200)
16+
runBenchmarkTestScript.sh(set +x && ./test.sh benchmark-test execute-test --distribution-url https://www.example.com/example.tar.gz --plugin-url www.example.com/plugin.zip --distribution-version 3.0.0 --config /tmp/workspace/config.yml --workload nyc_taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag security-enabled:true --single-node --heap-size-in-gb 4 --enable-instance-storage --capture-segment-replication-stat --suffix 307-secure --data-instance-type r5.8xlarge --test-procedure custom-test-procedure --additional-config cluster.indices.replication.strategy:SEGMENT --data-node-storage 200 --ml-node-storage 200)
1917
BenchmarkTestNoManifest_Jenkinsfile.stage(test-without-security, groovy.lang.Closure)
2018
BenchmarkTestNoManifest_Jenkinsfile.script(groovy.lang.Closure)
2119
BenchmarkTestNoManifest_Jenkinsfile.runBenchmarkTestScript({command=execute-test, bundleManifest=, distributionUrl=https://www.example.com/example.tar.gz, distributionVersion=3.0.0, workload=nyc_taxis, insecure=true, sigv4=false, region=, service=, singleNode=true, minDistribution=false, heapSizeInGb=4, enableRemoteStore=false, suffix=307, managerNodeCount=, dataNodeCount=, clientNodeCount=, ingestNodeCount=, mlNodeCount=, dataInstanceType=r5.8xlarge, pluginUrl=www.example.com/plugin.zip, userTag=security-enabled:false, workloadParams=, testProcedure=custom-test-procedure, excludeTasks=, includeTasks=, additionalConfig=cluster.indices.replication.strategy:SEGMENT, dataStorageSize=200, mlStorageSize=200, enableInstanceStorage=true, jvmSysProps=, captureNodeStat=false, captureSegmentReplicationStat=true, telemetryParams=})
@@ -28,6 +26,4 @@
2826
runBenchmarkTestScript.withSecrets({secrets=[{envVar=DATASTORE_USER, secretRef=op://opensearch-infra-secrets/benchmark-metrics/benchmark-metrics-datastore-user}, {envVar=DATASTORE_PASSWORD, secretRef=op://opensearch-infra-secrets/benchmark-metrics/benchmark-metrics-datastore-password}]}, groovy.lang.Closure)
2927
runBenchmarkTestScript.readFile({file=/tmp/workspace/benchmark.ini})
3028
runBenchmarkTestScript.writeFile({file=/tmp/workspace/benchmark.ini, text=})
31-
runBenchmarkTestScript.withSecrets({secrets=[{envVar=PERF_TEST_ACCOUNT_ID, secretRef=op://opensearch-infra-secrets/aws-accounts/perf-test-account-id}]}, groovy.lang.Closure)
32-
runBenchmarkTestScript.withAWS({role=opensearch-full-access-nightlies, roleAccount=PERF_TEST_ACCOUNT_ID, duration=43200, roleSessionName=jenkins-session}, groovy.lang.Closure)
33-
runBenchmarkTestScript.sh(set +x && ./test.sh benchmark-test execute-test --distribution-url https://www.example.com/example.tar.gz --plugin-url www.example.com/plugin.zip --distribution-version 3.0.0 --config /tmp/workspace/config.yml --workload nyc_taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag security-enabled:false --without-security --single-node --heap-size-in-gb 4 --enable-instance-storage --capture-segment-replication-stat --suffix 307 --data-instance-type r5.8xlarge --test-procedure custom-test-procedure --additional-config cluster.indices.replication.strategy:SEGMENT --data-node-storage 200 --ml-node-storage 200)
29+
runBenchmarkTestScript.sh(set +x && ./test.sh benchmark-test execute-test --distribution-url https://www.example.com/example.tar.gz --plugin-url www.example.com/plugin.zip --distribution-version 3.0.0 --config /tmp/workspace/config.yml --workload nyc_taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag security-enabled:false --without-security --single-node --heap-size-in-gb 4 --enable-instance-storage --capture-segment-replication-stat --suffix 307 --data-instance-type r5.8xlarge --test-procedure custom-test-procedure --additional-config cluster.indices.replication.strategy:SEGMENT --data-node-storage 200 --ml-node-storage 200)

0 commit comments

Comments
 (0)