From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 8D0361FF13C for ; Thu, 05 Feb 2026 19:17:45 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 97FD31858D; Thu, 5 Feb 2026 19:18:17 +0100 (CET) Message-ID: <894ed689-9f65-4ff2-8a4d-6419bdc566c9@proxmox.com> Date: Thu, 5 Feb 2026 19:17:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH datacenter-manager 4/5] parallel fetcher: improve result type ergonomics To: Lukas Wagner , pdm-devel@lists.proxmox.com References: <20260204152723.482258-1-l.wagner@proxmox.com> <20260204152723.482258-5-l.wagner@proxmox.com> Content-Language: en-US From: Thomas Lamprecht In-Reply-To: <20260204152723.482258-5-l.wagner@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1770315386460 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.022 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 0.001 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 0.001 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 0.001 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: UI34FP7FEF53LLPX55R2D5ZUMUZYSX7V X-Message-ID-Hash: UI34FP7FEF53LLPX55R2D5ZUMUZYSX7V X-MailFrom: t.lamprecht@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: Am 04.02.26 um 16:27 schrieb Lukas Wagner: > Completely overhaul the *Result types: > - use the term 'Outcome' instead of result, to avoid confusion with > Rust's Result type I do not want to bikeshed this to much, but if we touch it then a bit might be ok, with that in mind: why not Response? Outcome just has a bit to abstract ring to me. Rest seems OK to me, albeit I only skimmed the changes. The module level docs are highly appreciated, but won't apply them until above is cleared up. > - use generics to avoid the awkwardness of accessing the node outcome > of a single node when using do_for_all_remotes (we only call out to > a single node anyways) > - implement .iter()/.into_iter() where it makes sense for conveniently > iterating over remote outcomes and node outcomes > - make all members private and offer getters to access fields > - use a sorted vec as an internal data structure for storing > remote outcomes instead a hash map. This avoids the awkwardness of > having the remote name as key *and* in the struct that is used as a > value. Since the vec is sorted by the remote name, we still can > access specific remotes quite effectively via binary search.