From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 47A401FF13E for ; Fri, 06 Feb 2026 17:12:42 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D32389E41; Fri, 6 Feb 2026 17:13:12 +0100 (CET) From: Arthur Bied-Charreton 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 Message-ID: <20260206161236.335026-1-a.bied-charreton@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 1 AWL -1.617 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record URIBL_BLACK 3 Contains an URL listed in the URIBL blacklist [plugin.pm] Message-ID-Hash: 47ZJKWTD4T7MIOKMBG6I6CL53XIALZIE X-Message-ID-Hash: 47ZJKWTD4T7MIOKMBG6I6CL53XIALZIE X-MailFrom: abied-charreton@jett.proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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