elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.64k stars 8.22k forks source link

[Research] key sorting research spike #174949

Open ThomThomson opened 10 months ago

ThomThomson commented 10 months ago

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.

elasticmachine commented 10 months ago

Pinging @elastic/kibana-presentation (Team:Presentation)

nickpeihl commented 10 months ago

FWIW, it appears there is some prior work on traversing and sorting objects when exporting saved objects.

ThomThomson commented 10 months ago

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.