mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 13:45:52 +03:00
[PR #745] [MERGED] upload: restore behavior when ifGenerationMatch=0 for the fs backend #877
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#877
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fsouza/fake-gcs-server/pull/745
Author: @fsouza
Created: 4/8/2022
Status: ✅ Merged
Merged: 4/8/2022
Merged by: @fsouza
Base:
main← Head:ifGenerationMatch-backwards-compatibility📝 Commits (1)
a171effupload: restore behavior when ifGenerationMatch=0 for the fs backend📊 Changes
5 files changed (+122 additions, -50 deletions)
View changed files
📝
fakestorage/bucket_test.go(+9 -9)📝
fakestorage/object_test.go(+21 -21)📝
fakestorage/server_test.go(+48 -10)📝
fakestorage/upload.go(+2 -2)📝
fakestorage/upload_test.go(+42 -8)📄 Description
This change is a follow-up to #735: previously, ifGenerationMatch=0 was
special-cased and the server used GetObject, which works on filesystem
and memory backends. That pull request changed the code to use
GetObjectWithGeneration, which is not supported by the filesystem
backend.
We couldn't catch this in tests because the test suite only runs with
the memory backend, so as part of this change I'm also including the
ability to use the filesystem storage in the test suite. That can get
slow though.
This is a hack and should be revisited once we implement #744.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.