-
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
Uses uuid for auto-generated ids and prepends type #12834
Conversation
Signed-off-by: Tyler Smalley <[email protected]>
Putting together a PR into master to show how much this cleans up. |
I figured that we would only need to prefix IDs when we have a user-specified ID, why do we need it otherwise? |
Oh, I guess when we receive an ID from the API we don't know if it needs to have the type prepended so if we always prepend the type then we remove a bit of ambiguity. 👍 |
Here is the PR into the |
@spalger, exactly. This essentially allows us to remove all of the compatibility layer in 6.0 in exchange for creating ID's like this. |
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.
LGTM
Signed-off-by: Tyler Smalley <[email protected]>
* Uses uuid for auto-generated ids and prepends type (#12834) Signed-off-by: Tyler Smalley <[email protected]> * saved_objects: remove isSingleTypeError reference
This PR uses self-generated id's when creating documents. This will allow us to create type prepended id's in 6.x, allowing for direct get/update/delete instead of by query.
Without this, we will be forced to do things like this: https://github.com/elastic/kibana/pull/12794/files#diff-cc9fbe8850c8f590da1323a91d29717dR220
Here is some manual testing guidance: #12648 (comment)
Also, ES also now returning
type_missing_exception
in 5.6 instead of anillegal_argument_exception