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

[APM] Migrate /mobile API tests to deployment agnostic folder #199021

Merged
merged 23 commits into from
Nov 11, 2024

Conversation

kpatticha
Copy link
Contributor

@kpatticha kpatticha commented Nov 5, 2024

closes #198980

In addition to migrating the mobile api tests, the PR includes

  • Fixing mapping issue with error.grouping_name which causing to drop documents
  • Fix and unskip mobile tests

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"

TODO

  • flaky runner
  • locally pass
  • mki run

@kpatticha kpatticha requested review from a team as code owners November 5, 2024 16:20
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Nov 5, 2024
@elasticmachine
Copy link
Contributor

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

@kpatticha kpatticha changed the title [APM] Migrate /mobile API tests to deployment agnostic folder [APM] Migrate /mobile API tests to deployment agnostic folder Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

🤖 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!)

@kpatticha kpatticha 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 Nov 5, 2024
@dmlemeshko
Copy link
Member

I believe we can hold with this PR review until #198775 is merged?

@kpatticha
Copy link
Contributor Author

@dmlemeshko yes definitely, I opened before seeing the discussion around the registry

Comment on lines 77 to 78
// FLAKY: https://github.com/elastic/kibana/issues/177654
describe.skip('when samples data is loaded', () => {
Copy link
Member

@dmlemeshko dmlemeshko Nov 7, 2024

Choose a reason for hiding this comment

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

question: do you think it can be safely migrated as "deployment-agnostic" in skip state without being run against MKI and ESS?

DO tests have pretty strict stability requirements: https://github.com/elastic/kibana/tree/main/x-pack/test/api_integration/deployment_agnostic#tagging-and-skipping-the-tests

I'm afraid that later you might face issues to re-enable due to those Cloud-first testing requirement

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH, I don't think it's safe. I could try unskip these tests

@kpatticha kpatticha requested a review from a team as a code owner November 8, 2024 11:55
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 🚀

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

LGTM, just few nits

Comment on lines +310 to +311
environment: 'production',
kuery: `service.version:"1.1"`,
Copy link
Member

Choose a reason for hiding this comment

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

is this configuration acceptable to run tests against ESS/MKI?

Copy link
Member

@dmlemeshko dmlemeshko Nov 8, 2024

Choose a reason for hiding this comment

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

I notice tests use different query arguments and wonder if these tests will work not only in KIbana CI, but when we run it against serverless on MKI and 9.0.0-snapshot ESS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what do you mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tested it against serverless on MKI and it worked.

Copy link
Member

@dmlemeshko dmlemeshko Nov 8, 2024

Choose a reason for hiding this comment

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

we run all deployment-agnostic tests in Cloud both for serverless (MKI) and stateful (ESS 9.0.0-snapshot). I saw you marked MKI run checkbox, so my guess all mobile tests from PR are checked against MKI. Do we expect the same for ESS Cloud?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I run the tests

  • locally serverless
  • locally stateful
  • serverless MKI

do we also need to test against ESS cloud?

@kpatticha kpatticha enabled auto-merge (squash) November 11, 2024 11:41
@elasticmachine
Copy link
Contributor

⏳ Build in-progress

  • Buildkite Build
  • Commit: 59fd80c
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-199021-59fd80c5a595

History

@kpatticha kpatticha merged commit f77a805 into elastic:main Nov 11, 2024
27 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

You might need to backport the following PRs to 8.x:
- [Discover] Make use of stateContainer action onDataViewEdited (#199588)
- [TSVB] Remove metrics:allowCheckingForFailedShards Advanced Setting (#197227)
- [Security Solution] Rule Updates in bulk with conflicts (#196776)
- [Search Playground] Change route on selector changed in between search/chat modes (#197431)
- [OpenAPI][Fleet] Add missing operation summaries (#199548)
- Update serverless link targets (#199396)

Manual backport

To create the backport manually run:

node scripts/backport --pr 199021

Questions ?

Please refer to the Backport tool documentation

@kpatticha
Copy link
Contributor Author

💚 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

kpatticha added a commit to kpatticha/kibana that referenced this pull request Nov 11, 2024
…tic#199021)

closes elastic#198980

In addition to migrating the mobile api tests, the PR includes

- Fixing mapping issue with `error.grouping_name` which causing to drop
documents
- Fix and unskip mobile tests

### 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"

```

TODO
- [x]   flaky runner
- [x] locally pass
-  [x] mki run

---------

Co-authored-by: Carlos Crespo <carloshenrique.leonelcrespo@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit f77a805)
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Nov 12, 2024
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

tkajtoch pushed a commit to tkajtoch/kibana that referenced this pull request Nov 12, 2024
…tic#199021)

closes elastic#198980

In addition to migrating the mobile api tests, the PR includes

- Fixing mapping issue with `error.grouping_name` which causing to drop
documents
- Fix and unskip mobile tests

### 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"

```

TODO 
- [x]   flaky runner 
- [x] locally pass
-  [x] mki run

---------

Co-authored-by: Carlos Crespo <carloshenrique.leonelcrespo@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

1 similar comment
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

kpatticha added a commit that referenced this pull request Nov 18, 2024
…#199021) (#199689)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[APM] Migrate `/mobile` API tests to deployment agnostic folder
(#199021)](#199021)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT
[{"author":{"name":"Katerina","email":"aikaterini.patticha@elastic.co"},"sourceCommit":{"committedDate":"2024-11-11T13:49:54Z","message":"[APM]
Migrate `/mobile` API tests to deployment agnostic folder
(#199021)\n\ncloses
https://github.com/elastic/kibana/issues/198980\r\n\r\nIn addition to
migrating the mobile api tests, the PR includes\r\n\r\n- Fixing mapping
issue with `error.grouping_name` which causing to drop\r\ndocuments\r\n-
Fix and unskip mobile tests\r\n\r\n### How to test\r\n\r\n-
Serverless\r\n\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\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\n-
Stateful\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\n```\r\n\r\nTODO \r\n- [x] flaky runner \r\n- [x]
locally pass\r\n- [x] mki run\r\n\r\n---------\r\n\r\nCo-authored-by:
Carlos Crespo
<carloshenrique.leonelcrespo@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"f77a8052f7a3e39cb3b61d1b61dbef8b6c254525","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"],"number":199021,"url":"https://github.com/elastic/kibana/pull/199021","mergeCommit":{"message":"[APM]
Migrate `/mobile` API tests to deployment agnostic folder
(#199021)\n\ncloses
https://github.com/elastic/kibana/issues/198980\r\n\r\nIn addition to
migrating the mobile api tests, the PR includes\r\n\r\n- Fixing mapping
issue with `error.grouping_name` which causing to drop\r\ndocuments\r\n-
Fix and unskip mobile tests\r\n\r\n### How to test\r\n\r\n-
Serverless\r\n\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\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\n-
Stateful\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\n```\r\n\r\nTODO \r\n- [x] flaky runner \r\n- [x]
locally pass\r\n- [x] mki run\r\n\r\n---------\r\n\r\nCo-authored-by:
Carlos Crespo
<carloshenrique.leonelcrespo@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"f77a8052f7a3e39cb3b61d1b61dbef8b6c254525"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199021","number":199021,"mergeCommit":{"message":"[APM]
Migrate `/mobile` API tests to deployment agnostic folder
(#199021)\n\ncloses
https://github.com/elastic/kibana/issues/198980\r\n\r\nIn addition to
migrating the mobile api tests, the PR includes\r\n\r\n- Fixing mapping
issue with `error.grouping_name` which causing to drop\r\ndocuments\r\n-
Fix and unskip mobile tests\r\n\r\n### How to test\r\n\r\n-
Serverless\r\n\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\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\n-
Stateful\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\n```\r\n\r\nTODO \r\n- [x] flaky runner \r\n- [x]
locally pass\r\n- [x] mki run\r\n\r\n---------\r\n\r\nCo-authored-by:
Carlos Crespo
<carloshenrique.leonelcrespo@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"f77a8052f7a3e39cb3b61d1b61dbef8b6c254525"}}]}]
BACKPORT-->
@kibanamachine kibanamachine added v8.17.0 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Nov 18, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
…tic#199021)

closes elastic#198980

In addition to migrating the mobile api tests, the PR includes

- Fixing mapping issue with `error.grouping_name` which causing to drop
documents
- Fix and unskip mobile tests

### 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"

```

TODO 
- [x]   flaky runner 
- [x] locally pass
-  [x] mki run

---------

Co-authored-by: Carlos Crespo <carloshenrique.leonelcrespo@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@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/mobile to be deployment-agnostic API tests
6 participants