[PR #144] [MERGED] Support for bucket creation time #376

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/144
Author: @dcaba
Created: 11/29/2019
Status: Merged
Merged: 12/20/2019
Merged by: @fsouza

Base: masterHead: bucketCreationTime


📝 Commits (6)

  • 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
  • 09b361b support to bucket creation dates for both mem and disk buckets, including tests

📊 Changes

9 files changed (+205 additions, -24 deletions)

View changed files

📝 fakestorage/bucket.go (+7 -2)
📝 fakestorage/bucket_test.go (+5 -1)
📝 fakestorage/object.go (+16 -1)
📝 fakestorage/object_test.go (+130 -0)
📝 fakestorage/response.go (+12 -10)
📝 internal/backend/backend_test.go (+15 -4)
📝 internal/backend/bucket.go (+3 -0)
📝 internal/backend/fs.go (+13 -2)
📝 internal/backend/memory.go (+4 -4)

📄 Description

Again, incremental PR: to be considered after: https://github.com/fsouza/fake-gcs-server/pull/143

This time not connected to versioning: extending the bucket representation in the memory engine to store the original bucket creation date, while in FS we are using the bucket root dir ctime to fill that field (and that is wrong, but persisting bucket metadata in that engine in a magic file looks overkilling in the current state), and extending then responses.


🔄 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/144 **Author:** [@dcaba](https://github.com/dcaba) **Created:** 11/29/2019 **Status:** ✅ Merged **Merged:** 12/20/2019 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `master` ← **Head:** `bucketCreationTime` --- ### 📝 Commits (6) - [`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 - [`09b361b`](https://github.com/fsouza/fake-gcs-server/commit/09b361bc3374b6708129ebaffc57e5869966c26f) support to bucket creation dates for both mem and disk buckets, including tests ### 📊 Changes **9 files changed** (+205 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/bucket.go` (+7 -2) 📝 `fakestorage/bucket_test.go` (+5 -1) 📝 `fakestorage/object.go` (+16 -1) 📝 `fakestorage/object_test.go` (+130 -0) 📝 `fakestorage/response.go` (+12 -10) 📝 `internal/backend/backend_test.go` (+15 -4) 📝 `internal/backend/bucket.go` (+3 -0) 📝 `internal/backend/fs.go` (+13 -2) 📝 `internal/backend/memory.go` (+4 -4) </details> ### 📄 Description _Again, incremental PR: to be considered after: https://github.com/fsouza/fake-gcs-server/pull/143_ This time not connected to versioning: extending the bucket representation in the memory engine to store the original bucket creation date, while in FS we are using the bucket root dir ctime to fill that field (and that is wrong, but persisting bucket metadata in that engine in a magic file looks overkilling in the current state), and extending then responses. --- <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#376
No description provided.