-
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
Need a replacement for esArchiver.emptyKibanaIndex(); #136562
Comments
Pinging @elastic/kibana-operations (Team:Operations) |
I'm pretty sure the problem is that there are so many saved objects to delete, and there isn't any bulk delete API. @elastic/kibana-core can we discuss the option of closing #30503 again? |
I've added it to our sync. |
I tend to agree that this is the issue here. Deleting 10k objects without bulk APIs will likely take quite some time.
I can close the issue for sure, but you probably meant to resolve it ? |
Realize this is from a few weeks ago... but could an alternative solution for this test be to use a space and delete it? |
Does deleting a space clean up their saved objects in bulk? That sounds like a reasonable idea to me |
@tylersmalley @spalger Yes, deleting a space will delete all its documents too. One edge case is creating an object and then sharing it to another space. In this case, removing the original space won't delete the object. But outside of the spaces test suites I doubt this happens often. |
FYI folks, #139680 merged in time for 8.5 FF.
|
While discussing another issue, I think it was @pmuellr that mentioned that we really shouldn't delete alerts saved objects through the saved object API because it orphaned the task manager tasks related to it. So to really "clean" or "tear-down" after a test we should include things outside the .kibana index. Maybe we develop a function or service that takes all these things into account like; For each space:
|
correct. We also have a parallel set of APIs for connectors - they can be deleted as plain old SO's today, but that could change in the future, so probably connectors should be looped through and deleted through their APIs as well.
Or, for each space, for each saved object, if it's a "special" type call it's special delete, otherwise call the SO delete. I believe we have or will have bulk delete for rules (maybe not connectors), and plain old SO's as well, so probably want to batch those up instead of deleting one at a time. |
This bug report hasn't received any updates for a year. Can someone please verify if this is still relevant? |
I am migrating test/api_integration/fixtures/es_archiver/management/saved_objects/scroll_count to kbnArchiver (kibana/test/api_integration/apis/saved_objects_management/scroll_count.ts) And this test is using await esArchiver.emptyKibanaIndex();.
I tried to replace it with await kibanaServer.savedObjects.cleanStandardList(); but the test failed.
This is the test run with kibanaServer.savedObjects.cleanStandardList();
And this is the test run with await esArchiver.emptyKibanaIndex();
Creating an issue because we want to get rid of esArchiver.
The text was updated successfully, but these errors were encountered: