From faedd48022e2f5ef81c1861d91d18b605633b100 Mon Sep 17 00:00:00 2001 From: Nicolas Humbert Date: Thu, 12 Dec 2024 22:05:25 +0100 Subject: [PATCH] BB-640 Add VersioningEnabled header to Backbeat client --- extensions/replication/tasks/ReplicateObject.js | 4 ++++ lib/clients/backbeat-2017-07-01.api.json | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/extensions/replication/tasks/ReplicateObject.js b/extensions/replication/tasks/ReplicateObject.js index 7ed282b79..c05f6788d 100644 --- a/extensions/replication/tasks/ReplicateObject.js +++ b/extensions/replication/tasks/ReplicateObject.js @@ -466,6 +466,8 @@ class ReplicateObject extends BackbeatTask { ContentLength: partSize, ContentMD5: partObj.getPartETag(), Body: incomingMsg, + // destination bucket has to be versioning enabled. + VersioningRequired: true, }); attachReqUids(destReq, log); const writeStartTime = Date.now(); @@ -537,6 +539,8 @@ class ReplicateObject extends BackbeatTask { ContentLength: Buffer.byteLength(mdBlob), Body: mdBlob, ReplicationContent: replicationContent, + // destination bucket has to be versioning enabled. + VersioningRequired: true, }); attachReqUids(req, log); const writeStartTime = Date.now(); diff --git a/lib/clients/backbeat-2017-07-01.api.json b/lib/clients/backbeat-2017-07-01.api.json index cc5fd2bf9..1bfcb4424 100644 --- a/lib/clients/backbeat-2017-07-01.api.json +++ b/lib/clients/backbeat-2017-07-01.api.json @@ -46,6 +46,11 @@ "location": "header", "locationName": "X-Scal-Canonical-Id" }, + "VersioningRequired": { + "location": "header", + "locationName": "x-scal-versioning-required", + "type": "boolean" + }, "Body": { "streaming": true, "type": "blob" @@ -589,6 +594,11 @@ "location": "header", "locationName": "x-scal-replication-content", "type": "string" + }, + "VersioningRequired": { + "location": "header", + "locationName": "x-scal-versioning-required", + "type": "boolean" } }, "payload": "Body"