all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Jakob-Tobias Winter <tobias@stuttgart.de>,
	tobias@linuxdingsda.de, pbs-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-backup] bin: debug: api: fix panic on parameters given more than once
Date: Wed, 11 Nov 2026 12:11:59 +0100	[thread overview]
Message-ID: <b702d45b-f32a-4c71-bc92-ab33dfcebbbb@proxmox.com> (raw)
In-Reply-To: <20261109215938.903397-1-tobias@stuttgart.de>

On 11/9/26 11:07 PM, Jakob-Tobias Winter wrote:
> Array parameters, for example 'group-filter', are set by giving the
> parameter once per value. The command line parser collects the values of
> a repeated parameter in an array, while the 'api' subcommands expected a
> single string for each parameter and panicked with "entered unreachable
> code". So array parameters could only be passed with one value.
> 
> Hand each value over to the parameter verification separately. Array
> parameters now accept more than one value, and other parameters that are
> given more than once get rejected as duplicate instead of causing a
> panic.
> 
> Signed-off-by: Jakob-Tobias Winter <tobias@stuttgart.de>
Thanks for the patch!

Only minor remarks:
Changes fix the panic, leave however the unreachable! macro in place. 
IMO it would make more sense to propagate these errors and show a 
meaningful error message in the CLI for the respective code paths. That 
should also cover param not being a Value::Object.

Further this would benefit from some regression tests.




      reply	other threads:[~2026-11-11 11:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 21:59 [PATCH proxmox-backup] bin: debug: api: fix panic on parameters given more than once Jakob-Tobias Winter
2026-11-11 11:11 ` Christian Ebner [this message]

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=b702d45b-f32a-4c71-bc92-ab33dfcebbbb@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=tobias@linuxdingsda.de \
    --cc=tobias@stuttgart.de \
    /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