Open ThomThomson opened 10 months ago
Pinging @elastic/kibana-presentation (Team:Presentation)
FWIW, it appears there is some prior work on traversing and sorting objects when exporting saved objects.
Oh good find Nick! That might make this substantially easier. Especially if we were able to sort all keys as part of the export process itself. Then the javascript key order wouldn't matter so much.
Required for https://github.com/elastic/kibana/issues/167537.
We should look into Javascript object key sorting to determine how feasible it is to make a deterministic saved object for easy diffing.
We also need to see how it interacts with https://github.com/elastic/kibana/issues/167824 to determine if it's more difficult or less difficult to ensure proper key ordering after migration away from stringified JSON bags.
There is a package which allows for completely deterministic JSON stringification.