-
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
[RAM][SECURITYSOLUTION][ALERTS] - Throw an error when user tries to set schedule interval shorter than any action frequency #156644
[RAM][SECURITYSOLUTION][ALERTS] - Throw an error when user tries to set schedule interval shorter than any action frequency #156644
Conversation
…any action frequency
Pinging @elastic/response-ops (Team:ResponseOps) |
|
||
if (actionsWithInvalidThrottles.length > 0) { | ||
throw Error( | ||
`Error updating rule: the interval is longer than the action frequencies: ${actionsWithInvalidThrottles |
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.
Can we just add the ruleId and/or the ruleName in the error?
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.
ah yeah, that would be more useful!
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @e40pud |
…et schedule interval shorter than any action frequency (elastic#156644) ## Summary These changes insure that alerting framework throws an exception when user tries to set rule's schedule interval shorter than one of the action frequencies. The message will look like: `"message": "Error updating rule: the interval is longer than the action frequencies: 1h"` TheUI changes will be addressed in the 8.9 in this ticket elastic#155502 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit e1ee019)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…s to set schedule interval shorter than any action frequency (#156644) (#156920) # Backport This will backport the following commits from `main` to `8.8`: - [[RAM][SECURITYSOLUTION][ALERTS] - Throw an error when user tries to set schedule interval shorter than any action frequency (#156644)](#156644) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ievgen Sorokopud","email":"ievgen.sorokopud@elastic.co"},"sourceCommit":{"committedDate":"2023-05-05T20:46:31Z","message":"[RAM][SECURITYSOLUTION][ALERTS] - Throw an error when user tries to set schedule interval shorter than any action frequency (#156644)\n\n## Summary\r\n\r\nThese changes insure that alerting framework throws an exception when\r\nuser tries to set rule's schedule interval shorter than one of the\r\naction frequencies.\r\n\r\nThe message will look like:\r\n\r\n`\"message\": \"Error updating rule: the interval is longer than the action\r\nfrequencies: 1h\"`\r\n\r\nTheUI changes will be addressed in the 8.9 in this ticket\r\nhttps://github.com//issues/155502\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"e1ee0196653a38fc6b7f8abfb191a286ad020176","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Team:Detection Alerts","backport:prev-minor","ci:cloud-deploy","v8.9.0"],"number":156644,"url":"https://github.com/elastic/kibana/pull/156644","mergeCommit":{"message":"[RAM][SECURITYSOLUTION][ALERTS] - Throw an error when user tries to set schedule interval shorter than any action frequency (#156644)\n\n## Summary\r\n\r\nThese changes insure that alerting framework throws an exception when\r\nuser tries to set rule's schedule interval shorter than one of the\r\naction frequencies.\r\n\r\nThe message will look like:\r\n\r\n`\"message\": \"Error updating rule: the interval is longer than the action\r\nfrequencies: 1h\"`\r\n\r\nTheUI changes will be addressed in the 8.9 in this ticket\r\nhttps://github.com//issues/155502\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"e1ee0196653a38fc6b7f8abfb191a286ad020176"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156644","number":156644,"mergeCommit":{"message":"[RAM][SECURITYSOLUTION][ALERTS] - Throw an error when user tries to set schedule interval shorter than any action frequency (#156644)\n\n## Summary\r\n\r\nThese changes insure that alerting framework throws an exception when\r\nuser tries to set rule's schedule interval shorter than one of the\r\naction frequencies.\r\n\r\nThe message will look like:\r\n\r\n`\"message\": \"Error updating rule: the interval is longer than the action\r\nfrequencies: 1h\"`\r\n\r\nTheUI changes will be addressed in the 8.9 in this ticket\r\nhttps://github.com//issues/155502\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"e1ee0196653a38fc6b7f8abfb191a286ad020176"}}]}] BACKPORT--> Co-authored-by: Ievgen Sorokopud <ievgen.sorokopud@elastic.co>
Summary
These changes insure that alerting framework throws an exception when user tries to set rule's schedule interval shorter than one of the action frequencies.
The message will look like:
"message": "Error updating rule: the interval is longer than the action frequencies: 1h"
The UI changes will be addressed in the 8.9 in this ticket #155502