coreos / fedora-coreos-tracker

Issue tracker for Fedora CoreOS
https://fedoraproject.org/coreos/
262 stars 59 forks source link

Standardize on filename extensions for Butane and Ignition configs #780

Closed jlebon closed 3 years ago

jlebon commented 3 years ago

For our own documentation, we should be consistent about the filename extension used for Butane and Ignition configs. I'm not sure how consistent we are today, but for Ignition it's usually .ign, though many people also use .json. Similarly for Butane (previously FCCT), it's usually .fcc though .yaml is also used.

The argument for using .ign and .fcc is that it's more specific. The argument for .json and .yaml is that they're well-known extensions which means e.g. easier editor integration, rendering, etc...

@dustymabe proposed using .ign.json and .bu.yaml as an in-between solution.

bgilbert commented 3 years ago

The current plan of record is to switch to .bu for Butane configs, but I think Dusty's proposal is worth considering. I personally don't like a bare .json/.yaml, since they denote a detail of the format rather than the identity of the format.

To be clear, there's no code that cares about the filename extensions AFAIK, so this is just a matter of convention.

dustymabe commented 3 years ago

I'm 👍 for Dusty's proposal 🤣.

Anybody else want to weigh in?

lucab commented 3 years ago

While a bit longer, I also like that double-suffix approach.

travier commented 3 years ago

Maybe we could use the double extensions while we figure out how to get bu=yaml and ign=json syntax highlight in the most common places (vim, emacs, VSCode, EditorConfig should cover a large ground) and then switch to single extensions?

travier commented 3 years ago

Existing IANA assignment for Ignition: https://www.iana.org/assignments/media-types/application/vnd.coreos.ignition+json

dustymabe commented 3 years ago

We discussed this in the meeting today.

13:30:31*       dustymabe | #agreed we'll go with the .bu .ign extension for new files in our
                          | documentation and we'll try to use those suffixes for consistency in
                          | issues/examples we post