-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Security Solutions] Exposes the search_after and point in time (pit) from saved objects to exception lists #125182
[Security Solutions] Exposes the search_after and point in time (pit) from saved objects to exception lists #125182
Conversation
…o the exception lists
packages/kbn-securitysolution-io-ts-list-types/src/common/pit/index.test.ts
Show resolved
Hide resolved
packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.test.ts
Outdated
Show resolved
Hide resolved
packages/kbn-securitysolution-io-ts-list-types/src/common/search_after/index.test.ts
Outdated
Show resolved
Hide resolved
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.
Code LGTM! It's super clean and easy to go through, especially with all the comments and tests you added that add lots of context. I really like the patterns you introduced too that will make it super easy to move the rest over to PIT.
Just fetching down now to play around with it and then will LGTM!
...gins/lists/server/services/exception_lists/find_exception_list_items_point_in_time_finder.ts
Show resolved
Hide resolved
x-pack/plugins/lists/server/services/exception_lists/utils/get_exception_list_filter.test.ts
Outdated
Show resolved
Hide resolved
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Unknown metric groupsAPI count
ESLint disabled in files
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
16 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Exposes the functionality of
From saved objects to the exception lists. This DOES NOT expose these to the REST API just yet. Rather this exposes it at the API level to start with and changes code that had hard limits of 10k and other limited loops. I use the batching of 1k for this at a time as I thought that would be a decent batch guess and I see other parts of the code changed to it. It's easy to change the 1k if we find we need to throttle back more as we get feedback from others.
See this PR where
PIT
andsearch_after
were first introduced: #89915See these 2 issues where we should be using more paging and PIT (Point in Time) with search_after: #93770 #103944
The new methods added to the
exception_list_client.ts
client class are:The areas of functionality that have been changed:
Note that currently we use our own ways of looping over the saved objects which you can see in the codebase such as this older way below which does work but had a limitation of 10k against saved objects and did not do point in time (PIT)
Older way example (deprecated):
But now that is replaced with this newer way using PIT:
We also have areas of code that has perPage listed at 10k or a constant that represents 10k which this removes in most areas (but not all areas):
That is now:
Left over areas will be handled in separate PR's because they are in other people's code ownership areas.
Checklist