From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 0A5F91FF13C for ; Thu, 02 Apr 2026 10:54:18 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5E08EF9BB; Thu, 2 Apr 2026 10:54:47 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v3 2/5] client: repository: add individual component parameters From: Wolfgang Bumiller To: Thomas Lamprecht In-Reply-To: <20260401225305.4069441-3-t.lamprecht@proxmox.com> References: <20260401225305.4069441-1-t.lamprecht@proxmox.com> <20260401225305.4069441-3-t.lamprecht@proxmox.com> Date: Thu, 02 Apr 2026 10:54:08 +0200 Message-Id: <177512004835.24063.5517839005153238122.b4-review@b4> X-Mailer: b4 0.15.1 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1775119991968 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.414 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 1 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 1 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 1 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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: CVPP6TXFIK3UFF226SEHK26VRVQOBH6T X-Message-ID-Hash: CVPP6TXFIK3UFF226SEHK26VRVQOBH6T X-MailFrom: w.bumiller@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 CC: pbs-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 02 Apr 2026 00:48:58 +0200, Thomas Lamprecht wrote: > diff --git a/pbs-client/src/backup_repo.rs b/pbs-client/src/backup_repo.rs > index 45c859d67..c899dc277 100644 > --- a/pbs-client/src/backup_repo.rs > +++ b/pbs-client/src/backup_repo.rs > @@ -1,8 +1,156 @@ > [ ... skip 128 lines ... ] > + fn try_from(args: BackupRepositoryArgs) -> Result { > + let has_url = args.repository.is_some(); > + let has_atoms = args.has_atoms(); > + > + if has_url && has_atoms { > + bail!("--repository and --server/--port/--datastore/--auth-id are mutually exclusive"); Since we have this twice, should we have a `BackupRepositoryArgs::check()?` to deduplicate the error message? (It would then also be easy to (later) extend the struct to also contain info about where the components came from to produce a more accurate error message if things were merged). --