From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id CC8991FF0C0 for ; Wed, 21 Oct 2026 16:39:57 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 155B321671; Wed, 21 Oct 2026 16:39:45 +0200 (CEST) Content-Type: text/plain; charset=UTF-8 Date: Wed, 21 Oct 2026 16:39:36 +0200 Message-Id: Subject: Re: [PATCH proxmox v4 15/39] notify: migrate PBS's and PVE's default matcher to expression syntax From: =?utf-8?q?Michael_K=C3=B6ppl?= To: "Lukas Wagner" , , Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 X-Mailer: aerc 0.22.0 References: <20261012131413.314088-1-l.wagner@proxmox.com> <20261012131413.314088-16-l.wagner@proxmox.com> In-Reply-To: <20261012131413.314088-16-l.wagner@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1792593576725 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.237 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: GAI2ZVD73GBCS7LULNL4AJVGFS4UN4GR X-Message-ID-Hash: GAI2ZVD73GBCS7LULNL4AJVGFS4UN4GR X-MailFrom: m.koeppl@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: On Mon Oct 12, 2026 at 3:13 PM CEST, Lukas Wagner wrote: [snip] > + use proxmox_match_expression::{not, any_of, all_of}; > + > + let expression =3D any_of![ > + not!( > + FieldMatcher::Exact { > + field: "type".into(), > + values: vec!["prune".into()], > + }.into() > + ), > + all_of![ > + FieldMatcher::Exact { > + field: "type".into(), > + values: vec!["prune".into()], > + }.into(), > + SeverityMatcher { > + severities: vec![Severity::Error, Severity::Warn= ing, Severity::Notice], This is more of a question than actual feedback, I think, but how likely is it that additional severity levels could be added in the future? Because the old default matcher was not(type =3D=3D prune AND severity =3D=3D info), whereas this specifically matches a list of severities that would need to be extended to remain equivalent, no? In any case, couldn't this simply be ``` let expression =3D not!(all_of![ FieldMatcher::Exact { field: "type".into(), values: vec!["prune".into()], }.into(), SeverityMatcher { severities: vec![Severity::Info], }.into(), ]); ``` to be equivalent to the old one? Or is there a reason this is not the case? > + }.into(), > + ], > + ]; > + > + let expression =3D serde_json::to_string(&expression) > + .expect("failed serialize expression for 'default-matche= r'"); > + > + config > + .set_data( > + "default-matcher", > + MATCHER_TYPENAME, > + MatcherConfig { > + name: "default-matcher".into(), [snip]