[8.x] FTR - optimize service initialization (#212421)#213213
Merged
pheyos merged 1 commit intoelastic:8.xfrom Mar 5, 2025
Merged
[8.x] FTR - optimize service initialization (#212421)#213213pheyos merged 1 commit intoelastic:8.xfrom
pheyos merged 1 commit intoelastic:8.xfrom
Conversation
## Summary This PR optimizes the FTR service initialization by not loading UI service for API tests and by removing retries during test user setup ## Changes - Remove loading of common UI services from common services (UI services should not be loaded for API tests) - Move `security` service from `@kbn/ftr-common-functional-ui-services` to `@kbn/ftr-common-functional-services` as it should be available to API tests as well - Only try once to delete `testUser` during init (this user usually does not exist on a fresh deployment - and if it does, a single delete request is enough to get rid of it) ## Benchmark results **These changes will reduce FTR CI runtime overall by ~100 minutes** :rocket: Due to parallel workers in CI, the effective runtime of the whole CI job will be less than that. - The removal of UI service loading (which includes starting a browser instance) for API tests reduces init time by ~0.5 seconds. With 313 API configs that are started on CI, this reduces the runtime overall by ~156 seconds / ~2.6 minutes. - The removal of test user delete retries reduces init time by ~10 seconds. With 589 FTR configs that are started on CI, this reduces the runtime overall by ~5890 seconds / ~98 minutes. - These numbers have been taken on a local machine and since CI workers are usually slower, we should see at least this amount of improvement if not more in CI. (cherry picked from commit 7a381af) # Conflicts: # src/platform/packages/shared/kbn-ftr-common-functional-services/index.ts
Contributor
|
Pinging @elastic/fleet (Team:Fleet) |
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Public APIs missing comments
Public APIs missing exports
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.x:Questions ?
Please refer to the Backport tool documentation