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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 1DD84DD12 for ; Fri, 22 Sep 2023 12:45:35 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0154696C2 for ; Fri, 22 Sep 2023 12:45:35 +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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 22 Sep 2023 12:45:34 +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 1251D48797 for ; Fri, 22 Sep 2023 12:45:34 +0200 (CEST) Message-ID: <456bfe52-2a87-e61c-3d2c-ef9b9fccb468@proxmox.com> Date: Fri, 22 Sep 2023 12:45:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US To: Thomas Lamprecht , Proxmox Backup Server development discussion , Stefan Lendl References: <20230920170257.311224-1-g.goller@proxmox.com> <1fbd20c8-2e36-4528-9900-e1ef7dd85499@proxmox.com> From: Gabriel Goller In-Reply-To: <1fbd20c8-2e36-4528-9900-e1ef7dd85499@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.373 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] [PATCH proxmox-backup v3] close #4723: updated gc view in the ui 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: Fri, 22 Sep 2023 10:45:35 -0000 >> Am 20/09/2023 um 19:02 schrieb Gabriel Goller: >>> Added `ObjectGrid` for GCView, moved to different file. Added >>> endpoint `gc_info` that returns all the necessary config and >>> last run stats. > Sorry to only notice this on v3, but can you please split this patch > into: > - new API > - moving GC view out to own file (with as little semantic change as > possible) > - adding new UI > > In general, it can be fine to do API and UI in one patch if they are > quite coupled, and it's a relatively small and targeted feature. But, if > there's existing UI code it still can be nicer to split this so one can > differ easier between file-movement changes and actual code changes > (git's color-moved isn't IME that helpful) So I should submit one patch with the new api endpoint, another one with moving the gc view ouf of the file (which I will have to create because the PrunceAndGCView makes one api request for both tables and uses the same store) and another one for the new ui? > [...] > >>> + // calculate next event >>> + if let Some(schedule) = &store_config.gc_schedule { >>> + if let (Ok(event), Some(last_run)) = ( >>> + schedule.parse::(), >>> + computed_schedule.last_run_endtime, >>> + ) { >>> + if let Ok(next_event) = event.compute_next_event(last_run) { >>> + computed_schedule.next_run = next_event; >>> + } >>> + } >>> + } >> >> If GC never ran but is scheduled, it would also be nice to show the next >> scheduled run. >> This might be usefull if people had not GC configured, then create a job >> to further indicate that the job is scheduled correctly. >> >> > I did not check it out closely, but how is the situation handled if it's > currently running, returning that under "last_run_upid" would be > probably confusing, but without >UPID one cannot allow one to open the > log easily, or do we want to have this strictly for last- and next-run? Showing the log while the gc is running was never possible (except when you manually start it from the ui, then it opens automatically) but we could implement a "Show Log" button as we have the `upid`... When the gc job is currently running, we display a spinner on the status row. To find out if the gc job is currently running, we simply check if the `upid` exists and the `last_run_endtime` does not.