Skip to content

Commit

Permalink
Add checks in case test type missing in report workflow (#4067)
Browse files Browse the repository at this point in the history
Signed-off-by: Zelin Hao <[email protected]>
  • Loading branch information
zelinh authored Oct 2, 2023
1 parent f8287a5 commit f981a04
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ out.txt

/manifests/**/*.yml.lock
vars/

test-report.yml
2 changes: 2 additions & 0 deletions jenkins/opensearch-dashboards/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ pipeline {
testType: "integ-test",
componentName: "${COMPONENT_NAME}",
)
echo("Download report manifest from https://ci.opensearch.org/ci/dbc/integ-test/${env.version}/${env.buildId}/${env.platform}/${env.architecture}/${env.distribution}/test-results/${env.BUILD_NUMBER}/integ-test/test-report.yml")
archiveArtifacts artifacts: 'test-report.yml'
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions jenkins/opensearch/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ pipeline {
testType: "integ-test",
componentName: "${COMPONENT_NAME}",
)
echo("Download report manifest from https://ci.opensearch.org/ci/dbc/integ-test/${env.version}/${env.buildId}/${env.platform}/${env.architecture}/${env.distribution}/test-results/${env.BUILD_NUMBER}/integ-test/test-report.yml")
archiveArtifacts artifacts: 'test-report.yml'
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/report_workflow/test_report_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def update_data(self) -> dict:
self.test_run_data["name"] = self.product_name
self.test_run_data["test-run"] = self.update_test_run_data()
for component in self.test_components.select(focus=self.args.components):
self.test_run_data["components"].append(self.component_entry(component.name))
if self.test_manifest.components[component.name].__to_dict__().get(self.test_type) is not None:
self.test_run_data["components"].append(self.component_entry(component.name))
return self.test_run_data

def update_test_run_data(self) -> dict:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ ccc -R opensearch-project/dashboards-observability --comment "Closing the issue
createUploadTestReportManifest.echo(Uploading to s3://dummy_job/3.0.0/215/linux/x64/tar/test-results/215/integ-test/test-report.yml)
createUploadTestReportManifest.withAWS({role=opensearch-test, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
createUploadTestReportManifest.s3Upload({file=/tmp/workspace/test-report.yml, bucket=ARTIFACT_BUCKET_NAME, path=dummy_job/3.0.0/215/linux/x64/tar/test-results/215/integ-test/test-report.yml})
integ-test.echo(Download report manifest from https://ci.opensearch.org/ci/dbc/integ-test/3.0.0/215/linux/x64/tar/test-results/215/integ-test/test-report.yml)
integ-test.archiveArtifacts({artifacts=test-report.yml})
integ-test.postCleanup()
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
integ-test.node(Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host, groovy.lang.Closure)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ ccc -R opensearch-project/OpenSearch --comment "Closing the issue as the Integra
createUploadTestReportManifest.echo(Uploading to s3://dummy_job/3.0.0/8184/linux/x64/tar/test-results/234/integ-test/test-report.yml)
createUploadTestReportManifest.withAWS({role=opensearch-test, roleAccount=AWS_ACCOUNT_PUBLIC, duration=900, roleSessionName=jenkins-session}, groovy.lang.Closure)
createUploadTestReportManifest.s3Upload({file=/tmp/workspace/test-report.yml, bucket=ARTIFACT_BUCKET_NAME, path=dummy_job/3.0.0/8184/linux/x64/tar/test-results/234/integ-test/test-report.yml})
integ-test.echo(Download report manifest from https://ci.opensearch.org/ci/dbc/integ-test/3.0.0/8184/linux/x64/tar/test-results/234/integ-test/test-report.yml)
integ-test.archiveArtifacts({artifacts=test-report.yml})
integ-test.postCleanup()
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
integ-test.node(Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host, groovy.lang.Closure)
Expand Down

0 comments on commit f981a04

Please sign in to comment.