From 7ec5fb17031a96c4322efbc00070aac992155304 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad Date: Fri, 25 Oct 2024 20:24:02 -0700 Subject: [PATCH] Fix test cases Signed-off-by: Sayali Gaikawad --- .../TestUpdateIntegTestFailureIssues.groovy | 4 ++-- ...sue_without_distributionID_Jenkinsfile.txt | 19 +++++++++++++++---- ...dateIntegTestFailureIssues_Jenkinsfile.txt | 18 ++++++++++++++---- vars/updateIntegTestFailureIssues.groovy | 1 + 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/tests/jenkins/TestUpdateIntegTestFailureIssues.groovy b/tests/jenkins/TestUpdateIntegTestFailureIssues.groovy index 39e076f8..6d8efd6d 100644 --- a/tests/jenkins/TestUpdateIntegTestFailureIssues.groovy +++ b/tests/jenkins/TestUpdateIntegTestFailureIssues.groovy @@ -303,10 +303,10 @@ class TestUpdateIntegTestFailureIssues extends BuildPipelineTest { helper.addShMock("""\n set -e\n set +x\n curl -s -XGET \"sample.url/opensearch-distribution-build-results/_search\" --aws-sigv4 \"aws:amz:us-east-1:es\" --user \"abc:xyz\" -H \"x-amz-security-token:sampleToken\" -H 'Content-Type: application/json' -d \"{\\"size\\":1,\\"_source\\":[\\"distribution_build_number\\"],\\"query\\":{\\"bool\\":{\\"filter\\":[{\\"match_phrase\\":{\\"component_category\\":\\"OpenSearch\\"}},{\\"match_phrase\\":{\\"version\\":\\"2.2.0\\"}}]}},\\"sort\\":[{\\"build_start_time\\":{\\"order\\":\\"desc\\"}}]}\" | jq '.'\n """) { script -> return [stdout: latestDistributionBuildNumberResponse, exitValue: 0] } - helper.addShMock("""\n set -e\n set +x\n curl -s -XGET \"sample.url/opensearch_release_metrics/_search\" --aws-sigv4 \"aws:amz:us-east-1:es\" --user \"abc:xyz\" -H \"x-amz-security-token:sampleToken\" -H 'Content-Type: application/json' -d \"{\\"size\\":1,\\"_source\\":\\"release_owners\\",\\"query\\":{\\"bool\\":{\\"filter\\":[{\\"match_phrase\\":{\\"component\\":\\"k-NN\\"}},{\\"match_phrase\\":{\\"version\\":\\"2.2.0\\"}}]},\\"sort\\":[{\\"current_date\\":{\\"order\\":\\"desc\\"}}]}}\" | jq '.'\n """) { script -> + helper.addShMock("""\n set -e\n set +x\n curl -s -XGET \"sample.url/opensearch_release_metrics/_search\" --aws-sigv4 \"aws:amz:us-east-1:es\" --user \"abc:xyz\" -H \"x-amz-security-token:sampleToken\" -H 'Content-Type: application/json' -d \"{\\"size\\":1,\\"_source\\":\\"release_owners\\",\\"query\\":{\\"bool\\":{\\"filter\\":[{\\"match_phrase\\":{\\"version\\":\\"2.2.0\\"}},{\\"match_phrase\\":{\\"component\\":\\"k-NN\\"}}]}},\\"sort\\":[{\\"current_date\\":{\\"order\\":\\"desc\\"}}]}\" | jq '.'\n """) { script -> return [stdout: unformattedResponseForReleaseOwners, exitValue: 0] } - helper.addShMock("""\n set -e\n set +x\n curl -s -XGET \"sample.url/opensearch_release_metrics/_search\" --aws-sigv4 \"aws:amz:us-east-1:es\" --user \"abc:xyz\" -H \"x-amz-security-token:sampleToken\" -H 'Content-Type: application/json' -d \"{\\"size\\":1,\\"_source\\":\\"release_owners\\",\\"query\\":{\\"bool\\":{\\"filter\\":[{\\"match_phrase\\":{\\"component\\":\\"geospatial\\"}},{\\"match_phrase\\":{\\"version\\":\\"2.2.0\\"}}]},\\"sort\\":[{\\"current_date\\":{\\"order\\":\\"desc\\"}}]}}\" | jq '.'\n """) { script -> + helper.addShMock("""\n set -e\n set +x\n curl -s -XGET \"sample.url/opensearch_release_metrics/_search\" --aws-sigv4 \"aws:amz:us-east-1:es\" --user \"abc:xyz\" -H \"x-amz-security-token:sampleToken\" -H 'Content-Type: application/json' -d \"{\\"size\\":1,\\"_source\\":\\"release_owners\\",\\"query\\":{\\"bool\\":{\\"filter\\":[{\\"match_phrase\\":{\\"version\\":\\"2.2.0\\"}},{\\"match_phrase\\":{\\"component\\":\\"geospatial\\"}}]}},\\"sort\\":[{\\"current_date\\":{\\"order\\":\\"desc\\"}}]}\" | jq '.'\n """) { script -> return [stdout: unformattedResponseForReleaseOwnersGeo, exitValue: 0] } } diff --git a/tests/jenkins/jobs/UpdateBuildFailureIssue_without_distributionID_Jenkinsfile.txt b/tests/jenkins/jobs/UpdateBuildFailureIssue_without_distributionID_Jenkinsfile.txt index 5a6b8931..43da2510 100644 --- a/tests/jenkins/jobs/UpdateBuildFailureIssue_without_distributionID_Jenkinsfile.txt +++ b/tests/jenkins/jobs/UpdateBuildFailureIssue_without_distributionID_Jenkinsfile.txt @@ -11,6 +11,7 @@ updateIntegTestFailureIssues.withAWS({role=OpenSearchJenkinsAccessRole, roleAccount=METRICS_HOST_ACCOUNT, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure) ComponentBuildStatus.getLatestDistributionBuildNumber() OpenSearchMetricsQuery.fetchMetrics({\"size\":1,\"_source\":[\"distribution_build_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component_category\":\"OpenSearch\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}}]}},\"sort\":[{\"build_start_time\":{\"order\":\"desc\"}}]}) + updateIntegTestFailureIssues.println(Running query: {\"size\":1,\"_source\":[\"distribution_build_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component_category\":\"OpenSearch\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}}]}},\"sort\":[{\"build_start_time\":{\"order\":\"desc\"}}]}) updateIntegTestFailureIssues.sh({script= set -e set +x @@ -19,6 +20,7 @@ updateIntegTestFailureIssues.println(Distribution Build Number: 4891) ComponentIntegTestStatus.getComponents(passed) OpenSearchMetricsQuery.fetchMetrics({\"size\":50,\"_source\":[\"component\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component_category\":\"OpenSearch\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}},{\"match_phrase\":{\"component_build_result\":\"passed\"}}]}}}) + updateIntegTestFailureIssues.println(Running query: {\"size\":50,\"_source\":[\"component\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component_category\":\"OpenSearch\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}},{\"match_phrase\":{\"component_build_result\":\"passed\"}}]}}}) updateIntegTestFailureIssues.sh({script= set -e set +x @@ -26,6 +28,7 @@ , returnStdout=true}) ComponentIntegTestStatus.getComponents(failed) OpenSearchMetricsQuery.fetchMetrics({\"size\":50,\"_source\":[\"component\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component_category\":\"OpenSearch\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}},{\"match_phrase\":{\"component_build_result\":\"failed\"}}]}}}) + updateIntegTestFailureIssues.println(Running query: {\"size\":50,\"_source\":[\"component\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component_category\":\"OpenSearch\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}},{\"match_phrase\":{\"component_build_result\":\"failed\"}}]}}}) updateIntegTestFailureIssues.sh({script= set -e set +x @@ -34,19 +37,23 @@ updateIntegTestFailureIssues.println(Failed Components: [geospatial, k-NN]) updateIntegTestFailureIssues.println(Passed Components: [cross-cluster-replication, k-NN, index-management, neural-search]) updateIntegTestFailureIssues.println(Integration test failed for geospatial, creating github issue) + updateIntegTestFailureIssues.println(Retrieving failed component data for geospatial) ComponentIntegTestStatus.getComponentIntegTestFailedData(geospatial) OpenSearchMetricsQuery.fetchMetrics({\"_source\":[\"platform\",\"architecture\",\"distribution\",\"test_report_manifest_yml\",\"integ_test_build_url\",\"rc_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"geospatial\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}}]}}}) + updateIntegTestFailureIssues.println(Running query: {\"_source\":[\"platform\",\"architecture\",\"distribution\",\"test_report_manifest_yml\",\"integ_test_build_url\",\"rc_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"geospatial\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}}]}}}) updateIntegTestFailureIssues.sh({script= set -e set +x curl -s -XGET "sample.url/opensearch-integration-test-results/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "abc:xyz" -H "x-amz-security-token:sampleToken" -H 'Content-Type: application/json' -d "{\"_source\":[\"platform\",\"architecture\",\"distribution\",\"test_report_manifest_yml\",\"integ_test_build_url\",\"rc_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"geospatial\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}}]}}}" | jq '.' , returnStdout=true}) + updateIntegTestFailureIssues.println(Retrieving release owner(s) for geospatial) ReleaseMetricsData.getReleaseOwners(geospatial) - OpenSearchMetricsQuery.fetchMetrics({\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"geospatial\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}}]},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}}) + OpenSearchMetricsQuery.fetchMetrics({\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component\":\"geospatial\"}}]}},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}) + updateIntegTestFailureIssues.println(Running query: {\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component\":\"geospatial\"}}]}},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}) updateIntegTestFailureIssues.sh({script= set -e set +x - curl -s -XGET "sample.url/opensearch_release_metrics/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "abc:xyz" -H "x-amz-security-token:sampleToken" -H 'Content-Type: application/json' -d "{\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"geospatial\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}}]},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}}" | jq '.' + curl -s -XGET "sample.url/opensearch_release_metrics/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "abc:xyz" -H "x-amz-security-token:sampleToken" -H 'Content-Type: application/json' -d "{\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component\":\"geospatial\"}}]}},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}" | jq '.' , returnStdout=true}) CreateIntegTestMarkDownTable.create([{platform=linux, distribution=tar, architecture=x64, test_report_manifest_yml=https://ci.opensearch.org/ci/dbc/integ-test/2.2.0/7984/linux/x64/tar/test-results/6561/integ-test/test-report.yml, integ_test_build_url=https://build.ci.opensearch.org/job/integ-test/6561/display/redirect, distribution_build_number=4891, rc_number=0, metrics_visualization_url=https://metrics.opensearch.org/_dashboards/app/dashboards?security_tenant=global#/view/21aad140-49f6-11ef-bbdd-39a9b324a5aa?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-30d,to:now))&_a=(description:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',expandedPanelId:ddafb9c5-2d35-482a-9c61-1ba78b67f406,filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:version,negate:!f,params:(query:'2.2.0'),type:phrase),query:(match_phrase:(version:'2.2.0'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:component,negate:!f,params:(query:geospatial),type:phrase),query:(match_phrase:(component:geospatial)))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!t,title:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',viewMode:view)}, {platform=linux, distribution=tar, architecture=arm64, test_report_manifest_yml=https://ci.opensearch.org/ci/dbc/integ-test/2.2.0/7984/linux/arm64/tar/test-results/6560/integ-test/test-report.yml, integ_test_build_url=https://build.ci.opensearch.org/job/integ-test/6560/display/redirect, distribution_build_number=4891, rc_number=0, metrics_visualization_url=https://metrics.opensearch.org/_dashboards/app/dashboards?security_tenant=global#/view/21aad140-49f6-11ef-bbdd-39a9b324a5aa?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-30d,to:now))&_a=(description:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',expandedPanelId:c570bdfd-3122-4e31-a02d-2130d797d9fc,filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:version,negate:!f,params:(query:'2.2.0'),type:phrase),query:(match_phrase:(version:'2.2.0'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:component,negate:!f,params:(query:geospatial),type:phrase),query:(match_phrase:(component:geospatial)))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!t,title:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',viewMode:view)}], []) updateIntegTestFailureIssues.createGithubIssue({repoUrl=https://github.com/opensearch-project/geospatial.git, issueTitle=[AUTOCUT] Integration Test Failed for geospatial-2.2.0, issueBody= @@ -83,19 +90,23 @@ Check out test report manifest linked above for steps to reproduce, cluster and ", returnStdout=true}) updateIntegTestFailureIssues.sleep({time=3, unit=SECONDS}) updateIntegTestFailureIssues.println(Integration test failed for k-NN, creating github issue) + updateIntegTestFailureIssues.println(Retrieving failed component data for k-NN) ComponentIntegTestStatus.getComponentIntegTestFailedData(k-NN) OpenSearchMetricsQuery.fetchMetrics({\"_source\":[\"platform\",\"architecture\",\"distribution\",\"test_report_manifest_yml\",\"integ_test_build_url\",\"rc_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"k-NN\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}}]}}}) + updateIntegTestFailureIssues.println(Running query: {\"_source\":[\"platform\",\"architecture\",\"distribution\",\"test_report_manifest_yml\",\"integ_test_build_url\",\"rc_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"k-NN\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}}]}}}) updateIntegTestFailureIssues.sh({script= set -e set +x curl -s -XGET "sample.url/opensearch-integration-test-results/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "abc:xyz" -H "x-amz-security-token:sampleToken" -H 'Content-Type: application/json' -d "{\"_source\":[\"platform\",\"architecture\",\"distribution\",\"test_report_manifest_yml\",\"integ_test_build_url\",\"rc_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"k-NN\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}}]}}}" | jq '.' , returnStdout=true}) + updateIntegTestFailureIssues.println(Retrieving release owner(s) for k-NN) ReleaseMetricsData.getReleaseOwners(k-NN) - OpenSearchMetricsQuery.fetchMetrics({\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"k-NN\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}}]},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}}) + OpenSearchMetricsQuery.fetchMetrics({\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component\":\"k-NN\"}}]}},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}) + updateIntegTestFailureIssues.println(Running query: {\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component\":\"k-NN\"}}]}},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}) updateIntegTestFailureIssues.sh({script= set -e set +x - curl -s -XGET "sample.url/opensearch_release_metrics/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "abc:xyz" -H "x-amz-security-token:sampleToken" -H 'Content-Type: application/json' -d "{\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"k-NN\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}}]},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}}" | jq '.' + curl -s -XGET "sample.url/opensearch_release_metrics/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "abc:xyz" -H "x-amz-security-token:sampleToken" -H 'Content-Type: application/json' -d "{\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component\":\"k-NN\"}}]}},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}" | jq '.' , returnStdout=true}) CreateIntegTestMarkDownTable.create([{platform=linux, distribution=tar, architecture=x64, test_report_manifest_yml=https://ci.opensearch.org/ci/dbc/integ-test/2.2.0/7984/linux/x64/tar/test-results/6561/integ-test/test-report.yml, integ_test_build_url=https://build.ci.opensearch.org/job/integ-test/6561/display/redirect, distribution_build_number=4891, rc_number=0, metrics_visualization_url=https://metrics.opensearch.org/_dashboards/app/dashboards?security_tenant=global#/view/21aad140-49f6-11ef-bbdd-39a9b324a5aa?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-30d,to:now))&_a=(description:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',expandedPanelId:ddafb9c5-2d35-482a-9c61-1ba78b67f406,filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:version,negate:!f,params:(query:'2.2.0'),type:phrase),query:(match_phrase:(version:'2.2.0'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:component,negate:!f,params:(query:k-NN),type:phrase),query:(match_phrase:(component:k-NN)))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!t,title:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',viewMode:view)}, {platform=linux, distribution=tar, architecture=arm64, test_report_manifest_yml=https://ci.opensearch.org/ci/dbc/integ-test/2.2.0/7984/linux/arm64/tar/test-results/6560/integ-test/test-report.yml, integ_test_build_url=https://build.ci.opensearch.org/job/integ-test/6560/display/redirect, distribution_build_number=4891, rc_number=0, metrics_visualization_url=https://metrics.opensearch.org/_dashboards/app/dashboards?security_tenant=global#/view/21aad140-49f6-11ef-bbdd-39a9b324a5aa?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-30d,to:now))&_a=(description:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',expandedPanelId:c570bdfd-3122-4e31-a02d-2130d797d9fc,filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:version,negate:!f,params:(query:'2.2.0'),type:phrase),query:(match_phrase:(version:'2.2.0'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:component,negate:!f,params:(query:k-NN),type:phrase),query:(match_phrase:(component:k-NN)))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!t,title:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',viewMode:view)}], [foo, bar]) updateIntegTestFailureIssues.createGithubIssue({repoUrl=https://github.com/opensearch-project/k-NN.git, issueTitle=[AUTOCUT] Integration Test Failed for k-NN-2.2.0, issueBody= diff --git a/tests/jenkins/jobs/UpdateIntegTestFailureIssues_Jenkinsfile.txt b/tests/jenkins/jobs/UpdateIntegTestFailureIssues_Jenkinsfile.txt index 7a69c686..f06c26e0 100644 --- a/tests/jenkins/jobs/UpdateIntegTestFailureIssues_Jenkinsfile.txt +++ b/tests/jenkins/jobs/UpdateIntegTestFailureIssues_Jenkinsfile.txt @@ -12,6 +12,7 @@ updateIntegTestFailureIssues.println(Distribution Build Number: 4891) ComponentIntegTestStatus.getComponents(passed) OpenSearchMetricsQuery.fetchMetrics({\"size\":50,\"_source\":[\"component\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component_category\":\"OpenSearch\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}},{\"match_phrase\":{\"component_build_result\":\"passed\"}}]}}}) + updateIntegTestFailureIssues.println(Running query: {\"size\":50,\"_source\":[\"component\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component_category\":\"OpenSearch\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}},{\"match_phrase\":{\"component_build_result\":\"passed\"}}]}}}) updateIntegTestFailureIssues.sh({script= set -e set +x @@ -19,6 +20,7 @@ , returnStdout=true}) ComponentIntegTestStatus.getComponents(failed) OpenSearchMetricsQuery.fetchMetrics({\"size\":50,\"_source\":[\"component\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component_category\":\"OpenSearch\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}},{\"match_phrase\":{\"component_build_result\":\"failed\"}}]}}}) + updateIntegTestFailureIssues.println(Running query: {\"size\":50,\"_source\":[\"component\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component_category\":\"OpenSearch\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}},{\"match_phrase\":{\"component_build_result\":\"failed\"}}]}}}) updateIntegTestFailureIssues.sh({script= set -e set +x @@ -27,19 +29,23 @@ updateIntegTestFailureIssues.println(Failed Components: [geospatial, k-NN]) updateIntegTestFailureIssues.println(Passed Components: [cross-cluster-replication, k-NN, index-management, neural-search]) updateIntegTestFailureIssues.println(Integration test failed for geospatial, creating github issue) + updateIntegTestFailureIssues.println(Retrieving failed component data for geospatial) ComponentIntegTestStatus.getComponentIntegTestFailedData(geospatial) OpenSearchMetricsQuery.fetchMetrics({\"_source\":[\"platform\",\"architecture\",\"distribution\",\"test_report_manifest_yml\",\"integ_test_build_url\",\"rc_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"geospatial\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}}]}}}) + updateIntegTestFailureIssues.println(Running query: {\"_source\":[\"platform\",\"architecture\",\"distribution\",\"test_report_manifest_yml\",\"integ_test_build_url\",\"rc_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"geospatial\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}}]}}}) updateIntegTestFailureIssues.sh({script= set -e set +x curl -s -XGET "sample.url/opensearch-integration-test-results/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "abc:xyz" -H "x-amz-security-token:sampleToken" -H 'Content-Type: application/json' -d "{\"_source\":[\"platform\",\"architecture\",\"distribution\",\"test_report_manifest_yml\",\"integ_test_build_url\",\"rc_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"geospatial\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}}]}}}" | jq '.' , returnStdout=true}) + updateIntegTestFailureIssues.println(Retrieving release owner(s) for geospatial) ReleaseMetricsData.getReleaseOwners(geospatial) - OpenSearchMetricsQuery.fetchMetrics({\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"geospatial\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}}]},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}}) + OpenSearchMetricsQuery.fetchMetrics({\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component\":\"geospatial\"}}]}},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}) + updateIntegTestFailureIssues.println(Running query: {\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component\":\"geospatial\"}}]}},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}) updateIntegTestFailureIssues.sh({script= set -e set +x - curl -s -XGET "sample.url/opensearch_release_metrics/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "abc:xyz" -H "x-amz-security-token:sampleToken" -H 'Content-Type: application/json' -d "{\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"geospatial\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}}]},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}}" | jq '.' + curl -s -XGET "sample.url/opensearch_release_metrics/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "abc:xyz" -H "x-amz-security-token:sampleToken" -H 'Content-Type: application/json' -d "{\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component\":\"geospatial\"}}]}},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}" | jq '.' , returnStdout=true}) CreateIntegTestMarkDownTable.create([{platform=linux, distribution=tar, architecture=x64, test_report_manifest_yml=https://ci.opensearch.org/ci/dbc/integ-test/2.2.0/7984/linux/x64/tar/test-results/6561/integ-test/test-report.yml, integ_test_build_url=https://build.ci.opensearch.org/job/integ-test/6561/display/redirect, distribution_build_number=4891, rc_number=0, metrics_visualization_url=https://metrics.opensearch.org/_dashboards/app/dashboards?security_tenant=global#/view/21aad140-49f6-11ef-bbdd-39a9b324a5aa?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-30d,to:now))&_a=(description:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',expandedPanelId:ddafb9c5-2d35-482a-9c61-1ba78b67f406,filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:version,negate:!f,params:(query:'2.2.0'),type:phrase),query:(match_phrase:(version:'2.2.0'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:component,negate:!f,params:(query:geospatial),type:phrase),query:(match_phrase:(component:geospatial)))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!t,title:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',viewMode:view)}, {platform=linux, distribution=tar, architecture=arm64, test_report_manifest_yml=https://ci.opensearch.org/ci/dbc/integ-test/2.2.0/7984/linux/arm64/tar/test-results/6560/integ-test/test-report.yml, integ_test_build_url=https://build.ci.opensearch.org/job/integ-test/6560/display/redirect, distribution_build_number=4891, rc_number=0, metrics_visualization_url=https://metrics.opensearch.org/_dashboards/app/dashboards?security_tenant=global#/view/21aad140-49f6-11ef-bbdd-39a9b324a5aa?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-30d,to:now))&_a=(description:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',expandedPanelId:c570bdfd-3122-4e31-a02d-2130d797d9fc,filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:version,negate:!f,params:(query:'2.2.0'),type:phrase),query:(match_phrase:(version:'2.2.0'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:component,negate:!f,params:(query:geospatial),type:phrase),query:(match_phrase:(component:geospatial)))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!t,title:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',viewMode:view)}], []) updateIntegTestFailureIssues.createGithubIssue({repoUrl=https://github.com/opensearch-project/geospatial.git, issueTitle=[AUTOCUT] Integration Test Failed for geospatial-2.2.0, issueBody= @@ -76,19 +82,23 @@ Check out test report manifest linked above for steps to reproduce, cluster and ", returnStdout=true}) updateIntegTestFailureIssues.sleep({time=3, unit=SECONDS}) updateIntegTestFailureIssues.println(Integration test failed for k-NN, creating github issue) + updateIntegTestFailureIssues.println(Retrieving failed component data for k-NN) ComponentIntegTestStatus.getComponentIntegTestFailedData(k-NN) OpenSearchMetricsQuery.fetchMetrics({\"_source\":[\"platform\",\"architecture\",\"distribution\",\"test_report_manifest_yml\",\"integ_test_build_url\",\"rc_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"k-NN\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}}]}}}) + updateIntegTestFailureIssues.println(Running query: {\"_source\":[\"platform\",\"architecture\",\"distribution\",\"test_report_manifest_yml\",\"integ_test_build_url\",\"rc_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"k-NN\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}}]}}}) updateIntegTestFailureIssues.sh({script= set -e set +x curl -s -XGET "sample.url/opensearch-integration-test-results/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "abc:xyz" -H "x-amz-security-token:sampleToken" -H 'Content-Type: application/json' -d "{\"_source\":[\"platform\",\"architecture\",\"distribution\",\"test_report_manifest_yml\",\"integ_test_build_url\",\"rc_number\"],\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"k-NN\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"distribution_build_number\":\"4891\"}}]}}}" | jq '.' , returnStdout=true}) + updateIntegTestFailureIssues.println(Retrieving release owner(s) for k-NN) ReleaseMetricsData.getReleaseOwners(k-NN) - OpenSearchMetricsQuery.fetchMetrics({\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"k-NN\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}}]},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}}) + OpenSearchMetricsQuery.fetchMetrics({\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component\":\"k-NN\"}}]}},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}) + updateIntegTestFailureIssues.println(Running query: {\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component\":\"k-NN\"}}]}},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}) updateIntegTestFailureIssues.sh({script= set -e set +x - curl -s -XGET "sample.url/opensearch_release_metrics/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "abc:xyz" -H "x-amz-security-token:sampleToken" -H 'Content-Type: application/json' -d "{\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"component\":\"k-NN\"}},{\"match_phrase\":{\"version\":\"2.2.0\"}}]},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}}" | jq '.' + curl -s -XGET "sample.url/opensearch_release_metrics/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "abc:xyz" -H "x-amz-security-token:sampleToken" -H 'Content-Type: application/json' -d "{\"size\":1,\"_source\":\"release_owners\",\"query\":{\"bool\":{\"filter\":[{\"match_phrase\":{\"version\":\"2.2.0\"}},{\"match_phrase\":{\"component\":\"k-NN\"}}]}},\"sort\":[{\"current_date\":{\"order\":\"desc\"}}]}" | jq '.' , returnStdout=true}) CreateIntegTestMarkDownTable.create([{platform=linux, distribution=tar, architecture=x64, test_report_manifest_yml=https://ci.opensearch.org/ci/dbc/integ-test/2.2.0/7984/linux/x64/tar/test-results/6561/integ-test/test-report.yml, integ_test_build_url=https://build.ci.opensearch.org/job/integ-test/6561/display/redirect, distribution_build_number=4891, rc_number=0, metrics_visualization_url=https://metrics.opensearch.org/_dashboards/app/dashboards?security_tenant=global#/view/21aad140-49f6-11ef-bbdd-39a9b324a5aa?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-30d,to:now))&_a=(description:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',expandedPanelId:ddafb9c5-2d35-482a-9c61-1ba78b67f406,filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:version,negate:!f,params:(query:'2.2.0'),type:phrase),query:(match_phrase:(version:'2.2.0'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:component,negate:!f,params:(query:k-NN),type:phrase),query:(match_phrase:(component:k-NN)))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!t,title:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',viewMode:view)}, {platform=linux, distribution=tar, architecture=arm64, test_report_manifest_yml=https://ci.opensearch.org/ci/dbc/integ-test/2.2.0/7984/linux/arm64/tar/test-results/6560/integ-test/test-report.yml, integ_test_build_url=https://build.ci.opensearch.org/job/integ-test/6560/display/redirect, distribution_build_number=4891, rc_number=0, metrics_visualization_url=https://metrics.opensearch.org/_dashboards/app/dashboards?security_tenant=global#/view/21aad140-49f6-11ef-bbdd-39a9b324a5aa?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-30d,to:now))&_a=(description:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',expandedPanelId:c570bdfd-3122-4e31-a02d-2130d797d9fc,filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:version,negate:!f,params:(query:'2.2.0'),type:phrase),query:(match_phrase:(version:'2.2.0'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d90d2ba0-8fe0-11ef-a168-f19b1bbc360c,key:component,negate:!f,params:(query:k-NN),type:phrase),query:(match_phrase:(component:k-NN)))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!t,title:'OpenSearch%20Release%20Build%20and%20Integration%20Test%20Results',viewMode:view)}], [foo, bar]) updateIntegTestFailureIssues.createGithubIssue({repoUrl=https://github.com/opensearch-project/k-NN.git, issueTitle=[AUTOCUT] Integration Test Failed for k-NN-2.2.0, issueBody= diff --git a/vars/updateIntegTestFailureIssues.groovy b/vars/updateIntegTestFailureIssues.groovy index f38bd0a1..4f7c9ca5 100644 --- a/vars/updateIntegTestFailureIssues.groovy +++ b/vars/updateIntegTestFailureIssues.groovy @@ -69,6 +69,7 @@ void call(Map args = [:]) { ] testData << rowData } + println('Retrieving release owner(s) for '+ component.name) List releaseOwners = releaseMetricsData.getReleaseOwners(component.name) def markdownContent = new CreateIntegTestMarkDownTable(version).create(testData, releaseOwners) createGithubIssue(