[PR #935] [MERGED] Race-free Preconditions #1050

Closed
opened 2026-03-03 12:32:49 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/935
Author: @rawler
Created: 9/29/2022
Status: Merged
Merged: 10/31/2022
Merged by: @fsouza

Base: mainHead: race-free-preconditions


📝 Commits (5)

  • 4c29f59 upload_test: Add UploadRacesAreOnlyWonByOne
  • f2eaa70 backend/storage:Add Conditions to CreateObject
  • 23d566e upload_test: improve diagostics of ..RacesAreOnlyWonByOne
  • 5ec4d7a Apply suggestions from review
  • 4aba11a upload_test:Use runServersTest in ...RacesAreOnlyWonByOne

📊 Changes

8 files changed (+176 additions, -71 deletions)

View changed files

📝 fakestorage/json_response.go (+5 -0)
📝 fakestorage/object.go (+5 -5)
📝 fakestorage/upload.go (+38 -49)
📝 fakestorage/upload_test.go (+72 -0)
📝 internal/backend/backend_test.go (+3 -3)
📝 internal/backend/fs.go (+19 -7)
📝 internal/backend/memory.go (+20 -4)
📝 internal/backend/storage.go (+14 -3)

📄 Description

This fixes an issue we've experienced, where "IfNotExist"-style uploads have exhibited racy behavior, specified to not exist in production GCS.


🔄 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/935 **Author:** [@rawler](https://github.com/rawler) **Created:** 9/29/2022 **Status:** ✅ Merged **Merged:** 10/31/2022 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `race-free-preconditions` --- ### 📝 Commits (5) - [`4c29f59`](https://github.com/fsouza/fake-gcs-server/commit/4c29f59279bc232d0ebdb82b8786d76d1442e894) upload_test: Add UploadRacesAreOnlyWonByOne - [`f2eaa70`](https://github.com/fsouza/fake-gcs-server/commit/f2eaa70b7bc64daffe3d6ee90e6ab8db777fa354) backend/storage:Add `Conditions` to CreateObject - [`23d566e`](https://github.com/fsouza/fake-gcs-server/commit/23d566e3d5e3347e759d9de4dda71a2226b812bc) upload_test: improve diagostics of ..RacesAreOnlyWonByOne - [`5ec4d7a`](https://github.com/fsouza/fake-gcs-server/commit/5ec4d7a25f785eb774a98dfcbc6d06402b34550f) Apply suggestions from review - [`4aba11a`](https://github.com/fsouza/fake-gcs-server/commit/4aba11ab61b756d0481e90c68e2aca0eff18d3b1) upload_test:Use runServersTest in ...RacesAreOnlyWonByOne ### 📊 Changes **8 files changed** (+176 additions, -71 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/json_response.go` (+5 -0) 📝 `fakestorage/object.go` (+5 -5) 📝 `fakestorage/upload.go` (+38 -49) 📝 `fakestorage/upload_test.go` (+72 -0) 📝 `internal/backend/backend_test.go` (+3 -3) 📝 `internal/backend/fs.go` (+19 -7) 📝 `internal/backend/memory.go` (+20 -4) 📝 `internal/backend/storage.go` (+14 -3) </details> ### 📄 Description This fixes an issue we've experienced, where "IfNotExist"-style uploads have exhibited racy behavior, [specified to not exist in production GCS](https://cloud.google.com/storage/docs/consistency). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:32:49 +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#1050
No description provided.