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

Make config id independent of Kibana version #19298

Closed
wants to merge 3 commits into from

Conversation

legrego
Copy link
Member

@legrego legrego commented May 22, 2018

This PR introduces a version field to the config Saved Object. This is used to store the version of Kibana for which that configuration is valid. Previously, this information was stored in the config document's ID.

Motivation

Having the Kibana version stored as the document id prevents us from having multiple configuration objects for the same version of Kibana. While this historically hasn't been a limitation, the upcoming Spaces project will need to be able to store a separate config object for each Space users create.

Implementation

The default behavior is very similar to how it currently works: the config id will be the Kibana Version.

The Spaces plugin (or potentially another consumer) can choose to augment the ID by calling request.setUiSettingsIdSuffix(). When an ID Suffix is set, the UI Settings Service will append the suffix to the default identifier.

While the ID will still contain the Kibana version (for readability), it will no longer be the authoritive source for this information. The new version field is instead used to determine this.

example:

Default ID: 7.0.0
ID after calling request.setUiSettingsIdSuffix('my-suffix'): 7.0.0:my-suffix

This is a rather naive approach, so I'm more than open to suggestions here.
I also want to make sure the approach we take here can translate easily enough to the new platform.

@legrego legrego added the WIP Work in progress label May 22, 2018
@legrego legrego mentioned this pull request May 22, 2018
33 tasks
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@legrego legrego force-pushed the config-versioning branch from 7102762 to 8834cef Compare May 22, 2018 15:39
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@legrego legrego removed the WIP Work in progress label May 22, 2018
@legrego
Copy link
Member Author

legrego commented May 22, 2018

Hey @elastic/kibana-platform, would you mind weighing in on this PR? As I noted above, this is a rather simplistic approach, so let me know if you have any ideas for a more holistic solution.

cc @kobelb

@legrego
Copy link
Member Author

legrego commented May 22, 2018

Closing.
Spencer suggested a much better approach -- we will instead append the space id to the saved object id at the SavedObjectsClient level. We will do this for all Saved Object types, which eliminates the one-off approach that this PR introduced.

@legrego legrego closed this May 22, 2018
@legrego legrego deleted the config-versioning branch April 29, 2019 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants