-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 time_range_metadata test to deployment agnostic #200146
[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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, a small nit
...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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
💚 Build Succeeded
Metrics [docs]
History
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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 <[email protected]> Co-authored-by: kibanamachine <[email protected]> (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 <[email protected]> Co-authored-by: kibanamachine <[email protected]>
…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":"[email protected]"},"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 <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","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 <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","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 <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"9d314b9fbb6dc850da7341949765243cd0bf742c"}}]}] BACKPORT--> Co-authored-by: Carlos Crespo <[email protected]>
…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 <[email protected]> Co-authored-by: kibanamachine <[email protected]>
Summary
Closes #198994
Part of #193245
This PR contains the changes to migrate
time_range_metadata
test 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