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

[CI] Combines Jest test jobs #85850

Merged
merged 9 commits into from
Jan 27, 2021
Merged

Conversation

tylersmalley
Copy link
Contributor

@tylersmalley tylersmalley commented Dec 14, 2020

Based on #84848

  • Combines the OSS and X-Pack Jest tests into a single job.
  • Stores code coverage JSON in CI
  • Removes jest.config.js from the x-pack directory.

@tylersmalley tylersmalley force-pushed the jest-single branch 7 times, most recently from 0f4b877 to 7adf829 Compare December 18, 2020 00:53
@tylersmalley tylersmalley force-pushed the jest-single branch 2 times, most recently from 9b39e9f to 1c8d6de Compare December 22, 2020 00:00
@tylersmalley tylersmalley changed the title WIP: Test combining Jest tests [CI] Combines Jest tests Dec 22, 2020
@tylersmalley tylersmalley added release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.12.0 v8.0.0 labels Dec 23, 2020
@tylersmalley tylersmalley marked this pull request as ready for review December 23, 2020 07:05
@tylersmalley tylersmalley requested a review from a team as a code owner December 23, 2020 07:05
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@tylersmalley
Copy link
Contributor Author

@dmlemeshko, you mind looking over this. In addition to combining the OSS/X-Pack Jest jobs, I am also outputting coverage.

Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

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

Looks like it got stuck on the integration tests

01:50:38  Jest did not exit one second after the test run has completed.
01:50:38  
01:50:38  This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
03:40:47  Sending interrupt signal to process

https://kibana-ci.elastic.co/job/elastic+kibana+pipeline-pull-request/96117/execution/node/411/

Code changes LGTM

@@ -36,4 +36,5 @@ module.exports = {
],
],
setupFilesAfterEnv: ['<rootDir>/packages/kbn-test/target/jest/setup/after_env.integration.js'],
coverageDirectory: '<rootDir>/target/jest-coverage/jest_integration',
Copy link
Member

Choose a reason for hiding this comment

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

We need to copy json file from this path into the temp directory next to the other jest coverage json before merging: nyc does not support glob patterns or list of folders, so our config uses
a single folder with jest oss, xpack and integration coverage json files

Copy link
Member

Choose a reason for hiding this comment

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

Probably it can added in src/dev/code_coverage/shell_scripts/merge_jest_and_functional.sh :

cp -r tmp/extracted_coverage/target/kibana-coverage/jest_integration/json-summary.json target/kibana-coverage/jest/integration-json-summary.json  

Copy link
Member

Choose a reason for hiding this comment

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

I also just changing path to <rootDir>/target/kibana-coverage/jest_integration to follow the same pattern /target/kibana-coverage/**

@dmlemeshko
Copy link
Member

I started coverage job https://kibana-ci.elastic.co/job/elastic+kibana+qa-research/166/ but guess it won't be correct since jest integration results are not in the right place

@tylersmalley
Copy link
Contributor Author

@dmlemeshko, thanks for taking a look. I pushed 50707860590136a92ff7f466f73aa840444fcc1e, which uses unique file names instead of directories and kicked off another job at https://kibana-ci.elastic.co/job/elastic+kibana+qa-research/167/

I had to go back to defining the reporter in code based on an environment variable as it doesn't appear to you pass the necessary nested array configuration through the Jest CLI.

target
├── coverage
│   ├── jest-integration.json
│   └── jest.json
└── junit
    ├── TEST-Jest Integration Tests.xml
    └── TEST-Jest Tests.xml

@tylersmalley tylersmalley changed the title [CI] Combines Jest tests [CI] Combines Jest test jobs Dec 23, 2020
@tylersmalley tylersmalley force-pushed the jest-single branch 2 times, most recently from 9962470 to fc2a1bd Compare January 14, 2021 00:03
@tylersmalley
Copy link
Contributor Author

tylersmalley commented Jan 14, 2021

For my reference, here is the QA code coverage job: https://kibana-ci.elastic.co/job/elastic+kibana+qa-research/179/

@tylersmalley
Copy link
Contributor Author

@dmlemeshko, mind taking a look at this again to see if the changes keep your code coverage reports intact?

@tylersmalley tylersmalley requested a review from a team as a code owner January 14, 2021 23:28
@elastic elastic deleted a comment from kibanamachine Jan 26, 2021
@elastic elastic deleted a comment from dmlemeshko Jan 26, 2021
@tylersmalley tylersmalley force-pushed the jest-single branch 7 times, most recently from 69bb172 to c58f517 Compare January 27, 2021 05:29
Tyler Smalley added 9 commits January 26, 2021 22:34
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

  • 💔 Build #101353 failed c58f51756234aa8341193b693d071aad1d65a063
  • 💚 Build #101327 succeeded 2862d6864a467895fac3003e9d751a8f3980ad76
  • 💔 Build #101305 failed c33d7b3968efe7499926f14df96c21f7167e9c96
  • 💔 Build #101285 failed 4e4579d6d13c3874ae721eb952c633d930357936
  • 💔 Build #101261 failed d178534735fcc904feeeb63e2b8416c57325d399

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

@tylersmalley
Copy link
Contributor Author

@tylersmalley tylersmalley merged commit 46ac4ed into elastic:master Jan 27, 2021
tylersmalley pushed a commit to tylersmalley/kibana that referenced this pull request Jan 27, 2021
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
# Conflicts:
#	jest.config.oss.js
#	src/dev/code_coverage/shell_scripts/extract_archives.sh
#	test/scripts/jenkins_unit.sh
#	test/scripts/jenkins_xpack.sh
#	vars/kibanaCoverage.groovy
#	x-pack/jest.config.js
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jan 27, 2021
…y-tests

* 'master' of github.com:elastic/kibana: (276 commits)
  [Telemetry] Settings Collector: redact sensitive reported values (elastic#88675)
  [CI] Combines Jest test jobs (elastic#85850)
  [Upgrade Assistant] Migrate server to new es-js client (elastic#89207)
  Migrate maps_legacy, maps_oss, region_map, and tile_map plugions to TS projects (elastic#89351)
  [Vega Docs] Add experimental flag on the vega maps title (elastic#89402)
  Increase the time needed to locate the save viz toast (elastic#89301)
  [Enterprise Search] Add links to doc links service (elastic#89260)
  Fixed regex bug in Safari (elastic#89399)
  [Lens] Fix indexpattern checks for missing references (elastic#88840)
  [Lens] Clean up usage collector (elastic#89109)
  update apm index pattern (elastic#89395)
  [APM] Upgrade ES client (elastic#86594)
  Enable v2 so migrations, disable in FTR tests (elastic#89297)
  [Search Sessions] Make search session indicator UI opt-in, refactor per-app capabilities (elastic#88699)
  Cleanup OSS code from visualizations wizard (elastic#89092)
  [APM] Optimize API test order (elastic#88654)
  Rename conversion function, extract to module scope and add tests. (elastic#89018)
  [core.logging] Add ops logs to the KP logging system (elastic#88070)
  chore(NA): improve ts build refs performance on kbn bootstrap (elastic#89333)
  skip flaky suite (elastic#89379)
  ...

# Conflicts:
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/timeline/timeline.tsx
#	x-pack/test/accessibility/config.ts
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 27, 2021
…ana into task-manager/shift-on-trend

* 'task-manager/shift-on-trend' of github.com:gmmorris/kibana: (74 commits)
  [Metrics UI] Fix Host Overview boxes in Host Detail page (elastic#89299)
  [Telemetry] Settings Collector: redact sensitive reported values (elastic#88675)
  [CI] Combines Jest test jobs (elastic#85850)
  [Upgrade Assistant] Migrate server to new es-js client (elastic#89207)
  Migrate maps_legacy, maps_oss, region_map, and tile_map plugions to TS projects (elastic#89351)
  [Vega Docs] Add experimental flag on the vega maps title (elastic#89402)
  Increase the time needed to locate the save viz toast (elastic#89301)
  [Enterprise Search] Add links to doc links service (elastic#89260)
  Fixed regex bug in Safari (elastic#89399)
  [Lens] Fix indexpattern checks for missing references (elastic#88840)
  [Lens] Clean up usage collector (elastic#89109)
  update apm index pattern (elastic#89395)
  [APM] Upgrade ES client (elastic#86594)
  Enable v2 so migrations, disable in FTR tests (elastic#89297)
  [Search Sessions] Make search session indicator UI opt-in, refactor per-app capabilities (elastic#88699)
  Cleanup OSS code from visualizations wizard (elastic#89092)
  [APM] Optimize API test order (elastic#88654)
  Rename conversion function, extract to module scope and add tests. (elastic#89018)
  [core.logging] Add ops logs to the KP logging system (elastic#88070)
  chore(NA): improve ts build refs performance on kbn bootstrap (elastic#89333)
  ...
tylersmalley pushed a commit that referenced this pull request Jan 28, 2021
* [CI] Combines Jest test jobs (#85850)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
# Conflicts:
#	jest.config.oss.js
#	src/dev/code_coverage/shell_scripts/extract_archives.sh
#	test/scripts/jenkins_unit.sh
#	test/scripts/jenkins_xpack.sh
#	vars/kibanaCoverage.groovy
#	x-pack/jest.config.js

* [CI] Decrease number of Jest workers

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
jbudz added a commit that referenced this pull request Jan 28, 2021
jbudz added a commit that referenced this pull request Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants