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

[Fleet] set workerIdleMemoryLimit for jest server tests #206684

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Jan 14, 2025

Summary

Related to https://github.com/elastic/ingest-dev/issues/4683

We had a new failure due to a timeout in server unit tests, that PR try to use the workerIdleMemoryLimit so we do not reuse the same worker and avoid to put too much memory pressure (and eventually large GC operation) during unit tests.

running jest locally with runInBand and logHeapUsage you can see the difference on how memory grow
With workerIdleMemoryLimit
Screenshot 2025-01-14 at 4 08 20 PM

Without workerIdleMemoryLimit
Screenshot 2025-01-14 at 4 10 01 PM

Should avoid timeout like this one #206681

@nchaulet nchaulet requested a review from a team as a code owner January 14, 2025 21:15
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Jan 14, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Jan 14, 2025
@nchaulet nchaulet self-assigned this Jan 14, 2025
@nchaulet nchaulet requested a review from kpollich January 14, 2025 21:17
@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 15, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Fleet Cypress Tests #1 / View agents list Bulk actions should allow to bulk upgrade agents and cancel that upgrade

Metrics [docs]

✅ unchanged

History

cc @nchaulet

@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12791428444

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 15, 2025
… (#206808)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Fleet] set workerIdleMemoryLimit for jest server tests
(#206684)](#206684)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Nicolas
Chaulet","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-15T15:19:25Z","message":"[Fleet]
set workerIdleMemoryLimit for jest server tests
(#206684)","sha":"bc47ff03b5fb5ec282a89290120b3f5a1e644bb4","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor"],"title":"[Fleet]
set workerIdleMemoryLimit for jest server
tests","number":206684,"url":"https://github.com/elastic/kibana/pull/206684","mergeCommit":{"message":"[Fleet]
set workerIdleMemoryLimit for jest server tests
(#206684)","sha":"bc47ff03b5fb5ec282a89290120b3f5a1e644bb4"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206684","number":206684,"mergeCommit":{"message":"[Fleet]
set workerIdleMemoryLimit for jest server tests
(#206684)","sha":"bc47ff03b5fb5ec282a89290120b3f5a1e644bb4"}}]}]
BACKPORT-->

Co-authored-by: Nicolas Chaulet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants