From: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH proxmox, pve-{common,network,storage} v2 0/5] fix #7077: Improve error messages for ID verification
Date: Fri, 6 Feb 2026 17:12:31 +0100 [thread overview]
Message-ID: <20260206161236.335026-1-a.bied-charreton@proxmox.com> (raw)
A lot of the logic around verifying ID constraints like their length,
or that they follow a specific pattern, hides in registered format functions,
which makes them invisible in the API docs.
This series addresses this, as well as the not-ideal UX reported in #7077, by
moving some of these checks to the registered JSON schemas and adding explicit
length checks where no schema is defined.
As discussed in v1 [0], this renders some of the registered format functions
obsolete. I did remove formats that I was able to verify are not
depended on anywhere, however in order to keep the scope of this patch
series in check, I did not refactor any of the ones that do have dependants
(i.e., the format is referred to anywhere else than in the call to
`register_standard_option`).
I would be very thankful for a review by someone with more experience with
those registered formats, as I may have missed dependencies my poor grepping
skills could not catch.
Changes since v1:
- Update JSON schema verification to check length constraints before custom
format verification code and/or regex
- Register length/regex constraints for IDs directly in the
`register_standard_option` calls, if applicable
[0] https://lore.proxmox.com/pve-devel/mp3ggxjqimualakem43bge5szrphz2dyat2wynowsujwl7wcbu@6pf4sbwxam6u/T/#u
pve-common:
Arthur Bied-Charreton (1):
fix #7077: Change JSON Schema attribute validation order
src/PVE/JSONSchema.pm | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
pve-network:
Arthur Bied-Charreton (2):
fix #7077: Enforce ID format in JSON schema definitions
sdn: Remove unneeded registered formats
src/PVE/Network/SDN/Controllers/IsisPlugin.pm | 3 +++
src/PVE/Network/SDN/Controllers/Plugin.pm | 17 +++--------------
src/PVE/Network/SDN/Dns/Plugin.pm | 15 ++-------------
src/PVE/Network/SDN/Fabrics.pm | 3 +++
src/PVE/Network/SDN/Ipams/Plugin.pm | 15 ++-------------
src/PVE/Network/SDN/VnetPlugin.pm | 17 +++--------------
src/PVE/Network/SDN/Zones/Plugin.pm | 17 +++--------------
7 files changed, 19 insertions(+), 68 deletions(-)
pve-storage:
Arthur Bied-Charreton (1):
fix #7077: lvm: Improve ID verification error messages
src/PVE/Storage/Plugin.pm | 5 +++++
1 file changed, 5 insertions(+)
proxmox:
Arthur Bied-Charreton (1):
fix #7077: Improve SDN ID validation error messages
pve-api-types/src/types/verifiers.rs | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Summary over all repositories:
10 files changed, 47 insertions(+), 83 deletions(-)
--
Generated by murpp 0.9.0
next reply other threads:[~2026-02-06 16:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 16:12 Arthur Bied-Charreton [this message]
2026-02-06 16:12 ` [PATCH pve-common v2 1/1] fix #7077: Change JSON Schema attribute validation order Arthur Bied-Charreton
2026-02-06 16:12 ` [PATCH pve-network v2 1/2] fix #7077: Enforce ID format in JSON schema definitions Arthur Bied-Charreton
2026-02-06 16:12 ` [PATCH pve-network v2 2/2] sdn: Remove unneeded registered formats Arthur Bied-Charreton
2026-02-06 16:12 ` [PATCH pve-storage v2 1/1] fix #7077: lvm: Improve ID verification error messages Arthur Bied-Charreton
2026-02-06 16:12 ` [PATCH proxmox v2 1/1] fix #7077: Improve SDN ID validation " Arthur Bied-Charreton
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=20260206161236.335026-1-a.bied-charreton@proxmox.com \
--to=a.bied-charreton@proxmox.com \
--cc=pve-devel@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox