[pve-devel] [RFC PATCH installer] fix #5973: auto: first boot: allow snake- and kebabcased property names

Daniel Kral d.kral at proxmox.com
Thu Jan 30 10:11:41 CET 2025


On 1/28/25 15:38, Thomas Lamprecht wrote:
> This is a bit worded like that behavior would be a regression, but it
> isn't AFAICT as this was always kebab-case from when being added in
> commit 6526662 ("fix #5579: auto-installer: add optional first-boot hook
> script"); or am I overlooking something?

I'm sorry that the commit message came across like this, I didn't intend 
to word it as a regression, but I can see why it did. I wasn't aware 
that we prefer kebab-case for newer property names in the answer file 
and I'll keep that in mind for future patches.

> But we prefer kebab-case for any public API/CLI parameter for modern code;
> so shouldn't we rather to the opposite, transform all other (de)serializable
> configs to use kebab-case with backward-compat aliases for the cases it
> matters?

I also like that solution and that is more in line with the motivation 
behind the patch. I could queue up a patch for the next ISO release, so 
that it's indifferent to the user whether they write the config 
parameter names in their answer files in the old snake case or new 
kebab-case format.

I'd prefer a single serde attribute for that rather than rename_all + 
alias at every property, if that's possible in a few lines, as it would 
be cleaner and we don't have to look at every property whether it's 
missing a alias attribute or not.




More information about the pve-devel mailing list