[pbs-devel] [PATCH proxmox-backup 1/1] fix #7078: ui: exponse DeleteObjects via DeleteObject provider quirk

Christian Ebner c.ebner at proxmox.com
Tue Jan 27 13:27:12 CET 2026


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 <c.ebner at proxmox.com>
---
 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





More information about the pbs-devel mailing list