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] Run Jest tests in parallel #115687

Merged
merged 8 commits into from
Nov 2, 2021
Merged

Conversation

tylersmalley
Copy link
Contributor

@tylersmalley tylersmalley commented Oct 19, 2021

We have run into issues with parallelizing Jest tests using its built-in workers. This moves us to run the tests in-band on separate smaller machines. This reduces the overall cost of the Jest tests, isolates Jest tests to plugins, and prepares us for code-coverage reporting on PR's.

Jest configurations with no matching test files were removed as to not take needless setup time and further skew the split.

Resource comparison:

Current:
c2-16 for 90 minutes
1440 core minutes

Split:
c2-4 for 305 minutes
1220 core minutes

Skipped tests suites tracked in #115881

@tylersmalley tylersmalley force-pushed the split-jest branch 9 times, most recently from 15cd15b to e75db5a Compare October 20, 2021 04:16
@tylersmalley tylersmalley changed the title [jest] Split Jest tests and run in-band [ci] Run Jest tests in parallel Oct 20, 2021
@tylersmalley tylersmalley force-pushed the split-jest branch 4 times, most recently from 14707c6 to b3585c7 Compare October 20, 2021 13:25
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@tylersmalley tylersmalley added Team:Operations Team label for Operations Team v8.0.0 v8.1.0 auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes labels Nov 1, 2021
@tylersmalley tylersmalley marked this pull request as ready for review November 1, 2021 14:47
@tylersmalley tylersmalley requested review from a team as code owners November 1, 2021 14:47
@elasticmachine
Copy link
Contributor

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

@tylersmalley
Copy link
Contributor Author

@elasticmachine merge upstream

@brianseeders
Copy link
Contributor

I think that there are too many JUnit artifacts being produced at the moment, and we maybe need to figure out something with that. This one has over 1000 artifacts!

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@tylersmalley
Copy link
Contributor Author

tylersmalley commented Nov 1, 2021

@brianseeders, explicitly disabled code coverage. When we re-enable we can overwrite the output location so we can select what to be uploaded.

Tyler Smalley added 2 commits November 1, 2021 11:44
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

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

@tylersmalley
Copy link
Contributor Author

Merging this ahead of the pending reviews as they are for teams triggered by the removal of unused Jest config files. Feel free to ping me if there are concerns.

@tylersmalley tylersmalley merged commit 237d68d into elastic:main Nov 2, 2021
tylersmalley pushed a commit that referenced this pull request Nov 2, 2021
tylersmalley pushed a commit to tylersmalley/kibana that referenced this pull request Nov 2, 2021
* [ci] Run Jest tests in parallel

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

* Disable coverage

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

* Make hourly match prs

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

* Update timeout

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

* mock process.execArgv so that it is consistent

* Remove comment

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes reverted Team:Operations Team label for Operations Team v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants