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] Improve performance of Fleet preconfiguration integration tests #145988

Closed
juliaElastic opened this issue Nov 22, 2022 · 3 comments
Closed
Labels
Team:Fleet Team label for Observability Data Collection Fleet team technical debt Improvement of the software architecture and operational architecture

Comments

@juliaElastic
Copy link
Contributor

juliaElastic commented Nov 22, 2022

Fleet has integration tests that start up an Elasticsearch instance: https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/server/integration_tests/reset_preconfiguration.test.ts#L166

These are slow to run on CI, and also slow to run locally to test changes.

Can we improve these by using a common ES instance (that would speed up CI)?

For local development, it would be great to have a way to separately start an ES instance and keep it running while running the tests multiple times (and inspect the contents of indices).

FTR already has these features, is it possible to rewrite these integration tests to run by FTR?

PASS  x-pack/plugins/fleet/server/integration_tests/ha_setup.test.ts (276.963 s)
PASS  x-pack/plugins/fleet/server/integration_tests/upgrade_package_install_version.test.ts (103.607 s)
PASS  x-pack/plugins/fleet/server/integration_tests/upgrade_agent_policy_schema_version.test.ts (104.973 s)
PASS  x-pack/plugins/fleet/server/integration_tests/fleet_usage_telemetry.test.ts (79.585 s)

This test is skipped: https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/server/integration_tests/cloud_preconfiguration.test.ts#L26

@juliaElastic juliaElastic added technical debt Improvement of the software architecture and operational architecture Team:Fleet Team label for Observability Data Collection Fleet team labels Nov 22, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@jen-huang jen-huang changed the title [Fleet] Improve Fleet integration tests [Fleet] Improve performance of Fleet preconfiguration integration tests Apr 19, 2023
@nchaulet
Copy link
Member

nchaulet commented May 8, 2023

@juliaElastic @kpollich I am not sure if we should move those tests to FTR, and looking at this it seems hard to do so for most of them, as we use specific kibana configuration and some jest feature. I think we should keep the number of these tests to the minimum but they seems very valuable as they start with some fresh and clean ES and do not have side effects.

For local development, it would be great to have a way to separately start an ES instance and keep it running while running the tests multiple times (and inspect the contents of indices).

We can inspect the content of the indices of this test by using node debugger while running the test, I can add some instructions on how to do this.

@nchaulet
Copy link
Member

nchaulet commented May 9, 2023

I think we can close that issue for now, feel free to reopen it if you see anything that can be improved

@nchaulet nchaulet closed this as completed May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Team label for Observability Data Collection Fleet team technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

3 participants