Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Response Ops][Flapping] Rule Specific Flapping - Create/Update…
… API changes (elastic#190019) (elastic#195526) # Backport This will backport the following commits from `main` to `8.x`: - [[Response Ops][Flapping] Rule Specific Flapping - Create/Update API changes (elastic#190019)](elastic#190019) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jiawei Wu","email":"74562234+JiaweiWu@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-09T01:01:45Z","message":"[Response Ops][Flapping] Rule Specific Flapping - Create/Update API changes (elastic#190019)\n\n## Summary\r\nIssue: https://github.com/elastic/kibana/issues/190018\r\n\r\nImplement rule specific flapping support for create and update Rule API.\r\nThe new property on the rule is named `flapping`;\r\n\r\n```\r\nflapping: {\r\n look_back_window: number;\r\n status_change_threshold: number;\r\n}\r\n```\r\n\r\nAlso make changes in the task runner to use the rule's flapping settings\r\nif it exists. Otherwise use the global flapping setting.\r\n\r\n# To test\r\n1. Go to\r\n`x-pack/plugins/triggers_actions_ui/public/common/constants/index.ts`\r\nand turn `IS_RULE_SPECIFIC_FLAPPING_ENABLED` to `true`\r\n2. Create a rule with a rule specific flapping setting, generate the\r\nalert and let it flap\r\n3. Assert that the flapping is now using the rule specific flapping\r\n4. Turn space flapping off\r\n5. Assert that it no longer flaps despite having a rule specific\r\nflapping\r\n6. Try deleting/adding back the rule specific flapping via the UI and\r\nverify everything works.\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\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":"edd61f63dbad99fe8da1e503c81db774fcb37e8f","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor","v8.16.0"],"title":"[Response Ops][Flapping] Rule Specific Flapping - Create/Update API changes","number":190019,"url":"https://github.com/elastic/kibana/pull/190019","mergeCommit":{"message":"[Response Ops][Flapping] Rule Specific Flapping - Create/Update API changes (elastic#190019)\n\n## Summary\r\nIssue: https://github.com/elastic/kibana/issues/190018\r\n\r\nImplement rule specific flapping support for create and update Rule API.\r\nThe new property on the rule is named `flapping`;\r\n\r\n```\r\nflapping: {\r\n look_back_window: number;\r\n status_change_threshold: number;\r\n}\r\n```\r\n\r\nAlso make changes in the task runner to use the rule's flapping settings\r\nif it exists. Otherwise use the global flapping setting.\r\n\r\n# To test\r\n1. Go to\r\n`x-pack/plugins/triggers_actions_ui/public/common/constants/index.ts`\r\nand turn `IS_RULE_SPECIFIC_FLAPPING_ENABLED` to `true`\r\n2. Create a rule with a rule specific flapping setting, generate the\r\nalert and let it flap\r\n3. Assert that the flapping is now using the rule specific flapping\r\n4. Turn space flapping off\r\n5. Assert that it no longer flaps despite having a rule specific\r\nflapping\r\n6. Try deleting/adding back the rule specific flapping via the UI and\r\nverify everything works.\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\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":"edd61f63dbad99fe8da1e503c81db774fcb37e8f"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/190019","number":190019,"mergeCommit":{"message":"[Response Ops][Flapping] Rule Specific Flapping - Create/Update API changes (elastic#190019)\n\n## Summary\r\nIssue: https://github.com/elastic/kibana/issues/190018\r\n\r\nImplement rule specific flapping support for create and update Rule API.\r\nThe new property on the rule is named `flapping`;\r\n\r\n```\r\nflapping: {\r\n look_back_window: number;\r\n status_change_threshold: number;\r\n}\r\n```\r\n\r\nAlso make changes in the task runner to use the rule's flapping settings\r\nif it exists. Otherwise use the global flapping setting.\r\n\r\n# To test\r\n1. Go to\r\n`x-pack/plugins/triggers_actions_ui/public/common/constants/index.ts`\r\nand turn `IS_RULE_SPECIFIC_FLAPPING_ENABLED` to `true`\r\n2. Create a rule with a rule specific flapping setting, generate the\r\nalert and let it flap\r\n3. Assert that the flapping is now using the rule specific flapping\r\n4. Turn space flapping off\r\n5. Assert that it no longer flaps despite having a rule specific\r\nflapping\r\n6. Try deleting/adding back the rule specific flapping via the UI and\r\nverify everything works.\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\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":"edd61f63dbad99fe8da1e503c81db774fcb37e8f"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jiawei Wu <74562234+JiaweiWu@users.noreply.github.com>
- Loading branch information