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 3687F1FF0DF for ; Fri, 28 Aug 2026 17:51:30 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id E88DF2159B; Fri, 28 Aug 2026 17:51:29 +0200 (CEST) From: Jonas Theisen To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager 2/2] remote-tasks: Align fetched PVE tasks to PBS and PDM API Date: Fri, 28 Aug 2026 17:49:36 +0200 Message-ID: <20260828155110.563237-3-j.theisen@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260828155110.563237-1-j.theisen@proxmox.com> References: <20260828155110.563237-1-j.theisen@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787932276874 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.938 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: MGKTIM23IZ73STOHZZIZ6HRXI5F5HY4Y X-Message-ID-Hash: MGKTIM23IZ73STOHZZIZ6HRXI5F5HY4Y X-MailFrom: j.theisen@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: Running tasks fetched from PVE's API have the status "RUNNING" while PBS and PDM have None. Since the filtering logic in PDM also expects the state to be None for running tasks this patch aligns the status of fetched tasks. With this applied running PVE tasks no longer display when filtering for errored tasks in the Remote tab of PDM. Signed-off-by: Jonas Theisen --- server/src/remote_tasks/refresh_task.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/src/remote_tasks/refresh_task.rs b/server/src/remote_tasks/refresh_task.rs index 668b63e4..3275bdb8 100644 --- a/server/src/remote_tasks/refresh_task.rs +++ b/server/src/remote_tasks/refresh_task.rs @@ -504,11 +504,17 @@ async fn poll_single_tracked_task(remote: Remote, task: RemoteUpid) -> (RemoteUp fn map_pve_task(task: pve_api_types::ListTasksResponse, remote: String) -> TaskCacheItem { let remote_upid = RemoteUpid::new(remote, RemoteType::Pve, task.upid); + // This is to align the PVE tasks to PBS and PDM tasks + let status = match task.status { + Some(ref s) if s == "RUNNING" => None, + other => other, + }; + TaskCacheItem { upid: remote_upid, starttime: task.starttime, endtime: task.endtime, - status: task.status, + status: status, } } -- 2.47.3