[APM] Migrate time_range_metadata test to deployment agnostic#200146
Conversation
|
/ci |
|
@elasticmachine merge upstream |
|
/ci |
|
@elasticmachine merge upstream |
|
/ci |
|
@elasticmachine merge upstream |
|
merge conflict between base and head |
|
@elasticmachine merge upstream |
|
merge conflict between base and head |
…time_range_metadata-test
|
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
...n/deployment_agnostic/apis/observability/apm/time_range_metadata/time_range_metadata.spec.ts
Outdated
Show resolved
Hide resolved
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
dmlemeshko
left a comment
There was a problem hiding this comment.
Good work! I left a comment about 2 es service calls in it blocks
| const res = await es.search({ | ||
| index: 'metrics-apm*', | ||
| body: { | ||
| query: { | ||
| bool: { | ||
| filter: [ | ||
| { exists: { field: TRANSACTION_DURATION_HISTOGRAM } }, | ||
| { exists: { field: TRANSACTION_DURATION_SUMMARY } }, | ||
| ], | ||
| }, | ||
| }, | ||
| }, | ||
| }); |
There was a problem hiding this comment.
FYI: currently we init ES client with operator user as we use it to cleanup MKI projects. There is no way to change authentication for es service, so if your test target validation from end-user perspective you need to make a change and probably use a new ES client instance with API key authentication (I didn't see it in tests before, but I assume it should work)
There was a problem hiding this comment.
Thanks for sharing that. This validation here is just ensuring es has ingested the necessary data to proceed with the tests
| const res = await es.search({ | ||
| index: 'metrics-apm*', | ||
| body: { | ||
| query: { | ||
| bool: { | ||
| filter: [{ exists: { field: TRANSACTION_DURATION_HISTOGRAM } }], | ||
| must_not: [{ exists: { field: TRANSACTION_DURATION_SUMMARY } }], | ||
| }, | ||
| }, | ||
| }, | ||
| }); |
There was a problem hiding this comment.
same here: if it is part of env setup and not the actual APM functionality test I suggest moving both calls to before hook so it is clearly not a "testing" call
💚 Build Succeeded
Metrics [docs]
History
|
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11897783964 |
…c#200146) ## Summary Closes [elastic#198994](elastic#198994) Part of elastic#193245 This PR contains the changes to migrate `time_range_metadata` 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" ``` - [ ] ~(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 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 9d314b9)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…c#200146) ## Summary Closes [elastic#198994](elastic#198994) Part of elastic#193245 This PR contains the changes to migrate `time_range_metadata` 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" ``` - [ ] ~(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 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…200146) (#200624) # Backport This will backport the following commits from `main` to `8.x`: - [[APM] Migrate time_range_metadata test to deployment agnostic (#200146)](#200146) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Carlos Crespo","email":"crespocarlos@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-11-18T17:28:49Z","message":"[APM] Migrate time_range_metadata test to deployment agnostic (#200146)\n\n## Summary\r\n\r\nCloses [#198994](https://github.com/elastic/kibana/issues/198994)\r\nPart of https://github.com/elastic/kibana/issues/193245\r\n\r\nThis PR contains the changes to migrate `time_range_metadata` test\r\nfolder to Deployment-agnostic testing strategy.\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- [ ] ~(OPTIONAL, only if a test has been unskipped) Run flaky test\r\nsuite~\r\n- [x] local run for serverless\r\n- [x] local run for stateful\r\n- [x] MKI run for serverless\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"9d314b9fbb6dc850da7341949765243cd0bf742c","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":"[APM] Migrate time_range_metadata test to deployment agnostic","number":200146,"url":"https://github.com/elastic/kibana/pull/200146","mergeCommit":{"message":"[APM] Migrate time_range_metadata test to deployment agnostic (#200146)\n\n## Summary\r\n\r\nCloses [#198994](https://github.com/elastic/kibana/issues/198994)\r\nPart of https://github.com/elastic/kibana/issues/193245\r\n\r\nThis PR contains the changes to migrate `time_range_metadata` test\r\nfolder to Deployment-agnostic testing strategy.\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- [ ] ~(OPTIONAL, only if a test has been unskipped) Run flaky test\r\nsuite~\r\n- [x] local run for serverless\r\n- [x] local run for stateful\r\n- [x] MKI run for serverless\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"9d314b9fbb6dc850da7341949765243cd0bf742c"}},"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/200146","number":200146,"mergeCommit":{"message":"[APM] Migrate time_range_metadata test to deployment agnostic (#200146)\n\n## Summary\r\n\r\nCloses [#198994](https://github.com/elastic/kibana/issues/198994)\r\nPart of https://github.com/elastic/kibana/issues/193245\r\n\r\nThis PR contains the changes to migrate `time_range_metadata` test\r\nfolder to Deployment-agnostic testing strategy.\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- [ ] ~(OPTIONAL, only if a test has been unskipped) Run flaky test\r\nsuite~\r\n- [x] local run for serverless\r\n- [x] local run for stateful\r\n- [x] MKI run for serverless\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"9d314b9fbb6dc850da7341949765243cd0bf742c"}}]}] BACKPORT--> Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com>
…c#200146) ## Summary Closes [elastic#198994](elastic#198994) Part of elastic#193245 This PR contains the changes to migrate `time_range_metadata` 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" ``` - [ ] ~(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 --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Summary
Closes #198994
Part of #193245
This PR contains the changes to migrate
time_range_metadatatest folder to Deployment-agnostic testing strategy.How to test
It's recommended to be run against MKI
(OPTIONAL, only if a test has been unskipped) Run flaky test suite