-
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
Migrate Custom threshold rule tests to deployment agnostic solution #183378
Labels
Team:obs-ux-management
Observability Management User Experience Team
Comments
mgiota
added
the
Team:obs-ux-management
Observability Management User Experience Team
label
May 14, 2024
Moved to backlog until the related Meta ticket is prioritized. |
I think we need to update these instructions so they are up to date with the latest on deployment agnostic testing before this issue is "Ready", but then we need to pull this in ASAP. |
Example PR: #187924 |
Merged
2 tasks
maryam-saeidi
added a commit
that referenced
this issue
Oct 24, 2024
…gnostic framework (#195902) Part of #183378 ## Summary This PR moves the first Custom threshold rule test to the deployment agnostic test. The rest will follow in a follow-up PR. ## How to run To run 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="Custom Threshold rule" ``` To run 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="Custom Threshold rule" ``` ### TODO - [x] #195890 - [x] Test in MKI before merging #### How to run tests on MKI According to this [discussion](elastic/observability-dev#3519 (comment)), we should test in MKI environment before merging. For details on how to run in MKI, see [this section of the document](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh) and [this readme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki).
maryam-saeidi
added a commit
to maryam-saeidi/kibana
that referenced
this issue
Oct 24, 2024
…gnostic framework (elastic#195902) Part of elastic#183378 ## Summary This PR moves the first Custom threshold rule test to the deployment agnostic test. The rest will follow in a follow-up PR. ## How to run To run 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="Custom Threshold rule" ``` To run 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="Custom Threshold rule" ``` ### TODO - [x] elastic#195890 - [x] Test in MKI before merging #### How to run tests on MKI According to this [discussion](elastic/observability-dev#3519 (comment)), we should test in MKI environment before merging. For details on how to run in MKI, see [this section of the document](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh) and [this readme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki). (cherry picked from commit 30f81ce) # Conflicts: # x-pack/test/api_integration/deployment_agnostic/apis/observability/alerting/index.ts
maryam-saeidi
added a commit
that referenced
this issue
Oct 25, 2024
…ment agnostic framework (#195902) (#197632) # Backport This will backport the following commits from `main` to `8.x`: - [Migrate Custom threshold > AVG - PCT - FIRED test to the deployment agnostic framework (#195902)](#195902) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maryam Saeidi","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-24T10:22:59Z","message":"Migrate Custom threshold > AVG - PCT - FIRED test to the deployment agnostic framework (#195902)\n\nPart of #183378\r\n\r\n## Summary\r\nThis PR moves the first Custom threshold rule test to the deployment\r\nagnostic test. The rest will follow in a follow-up PR.\r\n\r\n## How to run\r\n\r\nTo run serverless\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=\"Custom Threshold rule\"\r\n```\r\n\r\nTo run 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=\"Custom Threshold rule\"\r\n```\r\n\r\n### TODO\r\n\r\n- [x] https://github.com/elastic/kibana/pull/195890\r\n- [x] Test in MKI before merging\r\n\r\n\r\n#### How to run tests on MKI\r\n\r\nAccording to this\r\n[discussion](https://github.com/elastic/observability-dev/issues/3519#issuecomment-2379914274),\r\nwe should test in MKI environment before merging. For details on how to\r\nrun in MKI, see [this section of the\r\ndocument](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh)\r\nand [this\r\nreadme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki).","sha":"30f81ce4e932622e4d284b1e6af8c015c22836f5","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:build-serverless-image","Team:obs-ux-management"],"number":195902,"url":"https://github.com/elastic/kibana/pull/195902","mergeCommit":{"message":"Migrate Custom threshold > AVG - PCT - FIRED test to the deployment agnostic framework (#195902)\n\nPart of #183378\r\n\r\n## Summary\r\nThis PR moves the first Custom threshold rule test to the deployment\r\nagnostic test. The rest will follow in a follow-up PR.\r\n\r\n## How to run\r\n\r\nTo run serverless\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=\"Custom Threshold rule\"\r\n```\r\n\r\nTo run 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=\"Custom Threshold rule\"\r\n```\r\n\r\n### TODO\r\n\r\n- [x] https://github.com/elastic/kibana/pull/195890\r\n- [x] Test in MKI before merging\r\n\r\n\r\n#### How to run tests on MKI\r\n\r\nAccording to this\r\n[discussion](https://github.com/elastic/observability-dev/issues/3519#issuecomment-2379914274),\r\nwe should test in MKI environment before merging. For details on how to\r\nrun in MKI, see [this section of the\r\ndocument](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh)\r\nand [this\r\nreadme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki).","sha":"30f81ce4e932622e4d284b1e6af8c015c22836f5"}},"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/195902","number":195902,"mergeCommit":{"message":"Migrate Custom threshold > AVG - PCT - FIRED test to the deployment agnostic framework (#195902)\n\nPart of #183378\r\n\r\n## Summary\r\nThis PR moves the first Custom threshold rule test to the deployment\r\nagnostic test. The rest will follow in a follow-up PR.\r\n\r\n## How to run\r\n\r\nTo run serverless\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=\"Custom Threshold rule\"\r\n```\r\n\r\nTo run 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=\"Custom Threshold rule\"\r\n```\r\n\r\n### TODO\r\n\r\n- [x] https://github.com/elastic/kibana/pull/195890\r\n- [x] Test in MKI before merging\r\n\r\n\r\n#### How to run tests on MKI\r\n\r\nAccording to this\r\n[discussion](https://github.com/elastic/observability-dev/issues/3519#issuecomment-2379914274),\r\nwe should test in MKI environment before merging. For details on how to\r\nrun in MKI, see [this section of the\r\ndocument](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh)\r\nand [this\r\nreadme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki).","sha":"30f81ce4e932622e4d284b1e6af8c015c22836f5"}}]}] BACKPORT-->
1 task
maryam-saeidi
added a commit
to maryam-saeidi/kibana
that referenced
this issue
Nov 6, 2024
…framework (elastic#198691) Closes elastic#183378 Closes elastic#179095 ## Summary This PR moves the Custom threshold rule duplicated API integration tests to the deployment agnostic test. ## How to run To run 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="Custom Threshold rule" ``` To run 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="Custom Threshold rule" ``` ### TODO - [x] Test in MKI before merging #### How to run tests on MKI According to this [discussion](elastic/observability-dev#3519 (comment)), we should test in MKI environment before merging. For details on how to run in MKI, see [this section of the document](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh) and [this readme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki). --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit b585ca6) # Conflicts: # x-pack/test_serverless/api_integration/test_suites/observability/index.feature_flags.ts # x-pack/test_serverless/tsconfig.json
maryam-saeidi
added a commit
that referenced
this issue
Nov 6, 2024
…ostic framework (#198691) (#199118) # Backport This will backport the following commits from `main` to `8.x`: - [Migrate Custom threshold duplicated tests to the deployment agnostic framework (#198691)](#198691) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maryam Saeidi","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-06T12:03:21Z","message":"Migrate Custom threshold duplicated tests to the deployment agnostic framework (#198691)\n\nCloses #183378\r\nCloses #179095\r\n\r\n## Summary\r\nThis PR moves the Custom threshold rule duplicated API integration tests\r\nto the deployment agnostic test.\r\n\r\n## How to run\r\n\r\nTo run serverless\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=\"Custom Threshold rule\"\r\n```\r\n\r\nTo run 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=\"Custom Threshold rule\"\r\n```\r\n\r\n### TODO\r\n\r\n- [x] Test in MKI before merging\r\n\r\n\r\n#### How to run tests on MKI\r\n\r\nAccording to this\r\n[discussion](https://github.com/elastic/observability-dev/issues/3519#issuecomment-2379914274),\r\nwe should test in MKI environment before merging. For details on how to\r\nrun in MKI, see [this section of the\r\ndocument](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh)\r\nand [this\r\nreadme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki).\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"b585ca658aafeac2d83b5cd2b3a3c2c917c90d01","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"],"number":198691,"url":"https://github.com/elastic/kibana/pull/198691","mergeCommit":{"message":"Migrate Custom threshold duplicated tests to the deployment agnostic framework (#198691)\n\nCloses #183378\r\nCloses #179095\r\n\r\n## Summary\r\nThis PR moves the Custom threshold rule duplicated API integration tests\r\nto the deployment agnostic test.\r\n\r\n## How to run\r\n\r\nTo run serverless\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=\"Custom Threshold rule\"\r\n```\r\n\r\nTo run 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=\"Custom Threshold rule\"\r\n```\r\n\r\n### TODO\r\n\r\n- [x] Test in MKI before merging\r\n\r\n\r\n#### How to run tests on MKI\r\n\r\nAccording to this\r\n[discussion](https://github.com/elastic/observability-dev/issues/3519#issuecomment-2379914274),\r\nwe should test in MKI environment before merging. For details on how to\r\nrun in MKI, see [this section of the\r\ndocument](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh)\r\nand [this\r\nreadme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki).\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"b585ca658aafeac2d83b5cd2b3a3c2c917c90d01"}},"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/198691","number":198691,"mergeCommit":{"message":"Migrate Custom threshold duplicated tests to the deployment agnostic framework (#198691)\n\nCloses #183378\r\nCloses #179095\r\n\r\n## Summary\r\nThis PR moves the Custom threshold rule duplicated API integration tests\r\nto the deployment agnostic test.\r\n\r\n## How to run\r\n\r\nTo run serverless\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=\"Custom Threshold rule\"\r\n```\r\n\r\nTo run 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=\"Custom Threshold rule\"\r\n```\r\n\r\n### TODO\r\n\r\n- [x] Test in MKI before merging\r\n\r\n\r\n#### How to run tests on MKI\r\n\r\nAccording to this\r\n[discussion](https://github.com/elastic/observability-dev/issues/3519#issuecomment-2379914274),\r\nwe should test in MKI environment before merging. For details on how to\r\nrun in MKI, see [this section of the\r\ndocument](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh)\r\nand [this\r\nreadme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki).\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"b585ca658aafeac2d83b5cd2b3a3c2c917c90d01"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]>
mgadewoll
pushed a commit
to mgadewoll/kibana
that referenced
this issue
Nov 7, 2024
…framework (elastic#198691) Closes elastic#183378 Closes elastic#179095 ## Summary This PR moves the Custom threshold rule duplicated API integration tests to the deployment agnostic test. ## How to run To run 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="Custom Threshold rule" ``` To run 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="Custom Threshold rule" ``` ### TODO - [x] Test in MKI before merging #### How to run tests on MKI According to this [discussion](elastic/observability-dev#3519 (comment)), we should test in MKI environment before merging. For details on how to run in MKI, see [this section of the document](https://docs.google.com/document/d/1tiax7xoDYwFXYZjRTgVKkVMjN-SQzBWk4yn1JY6Z5UY/edit#heading=h.ece2z8p74izh) and [this readme](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki). --------- Co-authored-by: kibanamachine <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Part of #183263
🍒 Summary
As part of this #187924 we introduced a way to write deployment agnostic tests using the deployment agnostic framework from Appex QA team. We want to migrate the existing metric threshold rule tests to the new agnostic framework.
Existing tests
Serverless:
x-pack/test_serverless/api_integration/test_suites/observability/custom_threshold_rule
ESS:x-pack/test/alerting_api_integration/observability/custom_threshold_rule
New folder structure
How to migrate
In this PR
oblt.stateful.config.ts
andoblt.serverless.config.ts
were added, so no need to create any config file.Here's what you have to do:
x-pack/test/alerting_api_integration/observability/custom_threshold_rule
withinx-pack/test/api_integration/deployment_agnostic/apis/observability/alerting
folderloadTestFile(require.resolve('./custom_threshold...');
DeploymentAgnosticFtrProviderContext
supertestWithoutAuth
andsamlAuth
to generate an API key for user roles and make API callsexpected consumer
How to run
To run serverless
To run stateful
The text was updated successfully, but these errors were encountered: