From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 53F521FF0E7 for ; Fri, 10 Jul 2026 14:54:17 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id BCFB92138C; Fri, 10 Jul 2026 14:54:16 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 10 Jul 2026 14:53:42 +0200 Message-Id: From: "Lukas Wagner" To: "Dominik Csapak" , "Lukas Wagner" , Subject: Re: [PATCH datacenter-manager 09/15] task cache: include archive file path in error log messages X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20260702092258.174740-1-l.wagner@proxmox.com> <20260702092258.174740-10-l.wagner@proxmox.com> <1b6799bf-dc77-44bf-914a-93cd9b9d78d1@proxmox.com> In-Reply-To: <1b6799bf-dc77-44bf-914a-93cd9b9d78d1@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783688011452 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.000 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) 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: R2SUBGLLWFDIIYL2UVKRS4AM7YPJPEOP X-Message-ID-Hash: R2SUBGLLWFDIIYL2UVKRS4AM7YPJPEOP X-MailFrom: l.wagner@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 Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri Jul 10, 2026 at 1:36 PM CEST, Dominik Csapak wrote: >> @@ -1088,9 +1091,22 @@ impl Iterator for InnerTaskArchiveIterator { >> Some(current) =3D> { >> let next =3D current.next(); >> if next.is_some() { >> - return next; >> + return next.map(|res| { >> + res.with_context(|| { >> + format!( >> + "failed to read from {file}", >> + file =3D self >> + .current_file >> + .as_ref() >> + .expect("self.current and self.= current_file are both Some") > > i guess we could prevent this expect here if `current` is changed to an > `Option<(ArchiveIterator, ArchiveFile)>` > > so that both must be either Some or None? Good call, will change it in v2!