[Cases] Performance and RBAC improvements#101465
Conversation
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
fda09f4 to
44bfa52
Compare
|
Don't see any changes related to Core, but the approach LGTM. |
Thank you @mshustov! This PR was based on another PR (the RBAC PR) that touched some of your files. The PR got merged and I switched the base to master and your team left as a reviewer. Sorry for the trouble. |
|
@elasticmachine merge upstream |
676403c to
b06d2b6
Compare
b06d2b6 to
075364c
Compare
jonathan-buttner
left a comment
There was a problem hiding this comment.
Looking good, just two more places I think we need the 10k perPage:
https://github.com/elastic/kibana/blob/master/x-pack/plugins/cases/server/services/cases/index.ts#L402
| }); | ||
|
|
||
| // Ensuring we don't too many concurrent get running. | ||
| const comments = await pMap(ids, getCommentsMapper, { |
There was a problem hiding this comment.
nit: This isn't a change you made but if I understand the previous code correctly comments will be an array of saved object find responses (essentially an array of arrays [[1,2,3],[4,5,6]]). If we flattened it I wonder if it would make the deleteCommentsMapper a little easier to understand 🤷♂️ . That way we could avoid the pMap inside of the mapper.
There was a problem hiding this comment.
That's smart! As we gonna use search_after to iterate over all objects I will leave it for another PR and create a ticket to track it.
|
|
||
| ensureSavedObjectsAreAuthorized([...cases.casesMap.values()]); | ||
|
|
||
| // casesStatuses are bounded by us. No need to limit concurrent calls. |
💚 Build SucceededMetrics [docs]Public APIs missing comments
Page load bundle
History
To update your PR or re-run it, just comment with: cc @cnasikas |
Summary
Resolves: #100804
For maintainers