Fix Version/s: None
Dimensions.yaml should be locked in and read-only as soon as the schema is created during the makeRepo phase. At the moment there is nothing stopping a repository from breaking if dimensions.yaml is updated in daf_butler and there is nothing stopping a user editing the config file after repository creation and breaking things.
We propose to remove dimensions.yaml from ButlerConfig and have it as an explicit argument for makeRepo (defaulting to pkg://lsst.daf.butler/configs/dimensions.yaml) which will then ensure that the dimensions configuration is locked in for that repository.
We will still require that it be possible to migrate a registry to a new dimensions definition but that migration should be by explicit request.
It's more a general comment about storing all the \n and whitespace characters in the table when that's exactly what JSON is designed to solve.
Supporting JSON natively in Config is not difficult. Kian-Tat Lim do you have an opinion on storing JSON vs YAML in database?
My general philosophy is: "YAML is better if humans are writing/reading it. JSON is better if machines are writing/reading it."
JSON form of dimensions.yaml is 10% smaller than YAML version. I think Kian-Tat Lim is on the side of switching to JSON. I will do that once
DM-27256 is merged (which adds JSON support to Config).
Is JSON better than YAML? Are you worried about line breaks? With YAML you can at least dump that into dimension.yaml without going through Config class.