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 Object Namespaces #22968

Closed
wants to merge 3 commits into from
Closed

Conversation

kobelb
Copy link
Contributor

@kobelb kobelb commented Sep 12, 2018

This introduces the concept of Saved Object Namespaces, which Spaces will be taking advantage of. This solves two primary pain-points, it allows us to prefix the very beginning of the Elasticsearch document IDs to prevent collisions, and it also makes the user experience when the Spaces plugin is disabled or removed more user friendly.

When Spaces isn't enabled, Saved Objects will continue to behave as they do today and their IDs will simply be type:id. However, when Saved Objects are in a namespace, as specified by the Spaces plugin, the ID will become namespace:type:id, which will prevent collisions and allow users to import/export objects between Spaces. Additionally, when a Saved Object is in a namespace, there will be an additional root level property of namespace, which allows us to efficiently query for objects within a namespace.

These changes are made in a backwards compatible manner for SavedObjectsClient consumers, and the namespace is simply an optional parameter on the interface to the SavedObjectsClient.

@kobelb kobelb requested review from legrego and spalger September 12, 2018 15:09
@kobelb kobelb added non-issue Indicates to automation that a pull request should not appear in the release notes v6.5.0 v7.0.0 labels Sep 12, 2018
@elasticmachine

This comment has been minimized.

@kobelb kobelb requested a review from epixa September 12, 2018 17:09
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@legrego legrego mentioned this pull request Sep 14, 2018
@epixa epixa added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Sep 17, 2018
Copy link
Member

@legrego legrego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: Tested and re-reviewed. Previously reviewed when these changes were part of #22357

@epixa
Copy link
Contributor

epixa commented Sep 17, 2018

It looks like this PR has conflicts, I assume with the saved object migrations PR that just got merged.

@kobelb
Copy link
Contributor Author

kobelb commented Sep 18, 2018

It looks like this PR has conflicts, I assume with the saved object migrations PR that just got merged.

That is correct, I'll be taking a look at resolving the conflicts a little later today and will update this and the spaces PR accordingly.

@kobelb
Copy link
Contributor Author

kobelb commented Sep 20, 2018

Closing this out, I'll be opening up another one shortly that does the same thing but works with migrations

@kobelb kobelb closed this Sep 20, 2018
@kobelb kobelb deleted the saved-object-namespaces branch September 20, 2018 19:33
@epixa
Copy link
Contributor

epixa commented Sep 21, 2018

Replaced by #23378

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-issue Indicates to automation that a pull request should not appear in the release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v6.5.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants