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

[obsUX][APM] Migrate APM metrics tests to agnostic deployment tests #200175

Conversation

MiriamAparicio
Copy link
Contributor

@MiriamAparicio MiriamAparicio commented Nov 14, 2024

Summary

Closes #198976
Part of #193245

This PR contains the changes to migrate metrics test folder to Deployment-agnostic testing strategy.

How to test

Serverless

node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts --grep="APM"

It's recommended to be run against MKI

Stateful

node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep="APM"

Checks

  • (OPTIONAL, only if a test has been unskipped) Run flaky test suite
  • local run for serverless
  • local run for stateful
  • MKI run for serverless

@MiriamAparicio MiriamAparicio added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Nov 14, 2024
@MiriamAparicio MiriamAparicio requested review from a team as code owners November 14, 2024 13:25
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Nov 14, 2024
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Member

@jennypavlova jennypavlova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀 And just a reminder to run the flaky test runner on the PR before merging :)

oas_docs/output/kibana.serverless.yaml Outdated Show resolved Hide resolved
oas_docs/package-lock.json Outdated Show resolved Hide resolved
@MiriamAparicio
Copy link
Contributor Author

I didn't think on running the flaky test runner, I didn't unskip any test

@MiriamAparicio MiriamAparicio changed the title Migrate APM metrics tests to agnostic deployment tests [obsUX][APM] Migrate APM metrics tests to agnostic deployment tests Nov 14, 2024
@MiriamAparicio MiriamAparicio force-pushed the 198979-deployment-agnostic-metrics-tests branch 3 times, most recently from e81c67e to aed0553 Compare November 14, 2024 15:32
@jennypavlova
Copy link
Member

@MiriamAparicio Thanks for the fixes ❤️

I didn't think on running the flaky test runner, I didn't unskip any test

I saw some tests were marked flaky in a comment and didn't pay attention to the skip tag

@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 14, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 69747dd
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-200175-69747dd303b0

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #58 / Indicator match execution logic API @ess @serverless Indicator match type rules, alert suppression Code execution path: events count is smaller than threats count should suppress an alert on real rule executions

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
@kbn/test-suites-xpack 722 720 -2

Total ESLint disabled count

id before after diff
@kbn/test-suites-xpack 747 745 -2

History

Copy link
Contributor

@miloszmarcinkowski miloszmarcinkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

nit: add Type-Only import to DeploymentAgnosticFtrProviderContext imports

@MiriamAparicio MiriamAparicio merged commit 4d1cb0b into elastic:main Nov 14, 2024
25 checks passed
@MiriamAparicio MiriamAparicio deleted the 198979-deployment-agnostic-metrics-tests branch November 14, 2024 18:50
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 14, 2024
…lastic#200175)

### Summary
Closes elastic#198976
Part of elastic#193245

This PR contains the changes to migrate metrics test folder to
Deployment-agnostic testing strategy.

#### How to test
Serverless
```
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts --grep="APM"
```
It's recommended to be run against
[MKI](https://github.com/crespocarlos/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki)

Stateful
```
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep="APM"
```
Checks

- [ ] (OPTIONAL, only if a test has been unskipped) Run flaky test suite
- [x]  local run for serverless
- [x]  local run for stateful
- [x]  MKI run for serverless

(cherry picked from commit 4d1cb0b)
@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 Nov 14, 2024
…ests (#200175) (#200242)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[obsUX][APM] Migrate APM metrics tests to agnostic deployment tests
(#200175)](#200175)

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

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

<!--BACKPORT
[{"author":{"name":"Miriam","email":"31922082+MiriamAparicio@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-11-14T18:50:37Z","message":"[obsUX][APM]
Migrate APM metrics tests to agnostic deployment tests (#200175)\n\n###
Summary\r\nCloses
https://github.com/elastic/kibana/issues/198976\r\nPart of
https://github.com/elastic/kibana/issues/193245\r\n\r\nThis PR contains
the changes to migrate metrics test folder to\r\nDeployment-agnostic
testing strategy.\r\n\r\n#### How to test\r\nServerless\r\n```\r\nnode
scripts/functional_tests_server --config
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts\r\nnode
scripts/functional_test_runner --config
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
--grep=\"APM\"\r\n```\r\nIt's recommended to be run
against\r\n[MKI](https://github.com/crespocarlos/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki)\r\n\r\nStateful\r\n```\r\nnode
scripts/functional_tests_server --config
x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts\r\nnode
scripts/functional_test_runner --config
x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
--grep=\"APM\"\r\n```\r\nChecks\r\n\r\n- [ ] (OPTIONAL, only if a test
has been unskipped) Run flaky test suite\r\n- [x] local run for
serverless\r\n- [x] local run for stateful\r\n- [x] MKI run for
serverless","sha":"4d1cb0b586c3434d2c968c059d6e23d71207bfef","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services"],"title":"[obsUX][APM]
Migrate APM metrics tests to agnostic deployment
tests","number":200175,"url":"https://github.com/elastic/kibana/pull/200175","mergeCommit":{"message":"[obsUX][APM]
Migrate APM metrics tests to agnostic deployment tests (#200175)\n\n###
Summary\r\nCloses
https://github.com/elastic/kibana/issues/198976\r\nPart of
https://github.com/elastic/kibana/issues/193245\r\n\r\nThis PR contains
the changes to migrate metrics test folder to\r\nDeployment-agnostic
testing strategy.\r\n\r\n#### How to test\r\nServerless\r\n```\r\nnode
scripts/functional_tests_server --config
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts\r\nnode
scripts/functional_test_runner --config
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
--grep=\"APM\"\r\n```\r\nIt's recommended to be run
against\r\n[MKI](https://github.com/crespocarlos/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki)\r\n\r\nStateful\r\n```\r\nnode
scripts/functional_tests_server --config
x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts\r\nnode
scripts/functional_test_runner --config
x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
--grep=\"APM\"\r\n```\r\nChecks\r\n\r\n- [ ] (OPTIONAL, only if a test
has been unskipped) Run flaky test suite\r\n- [x] local run for
serverless\r\n- [x] local run for stateful\r\n- [x] MKI run for
serverless","sha":"4d1cb0b586c3434d2c968c059d6e23d71207bfef"}},"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/200175","number":200175,"mergeCommit":{"message":"[obsUX][APM]
Migrate APM metrics tests to agnostic deployment tests (#200175)\n\n###
Summary\r\nCloses
https://github.com/elastic/kibana/issues/198976\r\nPart of
https://github.com/elastic/kibana/issues/193245\r\n\r\nThis PR contains
the changes to migrate metrics test folder to\r\nDeployment-agnostic
testing strategy.\r\n\r\n#### How to test\r\nServerless\r\n```\r\nnode
scripts/functional_tests_server --config
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts\r\nnode
scripts/functional_test_runner --config
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
--grep=\"APM\"\r\n```\r\nIt's recommended to be run
against\r\n[MKI](https://github.com/crespocarlos/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki)\r\n\r\nStateful\r\n```\r\nnode
scripts/functional_tests_server --config
x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts\r\nnode
scripts/functional_test_runner --config
x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
--grep=\"APM\"\r\n```\r\nChecks\r\n\r\n- [ ] (OPTIONAL, only if a test
has been unskipped) Run flaky test suite\r\n- [x] local run for
serverless\r\n- [x] local run for stateful\r\n- [x] MKI run for
serverless","sha":"4d1cb0b586c3434d2c968c059d6e23d71207bfef"}}]}]
BACKPORT-->

Co-authored-by: Miriam <31922082+MiriamAparicio@users.noreply.github.com>
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) ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Migrate /test/apm_api_integration/tests/infrastructure/ to be deployment-agnostic API tests
6 participants