From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id DEDE6EF1B for ; Thu, 28 Sep 2023 09:32:31 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B45E312F9A for ; Thu, 28 Sep 2023 09:32:31 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 28 Sep 2023 09:32:29 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 611C444199 for ; Thu, 28 Sep 2023 09:32:29 +0200 (CEST) Message-ID: <47c83e8c-9f53-1002-ab12-5d53e18bfbed@proxmox.com> Date: Thu, 28 Sep 2023 09:32:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 To: Thomas Lamprecht , Proxmox Backup Server development discussion References: <20230920141124.231371-1-g.goller@proxmox.com> Content-Language: en-US From: Gabriel Goller In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.368 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 NICE_REPLY_A -1.473 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pbs-devel] applied: [PATCH proxmox-backup] fix #4895: jobs: ignore task log not found error X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Sep 2023 07:32:31 -0000 On 9/27/23 17:41, Thomas Lamprecht wrote: > [..] > applied, thanks! > > IMO it might be worth doing this more centrally, e.g., catch a ENOENT in > the upid_read_status's `File::open(path)` call and return either > `TaskState::Unknown { endtime: upid.startime }`, which is also the > default of upid_read_status on other (parsing) errors, or add a new > `TaskState::NotFound` state to differ between a unknown result and this > situation, and make it more likely that call-sites handle this > explicitly. > > What do you think? Could make sense because we do quite often: ``` upid_read_status(&info.upid).unwrap_or(TaskState::Unknown { endtime: now }); ``` The problem is that we use different endtimes (mostly either 0 or 'now') on every call. So we would have to convert this to a match statement matching `TaskState::Unknown` and changing the endtime AFAICT.