[PR #140] [MERGED] Support to queries against all versions (in versioned and not versioned a buckets) #374

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/140
Author: @dcaba
Created: 11/22/2019
Status: Merged
Merged: 12/19/2019
Merged by: @fsouza

Base: masterHead: listingGenerations


📝 Commits (6)

  • c4e41d4 basic tests for listing with all-versions queries ready.
  • 055cb0d after doing a real test, object names do not get the generation appended, its just a gsutil output convention. So adapting the test to check generation values
  • a610640 backend with a basic list test, and list with versions working there. fakeobject tests now almost green, but checking results names because of duplications
  • f9da7ea still to review how to check dedup filenames
  • 8799848 not the same declared slice than initialized one. fmt
  • 5e96319 adapting to the new shape of functions that changed in previous PRs

📊 Changes

6 files changed (+185 additions, -8 deletions)

View changed files

📝 fakestorage/object.go (+5 -3)
📝 fakestorage/object_test.go (+160 -0)
📝 internal/backend/backend_test.go (+12 -1)
📝 internal/backend/fs.go (+2 -1)
📝 internal/backend/memory.go (+5 -2)
📝 internal/backend/storage.go (+1 -1)

📄 Description

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

Support for querying all versions, that means multiple generations of each file are expected in versioned buckets where there has been overwrites or deletions

Done:

  • some queries with "versioning equal to true" at fakestorage level, testing a couple of scenarios
  • Incorporating two simple calls to list query (one with versioning equal to false, as we had, and another with true) in the backend tests (TestObjectCRUD)
  • implementation (easiest part actually)

🔄 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/140 **Author:** [@dcaba](https://github.com/dcaba) **Created:** 11/22/2019 **Status:** ✅ Merged **Merged:** 12/19/2019 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `master` ← **Head:** `listingGenerations` --- ### 📝 Commits (6) - [`c4e41d4`](https://github.com/fsouza/fake-gcs-server/commit/c4e41d480e410f5469eb27f0dff32b12d13439d6) basic tests for listing with all-versions queries ready. - [`055cb0d`](https://github.com/fsouza/fake-gcs-server/commit/055cb0d37136321f428350c33b33968bd03e34f1) after doing a real test, object names do not get the generation appended, its just a gsutil output convention. So adapting the test to check generation values - [`a610640`](https://github.com/fsouza/fake-gcs-server/commit/a610640c75939ec591ca40c23e65f320b7b7df0c) backend with a basic list test, and list with versions working there. fakeobject tests now almost green, but checking results names because of duplications - [`f9da7ea`](https://github.com/fsouza/fake-gcs-server/commit/f9da7eaa5a867fbe4af1765c55869a139dc930c9) still to review how to check dedup filenames - [`8799848`](https://github.com/fsouza/fake-gcs-server/commit/879984857cb047f9f838d93386c7dd19652592b2) not the same declared slice than initialized one. fmt - [`5e96319`](https://github.com/fsouza/fake-gcs-server/commit/5e9631955cd1365c406071aaead1e56d5b58f462) adapting to the new shape of functions that changed in previous PRs ### 📊 Changes **6 files changed** (+185 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/object.go` (+5 -3) 📝 `fakestorage/object_test.go` (+160 -0) 📝 `internal/backend/backend_test.go` (+12 -1) 📝 `internal/backend/fs.go` (+2 -1) 📝 `internal/backend/memory.go` (+5 -2) 📝 `internal/backend/storage.go` (+1 -1) </details> ### 📄 Description _note: incremental PR: the review and potential merge should go after https://github.com/fsouza/fake-gcs-server/pull/60_ Support for querying all versions, that means multiple generations of each file are expected in versioned buckets where there has been overwrites or deletions Done: * some queries with "versioning equal to true" at fakestorage level, testing a couple of scenarios * Incorporating two simple calls to list query (one with versioning equal to false, as we had, and another with true) in the backend tests (`TestObjectCRUD`) * implementation (easiest part actually) --- <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#374
No description provided.