Skip to content

[8.x] [Response Ops][Flapping] Rule Specific Flapping - Create/Update API changes (#190019)#195526

Merged
kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-190019
Oct 9, 2024
Merged

[8.x] [Response Ops][Flapping] Rule Specific Flapping - Create/Update API changes (#190019)#195526
kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-190019

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…hanges (elastic#190019)

## Summary
Issue: elastic#190018

Implement rule specific flapping support for create and update Rule API.
The new property on the rule is named `flapping`;

```
flapping: {
  look_back_window: number;
  status_change_threshold: number;
}
```

Also make changes in the task runner to use the rule's flapping settings
if it exists. Otherwise use the global flapping setting.

# To test
1. Go to
`x-pack/plugins/triggers_actions_ui/public/common/constants/index.ts`
and turn `IS_RULE_SPECIFIC_FLAPPING_ENABLED` to `true`
2. Create a rule with a rule specific flapping setting, generate the
alert and let it flap
3. Assert that the flapping is now using the rule specific flapping
4. Turn space flapping off
5. Assert that it no longer flaps despite having a rule specific
flapping
6. Try deleting/adding back the rule specific flapping via the UI and
verify everything works.

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit edd61f6)
@kibanamachine kibanamachine merged commit 8f9f106 into elastic:8.x Oct 9, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
alerting 236 235 -1
cases 812 811 -1
observability 1061 1060 -1
securitySolution 5927 5926 -1
triggersActionsUi 798 799 +1
total -3

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/alerting-types 219 218 -1
@kbn/alerts-ui-shared 302 305 +3
alerting 843 841 -2
total -0

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
triggersActionsUi 1.6MB 1.6MB -59.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
alerting 25.6KB 25.2KB -394.0B
triggersActionsUi 123.3KB 123.3KB -17.0B
total -411.0B
Unknown metric groups

API count

id before after diff
@kbn/alerting-types 222 221 -1
@kbn/alerts-ui-shared 318 321 +3
alerting 875 873 -2
total -0

References to deprecated APIs

id before after diff
@kbn/alerting-types 24 26 +2

cc @JiaweiWu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants