-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 merging #90915
[coverage] fix jest merging #90915
Conversation
@tylersmalley we actually need this change to make coverage work again. Jest tests no longer need merging so I moved report generation right after tests execution. Still we need to store jest report in artefacts for later ingestion to stats. Other changes are mostly cleanup |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…a into fix-code-coverage-merge
@@ -1,5 +1,5 @@ | |||
{ | |||
"id": "coverage-fixtures", | |||
"id": "coverageFixtures", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After merging master on Monday I faced this error in functional tests:
11:37:23 │ proc [kibana] FATAL Error: Failed to initialize plugins:
11:37:23 │ proc [kibana] Plugin "id" must be camelCase, but found: coverage-fixtures. (invalid-manifest, /dev/shm/workspace/kibana12/test/common/fixtures/plugins/coverage/kibana.json)
I changed plugin id according error an looks like it is working fine
|
||
echo " -> Combine code coverage in a single report" | ||
yarn nyc report --nycrc-path src/dev/code_coverage/nyc_config/nyc.jest.config.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we run jest tests in a single place now, I added report generation right after tests are done.
. src/dev/code_coverage/shell_scripts/merge_jest_and_functional.sh | ||
# zip combined reports | ||
tar -czf kibana-coverage.tar.gz target/kibana-coverage/**/* | ||
. src/dev/code_coverage/shell_scripts/merge_functional.sh | ||
. src/dev/code_coverage/shell_scripts/copy_jest_report.sh | ||
# zip functional combined report | ||
tar -czf kibana-functional-coverage.tar.gz target/kibana-coverage/functional-combined/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only merge functional tests now, but we still need to copy jest for ingestion. Functional combined report is uploaded separately since jest was already in artefacts after tests execution.
@@ -188,7 +188,7 @@ def withGcsArtifactUpload(workerName, closure) { | |||
def ARTIFACT_PATTERNS = [ | |||
'target/junit/**/*', | |||
'target/kibana-*', | |||
'target/kibana-coverage/**/*', | |||
'target/kibana-coverage/jest/**/*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not upload kibana-coverage/functional
content to artefacts since it is 30 GB of json files and we are not interested in them individually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - assuming the qa-research job works as expected
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Summary
Follow-up to #89948
PR fixes code coverage collection for jest tests
https://kibana-ci.elastic.co/job/elastic+kibana+qa-research/189
with coverage plugin id fix
https://kibana-ci.elastic.co/job/elastic+kibana+qa-research/192
Checklist
Delete any items that are not applicable to this PR.
For maintainers