-
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
[Security Solution] Unskip perform bulk action ESS FTR tests #197660
Conversation
51d3ab2
to
8d2800d
Compare
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7259[✅] x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_bulk_actions/trial_license_complete_tier/configs/ess.config.ts: 100/100 tests passed. |
2ee6a9b
to
e4a79fb
Compare
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7272[✅] x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_bulk_actions/trial_license_complete_tier/configs/ess.config.ts: 100/100 tests passed. |
e4a79fb
to
ce46713
Compare
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7273[✅] x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_bulk_actions/trial_license_complete_tier/configs/ess.config.ts: 100/100 tests passed. |
ce46713
to
6dfbf78
Compare
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7274[✅] x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_bulk_actions/trial_license_complete_tier/configs/ess.config.ts: 100/100 tests passed. |
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management) |
@maximpn Could you expand on the details of the race condition? If the rule SO doesn't get updated properly in the test environment, is there a chance that this could also happen in production? |
@xcrzx I observed quite stable flakiness with the following scenario where a test does the following
ER: Rule's legacy notification action gets migrated. For example Creation of only disabled rules fixed the flakiness. It looks like the task manager tries to run the rule the same time a bulk operation is performed. I was about to create a ticket for DE team but after rebasing on the latest commit in main I don't observe such flakiness anymore. I checked the legacy notification actions migration code together with bulk actions rules client code on potential issues like |
So the flakiness resolved itself without any changes to the tests? In that case, do we still need the refactoring introduced in this PR? |
@xcrzx indeed it's just enough unskip the test since the problem seems to be fixed on itself. Though refactoring improves error messages. It should simplify understanding on what part failed if the test suddenly fails. For example there are two error messages below where the first one before the refactoring and the second is before:
after:
|
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 the additional info. I looked through the changes and the refactoring looks good 👍
Starting backport for target branches: 8.15, 8.16, 8.x https://github.com/elastic/kibana/actions/runs/11682191876 |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @maximpn |
…#197660) **Closes: elastic#196470 **Closes: elastic#196462 ## Summary This PR unskips `perform_bulk_action_ess.ts` functional test. ## Details `perform_bulk_action_ess.ts` includes a number of functional tests where some of them were flaky. Investigation revealed that creating enabled rules and performing bulk actions may lead to race conditions. Under that conditions rule's SO isn't updated as expected. For example legacy rule actions aren't persisted in rule's SO when it's expected by the test. This PR includes `perform_bulk_action_ess.ts` refactoring to create disabled rules in the majority of tests. Enabled rules are created only in tests checking behavior upon rules disabling. These tests were checked multiple times and didn't demonstrate flakiness. Additionally `@kbn/expect` was replaced with `expect` to make asserting more transparent and avoid unclear error messages. ## Flaky test results [100 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7274) 🟢 (cherry picked from commit bf37a01)
…#197660) **Closes: elastic#196470 **Closes: elastic#196462 ## Summary This PR unskips `perform_bulk_action_ess.ts` functional test. ## Details `perform_bulk_action_ess.ts` includes a number of functional tests where some of them were flaky. Investigation revealed that creating enabled rules and performing bulk actions may lead to race conditions. Under that conditions rule's SO isn't updated as expected. For example legacy rule actions aren't persisted in rule's SO when it's expected by the test. This PR includes `perform_bulk_action_ess.ts` refactoring to create disabled rules in the majority of tests. Enabled rules are created only in tests checking behavior upon rules disabling. These tests were checked multiple times and didn't demonstrate flakiness. Additionally `@kbn/expect` was replaced with `expect` to make asserting more transparent and avoid unclear error messages. ## Flaky test results [100 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7274) 🟢 (cherry picked from commit bf37a01)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
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.
Ok
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.
…197660) (#198908) # Backport This will backport the following commits from `main` to `8.16`: - [[Security Solution] Unskip perform bulk action ESS FTR tests (#197660)](#197660) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maxim Palenov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-05T10:24:37Z","message":"[Security Solution] Unskip perform bulk action ESS FTR tests (#197660)\n\n**Closes: https://github.com/elastic/kibana/issues/196470**\r\n**Closes: https://github.com/elastic/kibana/issues/196462**\r\n\r\n## Summary\r\n\r\nThis PR unskips `perform_bulk_action_ess.ts` functional test.\r\n\r\n## Details\r\n\r\n`perform_bulk_action_ess.ts` includes a number of functional tests where some of them were flaky. Investigation revealed that creating enabled rules and performing bulk actions may lead to race conditions. Under that conditions rule's SO isn't updated as expected. For example legacy rule actions aren't persisted in rule's SO when it's expected by the test.\r\n\r\nThis PR includes `perform_bulk_action_ess.ts` refactoring to create disabled rules in the majority of tests. Enabled rules are created only in tests checking behavior upon rules disabling. These tests were checked multiple times and didn't demonstrate flakiness.\r\n\r\nAdditionally `@kbn/expect` was replaced with `expect` to make asserting more transparent and avoid unclear error messages. \r\n\r\n## Flaky test results\r\n\r\n[100 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7274) 🟢","sha":"bf37a019d857e89d6dad3a6cf450ec323f0783e0","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","failed-test","release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","backport:prev-major"],"title":"[Security Solution] Unskip perform bulk action ESS FTR tests","number":197660,"url":"https://github.com/elastic/kibana/pull/197660","mergeCommit":{"message":"[Security Solution] Unskip perform bulk action ESS FTR tests (#197660)\n\n**Closes: https://github.com/elastic/kibana/issues/196470**\r\n**Closes: https://github.com/elastic/kibana/issues/196462**\r\n\r\n## Summary\r\n\r\nThis PR unskips `perform_bulk_action_ess.ts` functional test.\r\n\r\n## Details\r\n\r\n`perform_bulk_action_ess.ts` includes a number of functional tests where some of them were flaky. Investigation revealed that creating enabled rules and performing bulk actions may lead to race conditions. Under that conditions rule's SO isn't updated as expected. For example legacy rule actions aren't persisted in rule's SO when it's expected by the test.\r\n\r\nThis PR includes `perform_bulk_action_ess.ts` refactoring to create disabled rules in the majority of tests. Enabled rules are created only in tests checking behavior upon rules disabling. These tests were checked multiple times and didn't demonstrate flakiness.\r\n\r\nAdditionally `@kbn/expect` was replaced with `expect` to make asserting more transparent and avoid unclear error messages. \r\n\r\n## Flaky test results\r\n\r\n[100 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7274) 🟢","sha":"bf37a019d857e89d6dad3a6cf450ec323f0783e0"}},"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/197660","number":197660,"mergeCommit":{"message":"[Security Solution] Unskip perform bulk action ESS FTR tests (#197660)\n\n**Closes: https://github.com/elastic/kibana/issues/196470**\r\n**Closes: https://github.com/elastic/kibana/issues/196462**\r\n\r\n## Summary\r\n\r\nThis PR unskips `perform_bulk_action_ess.ts` functional test.\r\n\r\n## Details\r\n\r\n`perform_bulk_action_ess.ts` includes a number of functional tests where some of them were flaky. Investigation revealed that creating enabled rules and performing bulk actions may lead to race conditions. Under that conditions rule's SO isn't updated as expected. For example legacy rule actions aren't persisted in rule's SO when it's expected by the test.\r\n\r\nThis PR includes `perform_bulk_action_ess.ts` refactoring to create disabled rules in the majority of tests. Enabled rules are created only in tests checking behavior upon rules disabling. These tests were checked multiple times and didn't demonstrate flakiness.\r\n\r\nAdditionally `@kbn/expect` was replaced with `expect` to make asserting more transparent and avoid unclear error messages. \r\n\r\n## Flaky test results\r\n\r\n[100 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7274) 🟢","sha":"bf37a019d857e89d6dad3a6cf450ec323f0783e0"}}]}] BACKPORT--> Co-authored-by: Maxim Palenov <[email protected]>
…197660) (#198909) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Unskip perform bulk action ESS FTR tests (#197660)](#197660) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maxim Palenov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-05T10:24:37Z","message":"[Security Solution] Unskip perform bulk action ESS FTR tests (#197660)\n\n**Closes: https://github.com/elastic/kibana/issues/196470**\r\n**Closes: https://github.com/elastic/kibana/issues/196462**\r\n\r\n## Summary\r\n\r\nThis PR unskips `perform_bulk_action_ess.ts` functional test.\r\n\r\n## Details\r\n\r\n`perform_bulk_action_ess.ts` includes a number of functional tests where some of them were flaky. Investigation revealed that creating enabled rules and performing bulk actions may lead to race conditions. Under that conditions rule's SO isn't updated as expected. For example legacy rule actions aren't persisted in rule's SO when it's expected by the test.\r\n\r\nThis PR includes `perform_bulk_action_ess.ts` refactoring to create disabled rules in the majority of tests. Enabled rules are created only in tests checking behavior upon rules disabling. These tests were checked multiple times and didn't demonstrate flakiness.\r\n\r\nAdditionally `@kbn/expect` was replaced with `expect` to make asserting more transparent and avoid unclear error messages. \r\n\r\n## Flaky test results\r\n\r\n[100 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7274) 🟢","sha":"bf37a019d857e89d6dad3a6cf450ec323f0783e0","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","failed-test","release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","backport:prev-major"],"title":"[Security Solution] Unskip perform bulk action ESS FTR tests","number":197660,"url":"https://github.com/elastic/kibana/pull/197660","mergeCommit":{"message":"[Security Solution] Unskip perform bulk action ESS FTR tests (#197660)\n\n**Closes: https://github.com/elastic/kibana/issues/196470**\r\n**Closes: https://github.com/elastic/kibana/issues/196462**\r\n\r\n## Summary\r\n\r\nThis PR unskips `perform_bulk_action_ess.ts` functional test.\r\n\r\n## Details\r\n\r\n`perform_bulk_action_ess.ts` includes a number of functional tests where some of them were flaky. Investigation revealed that creating enabled rules and performing bulk actions may lead to race conditions. Under that conditions rule's SO isn't updated as expected. For example legacy rule actions aren't persisted in rule's SO when it's expected by the test.\r\n\r\nThis PR includes `perform_bulk_action_ess.ts` refactoring to create disabled rules in the majority of tests. Enabled rules are created only in tests checking behavior upon rules disabling. These tests were checked multiple times and didn't demonstrate flakiness.\r\n\r\nAdditionally `@kbn/expect` was replaced with `expect` to make asserting more transparent and avoid unclear error messages. \r\n\r\n## Flaky test results\r\n\r\n[100 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7274) 🟢","sha":"bf37a019d857e89d6dad3a6cf450ec323f0783e0"}},"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/197660","number":197660,"mergeCommit":{"message":"[Security Solution] Unskip perform bulk action ESS FTR tests (#197660)\n\n**Closes: https://github.com/elastic/kibana/issues/196470**\r\n**Closes: https://github.com/elastic/kibana/issues/196462**\r\n\r\n## Summary\r\n\r\nThis PR unskips `perform_bulk_action_ess.ts` functional test.\r\n\r\n## Details\r\n\r\n`perform_bulk_action_ess.ts` includes a number of functional tests where some of them were flaky. Investigation revealed that creating enabled rules and performing bulk actions may lead to race conditions. Under that conditions rule's SO isn't updated as expected. For example legacy rule actions aren't persisted in rule's SO when it's expected by the test.\r\n\r\nThis PR includes `perform_bulk_action_ess.ts` refactoring to create disabled rules in the majority of tests. Enabled rules are created only in tests checking behavior upon rules disabling. These tests were checked multiple times and didn't demonstrate flakiness.\r\n\r\nAdditionally `@kbn/expect` was replaced with `expect` to make asserting more transparent and avoid unclear error messages. \r\n\r\n## Flaky test results\r\n\r\n[100 runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7274) 🟢","sha":"bf37a019d857e89d6dad3a6cf450ec323f0783e0"}}]}] BACKPORT--> Co-authored-by: Maxim Palenov <[email protected]>
Closes: #196470
Closes: #196462
Summary
This PR unskips
perform_bulk_action_ess.ts
functional test.Details
perform_bulk_action_ess.ts
includes a number of functional tests where some of them were flaky. Investigation revealed that creating enabled rules and performing bulk actions may lead to race conditions. Under that conditions rule's SO isn't updated as expected. For example legacy rule actions aren't persisted in rule's SO when it's expected by the test.This PR includes
perform_bulk_action_ess.ts
refactoring to create disabled rules in the majority of tests. Enabled rules are created only in tests checking behavior upon rules disabling. These tests were checked multiple times and didn't demonstrate flakiness.Additionally
@kbn/expect
was replaced withexpect
to make asserting more transparent and avoid unclear error messages.Flaky test results
100 runs 🟢