all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Kral <d.kral@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [RFC PATCH installer] fix #5973: auto: first boot: allow snake- and kebabcased property names
Date: Thu, 30 Jan 2025 10:11:41 +0100	[thread overview]
Message-ID: <f70a0113-a09e-4590-ad9a-beb1b67ef3be@proxmox.com> (raw)
In-Reply-To: <f7b6603b-4423-464e-8fc2-0df5ed956650@proxmox.com>

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.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2025-01-30  9:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-05 14:07 Daniel Kral
2025-01-28 14:38 ` Thomas Lamprecht
2025-01-29  9:34   ` Christoph Heiss
2025-01-30  9:11   ` Daniel Kral [this message]
2025-01-30 10:06     ` Thomas Lamprecht
2025-02-17 12:21 ` Daniel Kral

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f70a0113-a09e-4590-ad9a-beb1b67ef3be@proxmox.com \
    --to=d.kral@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal