Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[coverage] fix jest report merging #89537

Closed

Conversation

dmlemeshko
Copy link
Member

@dmlemeshko dmlemeshko commented Jan 28, 2021

Summary

This PR fixes code coverage merge for jest: we merge it right after jest and jest-integration tests are finished and upload reports to GCS.
Tested: https://kibana-ci.elastic.co/job/elastic+kibana+qa-research/182/

@dmlemeshko dmlemeshko added v8.0.0 code coverage Issues & PRs about code coverage labels Jan 28, 2021
Comment on lines 181 to +184
def ARTIFACT_PATTERNS = [
'target/junit/**/*',
'target/kibana-*',
'target/kibana-coverage/**/*',
'target/kibana-coverage/jest/**/*',
Copy link
Member Author

@dmlemeshko dmlemeshko Jan 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to upload content of target/kibana-coverage/functional since it is 2-10 GB and we archive it here

if (env.CODE_COVERAGE) {
sh 'tar -czf kibana-coverage.tar.gz target/kibana-coverage/**/*'
uploadGcsArtifact("kibana-ci-artifacts/jobs/${env.JOB_NAME}/${BUILD_NUMBER}/coverage/${workerName}", 'kibana-coverage.tar.gz')
}
}

@dmlemeshko dmlemeshko marked this pull request as ready for review January 28, 2021 15:36
@dmlemeshko dmlemeshko requested review from a team as code owners January 28, 2021 15:36
@dmlemeshko dmlemeshko added backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes labels Jan 28, 2021
Copy link

@LeeDr LeeDr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - we found FUNCTIONAL and JEST results in kibana-stats :-)

# Need to override COVERAGE_INGESTION_KIBANA_ROOT since json file has original intake worker path
COVERAGE_SUMMARY_FILE=target/kibana-coverage/jest-combined/coverage-summary.json
export COVERAGE_INGESTION_KIBANA_ROOT=/dev/shm/workspace/kibana
node scripts/ingest_coverage.js --verbose --path ${COVERAGE_SUMMARY_FILE} --vcsInfoPath ./VCS_INFO.txt --teamAssignmentsPath $TEAM_ASSIGN_PATH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why duplicate instead of loop?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #43 is specific for jest, I thought about loop + if but then decided to do it this way

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wayneseymour do you want me to change it with for+if ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah it's all good. I just keep a lookout for duplication.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@tylersmalley
Copy link
Contributor

@dmlemeshko, not sure if this is still needed - as the original PR was reverted - and re-merged without changing any of the code coverage information.

@dmlemeshko
Copy link
Member Author

Closing in favour of #90915

@dmlemeshko dmlemeshko closed this Feb 13, 2021
@dmlemeshko dmlemeshko deleted the fix-code-coverage-merging branch January 31, 2022 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting code coverage Issues & PRs about code coverage release_note:skip Skip the PR/issue when compiling release notes v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants