kibana/test/common
Robert Oskamp 33b3901795
[8.x] FTR - optimize service initialization (#212421) (#213213)
# Backport

This will backport the following commits from `main` to `8.x`:
- [FTR - optimize service initialization
(#212421)](https://github.com/elastic/kibana/pull/212421)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Robert
Oskamp","email":"robert.oskamp@elastic.co"},"sourceCommit":{"committedDate":"2025-02-27T10:35:47Z","message":"FTR
- optimize service initialization (#212421)\n\n## Summary\n\nThis PR
optimizes the FTR service initialization by not loading UI\nservice for
API tests and by removing retries during test user setup\n\n##
Changes\n\n- Remove loading of common UI services from common services
(UI services\nshould not be loaded for API tests)\n- Move `security`
service from `@kbn/ftr-common-functional-ui-services`\nto
`@kbn/ftr-common-functional-services` as it should be available to\nAPI
tests as well\n- Only try once to delete `testUser` during init (this
user usually does\nnot exist on a fresh deployment - and if it does, a
single delete\nrequest is enough to get rid of it)\n\n## Benchmark
results\n\n**These changes will reduce FTR CI runtime overall by ~100
minutes**\n🚀\nDue to parallel workers in CI, the effective
runtime of the whole CI job\nwill be less than that.\n\n- The removal of
UI service loading (which includes starting a browser\ninstance) for API
tests reduces init time by ~0.5 seconds. With 313 API\nconfigs that are
started on CI, this reduces the runtime overall by ~156\nseconds / ~2.6
minutes.\n- The removal of test user delete retries reduces init time by
~10\nseconds. With 589 FTR configs that are started on CI, this reduces
the\nruntime overall by ~5890 seconds / ~98 minutes.\n- These numbers
have been taken on a local machine and since CI workers\nare usually
slower, we should see at least this amount of improvement if\nnot more
in
CI.","sha":"7a381afb177c81ed4d0704cfcec49e6da7179376","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport
missing","Team:Fleet","v9.0.0","backport:version","v9.1.0","v8.19.0"],"title":"FTR
- optimize service
initialization","number":212421,"url":"https://github.com/elastic/kibana/pull/212421","mergeCommit":{"message":"FTR
- optimize service initialization (#212421)\n\n## Summary\n\nThis PR
optimizes the FTR service initialization by not loading UI\nservice for
API tests and by removing retries during test user setup\n\n##
Changes\n\n- Remove loading of common UI services from common services
(UI services\nshould not be loaded for API tests)\n- Move `security`
service from `@kbn/ftr-common-functional-ui-services`\nto
`@kbn/ftr-common-functional-services` as it should be available to\nAPI
tests as well\n- Only try once to delete `testUser` during init (this
user usually does\nnot exist on a fresh deployment - and if it does, a
single delete\nrequest is enough to get rid of it)\n\n## Benchmark
results\n\n**These changes will reduce FTR CI runtime overall by ~100
minutes**\n🚀\nDue to parallel workers in CI, the effective
runtime of the whole CI job\nwill be less than that.\n\n- The removal of
UI service loading (which includes starting a browser\ninstance) for API
tests reduces init time by ~0.5 seconds. With 313 API\nconfigs that are
started on CI, this reduces the runtime overall by ~156\nseconds / ~2.6
minutes.\n- The removal of test user delete retries reduces init time by
~10\nseconds. With 589 FTR configs that are started on CI, this reduces
the\nruntime overall by ~5890 seconds / ~98 minutes.\n- These numbers
have been taken on a local machine and since CI workers\nare usually
slower, we should see at least this amount of improvement if\nnot more
in
CI.","sha":"7a381afb177c81ed4d0704cfcec49e6da7179376"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212421","number":212421,"mergeCommit":{"message":"FTR
- optimize service initialization (#212421)\n\n## Summary\n\nThis PR
optimizes the FTR service initialization by not loading UI\nservice for
API tests and by removing retries during test user setup\n\n##
Changes\n\n- Remove loading of common UI services from common services
(UI services\nshould not be loaded for API tests)\n- Move `security`
service from `@kbn/ftr-common-functional-ui-services`\nto
`@kbn/ftr-common-functional-services` as it should be available to\nAPI
tests as well\n- Only try once to delete `testUser` during init (this
user usually does\nnot exist on a fresh deployment - and if it does, a
single delete\nrequest is enough to get rid of it)\n\n## Benchmark
results\n\n**These changes will reduce FTR CI runtime overall by ~100
minutes**\n🚀\nDue to parallel workers in CI, the effective
runtime of the whole CI job\nwill be less than that.\n\n- The removal of
UI service loading (which includes starting a browser\ninstance) for API
tests reduces init time by ~0.5 seconds. With 313 API\nconfigs that are
started on CI, this reduces the runtime overall by ~156\nseconds / ~2.6
minutes.\n- The removal of test user delete retries reduces init time by
~10\nseconds. With 589 FTR configs that are started on CI, this reduces
the\nruntime overall by ~5890 seconds / ~98 minutes.\n- These numbers
have been taken on a local machine and since CI workers\nare usually
slower, we should see at least this amount of improvement if\nnot more
in
CI.","sha":"7a381afb177c81ed4d0704cfcec49e6da7179376"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2025-03-05 13:36:38 +01:00
..
fixtures/plugins/coverage Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
plugins [8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-core (#201653) (#205563) 2025-01-05 16:32:00 +01:00
services [8.x] FTR - optimize service initialization (#212421) (#213213) 2025-03-05 13:36:38 +01:00
config.js [8.x] Additional prototype pollution protections (#206073) (#208742) 2025-01-29 15:08:04 -05:00
configure_http2.ts Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00