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

Consistent object sequence in Export Everything #29747

Closed
SolomonShorser-OICR opened this issue Jan 31, 2019 · 4 comments · Fixed by #33513
Closed

Consistent object sequence in Export Everything #29747

SolomonShorser-OICR opened this issue Jan 31, 2019 · 4 comments · Fixed by #33513
Assignees
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@SolomonShorser-OICR
Copy link

SolomonShorser-OICR commented Jan 31, 2019

Describe the feature:
When a user clicks the Export Everything button, the objects that get exported could be in a different sequence than the last time they were all exported. It would be nice if objects were always exported in the same order, such as ordered by their "_id" value.

Describe a specific use case for the feature:
We keep a JSON file in source control which is the result of Export Everything. Sometimes, I will change nothing more than parts of queries in one or two visualizations. Then I Export Everything, save the file, and check in to source control. The diff tool shows many more differences than I actually made, and most of the the diffs seem to be caused by exported objects being in a different order, even if the re-sequenced objects weren't changed. This makes it difficult to track the changes to the saved objects over time using the tools in source control.

EDIT: Maybe a better way to think of it is "making the Export Everything output more source-control friendly"?

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@nickpeihl nickpeihl added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Feb 5, 2019
@SolomonShorser-OICR
Copy link
Author

Further thoughts on this:

What if each query/visualization/saved search/dashboard definition was stored in its own file on disk? Then a user could just check in to source control the one file for the query/visualization/saved search/dashboard that was changed? It would be easier to track in source control, and also easier to share specific saved objects between Kibana instances.

There are probably problems with this approach as well, I just don't know the internals of Kibana well enough to know if this would be a bad idea and if so, why.

@mikecote
Copy link
Contributor

Hi @SolomonShorser-OICR, having a consistent order of objects when exporting makes sense. I'm currently working on a new export API (#4759) and will fix this issue with it.

In regards to having separate files, we've decided to go forward with a different approach that will satisfy including nested dependencies and include any types of saved object.

@SolomonShorser-OICR
Copy link
Author

@mikecote Looking forward to see this new functionality!

tylersmalley pushed a commit to tylersmalley/kibana that referenced this issue Jan 24, 2020
Sorting/Aggregating by _id was removed in
elastic#52517

Retains sorting as requested by
elastic#29747

Signed-off-by: Tyler Smalley <[email protected]>
tylersmalley pushed a commit to tylersmalley/kibana that referenced this issue Jan 24, 2020
Sorting/Aggregating by _id was removed in
elastic#52517

Retains sorting as requested by
elastic#29747

Signed-off-by: Tyler Smalley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants