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 D42E91FF0B0 for ; Tue, 27 Oct 2026 13:49:13 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 92AE521242; Tue, 27 Oct 2026 13:49:13 +0100 (CET) Message-ID: Date: Tue, 27 Oct 2026 13:49:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Christian Ebner Subject: Re: [PATCH proxmox v4 2/9] pbs-api-types: prune job: make schedule optional To: Jonas Theisen , pbs-devel@lists.proxmox.com References: <20261022164343.353831-1-j.theisen@proxmox.com> <20261022164343.353831-3-j.theisen@proxmox.com> Content-Language: en-US, de-DE In-Reply-To: <20261022164343.353831-3-j.theisen@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793105349417 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.494 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: LE44Q5LCLUFTH5EMIX7HBQTVOSLWGJWY X-Message-ID-Hash: LE44Q5LCLUFTH5EMIX7HBQTVOSLWGJWY X-MailFrom: c.ebner@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 Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 10/22/26 6:44 PM, Jonas Theisen wrote: > To align the prune job API to the other job types and nit: no need for the early line break in the commit message. > to make use of the disable parameter the schedule should be optional. > If this is not the case a new prune job cannot be created to be > manually run i.e. disabled without a schedule. > > This also means the schedule should be an Option instead > of a plain String. This is based on the existing other jobs. > > Signed-off-by: Jonas Theisen > --- > pbs-api-types/src/jobs.rs | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/pbs-api-types/src/jobs.rs b/pbs-api-types/src/jobs.rs > index 6b725b75..9138596c 100644 > --- a/pbs-api-types/src/jobs.rs > +++ b/pbs-api-types/src/jobs.rs > @@ -926,6 +926,7 @@ impl PruneJobOptions { > schema: DATASTORE_SCHEMA, > }, > schedule: { > + optional: true, > schema: PRUNE_SCHEDULE_SCHEMA, > }, > comment: { > @@ -952,7 +953,8 @@ pub struct PruneJobConfig { > #[updater(serde(skip_serializing_if = "Option::is_none"))] > pub disable: bool, > > - pub schedule: String, > + #[serde(skip_serializing_if = "Option::is_none")] > + pub schedule: Option, > > #[serde(skip_serializing_if = "Option::is_none")] > pub comment: Option,