From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 499021FF139 for ; Tue, 27 Jan 2026 13:27:35 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3640F2167F; Tue, 27 Jan 2026 13:27:59 +0100 (CET) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Tue, 27 Jan 2026 13:27:12 +0100 Message-ID: <20260127122712.505774-5-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260127122712.505774-1-c.ebner@proxmox.com> References: <20260127122712.505774-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1769516780644 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.048 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: [pbs-devel] [PATCH proxmox-backup 1/1] fix #7078: ui: exponse DeleteObjects via DeleteObject provider quirk 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: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" The S3 compatible storage API for Google Cloud Storage does not implement deleteObjects api method, even if mentioned in the docs, although erratic [0] (incorrect anchor and docs switched with delete object ones at the time of last check). Provide users a workaround by allowing to set the provider quirk to perform individual deleteObject calls instead of deleteObjects on the list of objects to delete. The same quirk might also be used when delete object calls are monetarily cheaper as compared to the multi object deletion, at the cost of additional api calls and all the added delays that implies. As suggested when the provider quirks first got applied in [1], instead of exposing the additional quirk via an added entry to the dropdown selector, move to a fieldset with nested checkboxes for better accessibility. [0] https://cloud.google.com/distributed-cloud/hosted/docs/latest/gdch/apis/service/storage/storage-s3-rest-api#DeleteObjects [1] https://lore.proxmox.com/pbs-devel/175440823229.3188344.11268683178675917633.b4-ty@proxmox.com/ Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=7078 Signed-off-by: Christian Ebner --- www/window/S3ClientEdit.js | 57 ++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/www/window/S3ClientEdit.js b/www/window/S3ClientEdit.js index 8862683b8..c7e8ade1f 100644 --- a/www/window/S3ClientEdit.js +++ b/www/window/S3ClientEdit.js @@ -135,20 +135,6 @@ Ext.define('PBS.window.S3ClientEdit', { emptyText: gettext('Unlimited'), submitAutoScaledSizeUnit: true, }, - { - xtype: 'proxmoxKVComboBox', - name: 'provider-quirks', - fieldLabel: gettext('Provider Quirks'), - value: '__default__', - defaultValue: '__default__', - comboItems: [ - ['__default__', gettext('None (default)')], - ['skip-if-none-match-header', gettext('Skip If-None-Match header')], - ], - cbind: { - deleteEmpty: '{!isCreate}', - }, - }, ], advancedColumn2: [ { @@ -166,6 +152,27 @@ Ext.define('PBS.window.S3ClientEdit', { submitAutoScaledSizeUnit: true, }, ], + advancedColumnB: [ + { + xtype: 'fieldset', + name: 'provider-quirks', + fieldLabel: gettext('Provider Quirks'), + items: [ + { + xtype: 'checkbox', + name: 'skip-if-none-match-header', + fieldLabel: gettext('Skip If-None-Match header'), + labelWidth: 200, + }, + { + xtype: 'checkbox', + name: 'delete-objects-via-delete-object', + fieldLabel: gettext('DeleteObjects via deleteObject'), + labelWidth: 200, + }, + ], + }, + ], }, getValues: function () { @@ -193,6 +200,28 @@ Ext.define('PBS.window.S3ClientEdit', { delete values['secret-key']; } + let quirks = []; + ['skip-if-none-match-header', 'delete-objects-via-delete-object'].forEach((quirk) => { + if (values[quirk]) { + quirks.push(quirk); + delete values[quirk]; + } + }); + + if (quirks.length > 0) { + values['provider-quirks'] = quirks; + } else if (!me.isCreate) { + values.delete.push('provider-quirks'); + } + return values; }, + + setValues: function (values) { + if (values['provider-quirks']) { + values['provider-quirks'].forEach((quirk) => (values[quirk] = true)); + } + + this.callParent(arguments); + }, }); -- 2.47.3 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel