[PR #143] [MERGED] Rewrite with generation support #373

Closed
opened 2026-03-03 12:29:43 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/143
Author: @dcaba
Created: 11/28/2019
Status: Merged
Merged: 12/20/2019
Merged by: @fsouza

Base: masterHead: rewriteWithGenerationSupport


📝 Commits (5)

  • 7aaec68 extending a test to cover rewrite when source may be an old generation. Making test to fail
  • 29c16e5 as happened with other tests, we had to decouple the copy from generation tests in the end, as we need to create a bucket manually with versioning vs letting the mock to create non versioned buckets when an object refers to them
  • 5c1ddbf retrieving specific generations when required
  • 2d45aae adapting to the new CreateBucket contract
  • 8416ee0 PR feedback - unneded error printing

📊 Changes

2 files changed (+146 additions, -1 deletions)

View changed files

📝 fakestorage/object.go (+16 -1)
📝 fakestorage/object_test.go (+130 -0)

📄 Description

note: again incremental PR: the review and potential merge should go after https://github.com/fsouza/fake-gcs-server/pull/140

An easy one: just looking and considering the optional query arg that may come with rewrite (copy) requests to specify an specific generation of an object. Tests decoupled from the ones that work without versioning neither specific generations, so we initialize the buckets accordingly. Extra test scenario considered for rewrite object (against the same active object)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/143 **Author:** [@dcaba](https://github.com/dcaba) **Created:** 11/28/2019 **Status:** ✅ Merged **Merged:** 12/20/2019 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `master` ← **Head:** `rewriteWithGenerationSupport` --- ### 📝 Commits (5) - [`7aaec68`](https://github.com/fsouza/fake-gcs-server/commit/7aaec6871a164d0a844a4423c767ada51a49896e) extending a test to cover rewrite when source may be an old generation. Making test to fail - [`29c16e5`](https://github.com/fsouza/fake-gcs-server/commit/29c16e52e5073f8f01822bbe3351d7b2b4e3fac8) as happened with other tests, we had to decouple the copy from generation tests in the end, as we need to create a bucket manually with versioning vs letting the mock to create non versioned buckets when an object refers to them - [`5c1ddbf`](https://github.com/fsouza/fake-gcs-server/commit/5c1ddbf548e60e6ecf82ddf767888d3d6d8ce07e) retrieving specific generations when required - [`2d45aae`](https://github.com/fsouza/fake-gcs-server/commit/2d45aaef48bd00f78c68bf339b468571ae89e4d6) adapting to the new CreateBucket contract - [`8416ee0`](https://github.com/fsouza/fake-gcs-server/commit/8416ee0b9552fbdbfc664a90cfa4adb9954ff9b5) PR feedback - unneded error printing ### 📊 Changes **2 files changed** (+146 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/object.go` (+16 -1) 📝 `fakestorage/object_test.go` (+130 -0) </details> ### 📄 Description _note: again incremental PR: the review and potential merge should go after https://github.com/fsouza/fake-gcs-server/pull/140_ An easy one: just looking and considering the optional query arg that may come with rewrite (copy) requests to specify an specific generation of an object. Tests decoupled from the ones that work without versioning neither specific generations, so we initialize the buckets accordingly. Extra test scenario considered for rewrite object (against the same active object) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:29:43 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#373
No description provided.