-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 apm alerts tests to deployment agnostic #199097
[APM] Migrate apm alerts tests to deployment agnostic #199097
Conversation
cb201c6
to
f75d220
Compare
Migrate agent_explorer test Update latest_agent_versions test
e6fb4a4
to
53a9373
Compare
/ci |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7348[✅] x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts: 25/25 tests passed. |
53a9373
to
1ef84ef
Compare
/ci |
1ef84ef
to
1f8c541
Compare
/ci |
1f8c541
to
670ee82
Compare
/ci |
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
👀 |
@elasticmachine merge upstream |
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.
Also, I would love to humbly request any codeowner updates for files added in this PR.
There is an on-going effort to have zero test files without an owner, in order to soon have much more granular reporting for teams.
..._integration/deployment_agnostic/apis/observability/apm/alerts/error_count_threshold.spec.ts
Outdated
Show resolved
Hide resolved
x-pack/test/api_integration/deployment_agnostic/services/alerting_api.ts
Show resolved
Hide resolved
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
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.
Looking better Carlos.
Just a few more mentions of supertest.
Again, in order to better protect our releases and for other teams to assist in test failure debugging, the ability to quickly distinguish which privileges are in play is crucial.
..._integration/deployment_agnostic/apis/observability/apm/alerts/error_count_threshold.spec.ts
Show resolved
Hide resolved
...i_integration/deployment_agnostic/apis/observability/apm/alerts/transaction_duration.spec.ts
Outdated
Show resolved
Hide resolved
...integration/deployment_agnostic/apis/observability/apm/alerts/transaction_error_rate.spec.ts
Outdated
Show resolved
Hide resolved
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
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.
We're almost there.
..._integration/deployment_agnostic/apis/observability/apm/alerts/error_count_threshold.spec.ts
Show resolved
Hide resolved
before(() => { | ||
describe('transaction duration alert', () => { | ||
let apmSynthtraceEsClient: ApmSynthtraceEsClient; | ||
let supertestViewerWithCookieCredentials: SupertestWithRoleScopeType; |
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.
💟
💚 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.
CR only, LGTM
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11795906207 |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
## Summary Closes [elastic#198959](elastic#198959) Part of elastic#193245 This PR contains the changes to migrate `alerts` test folder to Deployment-agnostic testing strategy. It also fixes a bug when filtering alerts by `kibana.alert.rule.producer`. On serverless ,the producer is `observability`, not `apm` ### 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) - This PR won't pass on MKI while the instance is not created using the `kibana.alert.rule.producer` fix from this PR - 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" ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit fb666aa) # Conflicts: # .github/CODEOWNERS # x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/index.ts
## Summary Closes [elastic#198959](elastic#198959) Part of elastic#193245 This PR contains the changes to migrate `alerts` test folder to Deployment-agnostic testing strategy. It also fixes a bug when filtering alerts by `kibana.alert.rule.producer`. On serverless ,the producer is `observability`, not `apm` ### 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) - This PR won't pass on MKI while the instance is not created using the `kibana.alert.rule.producer` fix from this PR - 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" ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…#199781) # Backport This will backport the following commits from `main` to `8.x`: - [[APM] Migrate apm alerts tests to deployment agnostic (#199097)](#199097) <!--- Backport version: 8.9.8 --> ### 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-12T11:01:23Z","message":"[APM] Migrate apm alerts tests to deployment agnostic (#199097)\n\n## Summary\r\n\r\nCloses [#198959](https://github.com/elastic/kibana/issues/198959)\r\nPart of https://github.com/elastic/kibana/issues/193245\r\n\r\nThis PR contains the changes to migrate `alerts` test folder to\r\nDeployment-agnostic testing strategy.\r\nIt also fixes a bug when filtering alerts by\r\n`kibana.alert.rule.producer`. On serverless ,the producer is\r\n`observability`, not `apm`\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- This PR won't pass on MKI while the instance is not created using the\r\n`kibana.alert.rule.producer` fix from this PR\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\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"fb666aa7653ba2cdc56816ac575475e5bb58e1b4","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":199097,"url":"https://github.com/elastic/kibana/pull/199097","mergeCommit":{"message":"[APM] Migrate apm alerts tests to deployment agnostic (#199097)\n\n## Summary\r\n\r\nCloses [#198959](https://github.com/elastic/kibana/issues/198959)\r\nPart of https://github.com/elastic/kibana/issues/193245\r\n\r\nThis PR contains the changes to migrate `alerts` test folder to\r\nDeployment-agnostic testing strategy.\r\nIt also fixes a bug when filtering alerts by\r\n`kibana.alert.rule.producer`. On serverless ,the producer is\r\n`observability`, not `apm`\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- This PR won't pass on MKI while the instance is not created using the\r\n`kibana.alert.rule.producer` fix from this PR\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\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"fb666aa7653ba2cdc56816ac575475e5bb58e1b4"}},"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/199097","number":199097,"mergeCommit":{"message":"[APM] Migrate apm alerts tests to deployment agnostic (#199097)\n\n## Summary\r\n\r\nCloses [#198959](https://github.com/elastic/kibana/issues/198959)\r\nPart of https://github.com/elastic/kibana/issues/193245\r\n\r\nThis PR contains the changes to migrate `alerts` test folder to\r\nDeployment-agnostic testing strategy.\r\nIt also fixes a bug when filtering alerts by\r\n`kibana.alert.rule.producer`. On serverless ,the producer is\r\n`observability`, not `apm`\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- This PR won't pass on MKI while the instance is not created using the\r\n`kibana.alert.rule.producer` fix from this PR\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\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"fb666aa7653ba2cdc56816ac575475e5bb58e1b4"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary Closes [elastic#198959](elastic#198959) Part of elastic#193245 This PR contains the changes to migrate `alerts` test folder to Deployment-agnostic testing strategy. It also fixes a bug when filtering alerts by `kibana.alert.rule.producer`. On serverless ,the producer is `observability`, not `apm` ### 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) - This PR won't pass on MKI while the instance is not created using the `kibana.alert.rule.producer` fix from this PR - 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" ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary Closes [elastic#198959](elastic#198959) Part of elastic#193245 This PR contains the changes to migrate `alerts` test folder to Deployment-agnostic testing strategy. It also fixes a bug when filtering alerts by `kibana.alert.rule.producer`. On serverless ,the producer is `observability`, not `apm` ### 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) - This PR won't pass on MKI while the instance is not created using the `kibana.alert.rule.producer` fix from this PR - 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" ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Closes #198959
Part of #193245
This PR contains the changes to migrate
alerts
test folder to Deployment-agnostic testing strategy.It also fixes a bug when filtering alerts by
kibana.alert.rule.producer
. On serverless ,the producer isobservability
, notapm
How to test
It's recommended to be run against MKI - This PR won't pass on MKI while the instance is not created using the
kibana.alert.rule.producer
fix from this PR