Skip to content
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

Saved objects API should return 500 for all methods when the index doesn't exist #89642

Open
rudolf opened this issue Jan 28, 2021 · 1 comment
Labels
Feature:Saved Objects project:ResilientSavedObjectMigrations Reduce Kibana upgrade failures by making saved object migrations more resilient Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@rudolf
Copy link
Contributor

rudolf commented Jan 28, 2021

In #85778 saved objects was changed to no longer auto-create the index if it doesn't exist. This prevents inadvertent data loss and hard to recover from / debug failure scenarios where the auto-created index doesn't have the right mappings.

When this happens indexing methods like create, update will return a 500 response, however other methods like get still returns a generic 404 and find 200 with empty results. I think the original intention behind this behaviour was because saved objects is a black box and users have no way to act on an index being missing #14141 However, when the index is missing it means our saved objects black box is broken beyond repair, so even if users can't fix it, the API should not respond as if everything is working as normal. It's very unlikely that the saved objects index goes missing, but when this happens I think it's safer behaviour to return a 500 than to pretend like there just weren't any results to return.

@rudolf rudolf added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc project:ResilientSavedObjectMigrations Reduce Kibana upgrade failures by making saved object migrations more resilient labels Jan 28, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Saved Objects project:ResilientSavedObjectMigrations Reduce Kibana upgrade failures by making saved object migrations more resilient Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
Development

No branches or pull requests

3 participants