[Cases] Limit the number of alerts that can be attached to a case#129988
Merged
cnasikas merged 7 commits intoelastic:mainfrom Apr 14, 2022
Merged
[Cases] Limit the number of alerts that can be attached to a case#129988cnasikas merged 7 commits intoelastic:mainfrom
cnasikas merged 7 commits intoelastic:mainfrom
Conversation
5 tasks
Contributor
|
Pinging @elastic/response-ops (Team:ResponseOps) |
Contributor
|
Pinging @elastic/response-ops-cases (Feature:Cases) |
academo
reviewed
Apr 14, 2022
academo
reviewed
Apr 14, 2022
academo
reviewed
Apr 14, 2022
Contributor
academo
left a comment
There was a problem hiding this comment.
This looks good! Can you add the following tests?:
- Fail when the case already has 1k alerts or more
- Fail when the case already has alerts and the sum of existing and new cases exceed 1k
Member
Author
Thanks! I don't understand the second bullet. The limit is per case not between all cases. |
pgayvallet
approved these changes
Apr 14, 2022
💚 Build SucceededMetrics [docs]Public APIs missing comments
History
To update your PR or re-run it, just comment with: cc @cnasikas |
academo
approved these changes
Apr 14, 2022
Contributor
academo
left a comment
There was a problem hiding this comment.
Thanks for adding the extra tests!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a limit to the maximum number of alerts that can be attached to a case. The limit is set to 1K and is applied to a) the total number of alerts attached to a case and b) the total number of alerts that can be saved in the doc of the
cases-commentssaved object.Depends on #129092
Checklist
Delete any items that are not applicable to this PR.
For maintainers