mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 13:45:52 +03:00
[PR #1174] [MERGED] Add Bucket Attributes #1259
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#1259
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/1174
Author: @RachitSharma2001
Created: 5/19/2023
Status: ✅ Merged
Merged: 7/29/2023
Merged by: @fsouza
Base:
main← Head:main📝 Commits (7)
142e506Change5543ff9Done with BucketAttrsUpdate911fe32Add UpdateBucket to GRPC85dd497Clean code with Gofumpt117b8b0Fixed lint errorscc19c02Delete Unnecessary files68c6030Add specific data struct and error handling for update bucket attributes📊 Changes
14 files changed (+406 additions, -123 deletions)
View changed files
📝
fakestorage/bucket.go(+37 -7)📝
fakestorage/bucket_test.go(+54 -0)📝
fakestorage/response.go(+14 -12)📝
fakestorage/server.go(+1 -0)📝
fakestorage/server_test.go(+2 -2)📝
genproto/googleapis/storage/v1/storage.pb.go(+106 -62)📝
genproto/googleapis/storage/v1/storage_resources.pb.go(+1 -1)📝
internal/backend/backend_test.go(+67 -7)📝
internal/backend/bucket.go(+11 -3)📝
internal/backend/fs.go(+49 -10)📝
internal/backend/memory.go(+20 -9)📝
internal/backend/storage.go(+2 -1)📝
internal/grpc/server.go(+14 -5)📝
internal/grpc/server_test.go(+28 -4)📄 Description
Addresses #1025
Allows for the storage, retrieval, and update of bucket attributes. So far, the only bucket attributes that are added are
versioningEnabledanddefaultEventBasedHolds. In addition,versioningEnabledcannot be updated within the file system, since the file system does not support it.Relevant changes to the backend:
BucketAttributesstruct ->internal/backend/bucket.goCreateBucketof filesystem and memory to take in bucket attributes ->internal/backend/fs.goandinternal/backend/memory.goUpdateBucketmethod ->internal/backend/fs.goandinternal/backend/memory.goRelevant changes to fakestorage:
updateBucketendpoint ->bucket.goandresponse.goRelevant changes to GRPC:
UpdateBucketendpoint ->internal/grpc/server.goInsertBucketto allow the setting of defaultEventBasedHold ->internal/grpc/server.goRelevant tests:
internal/backend/backend_tests.go ->
TestBucketAttrsStoreRetrieveUpdate,TestBucketAttrsUpdateVersioningfakestorage/bucket_test.go ->
TestServerClientStoreAndRetrieveBucketAttrs,TestServerClientUpdateBucketAttrsinternal/grpc/server_test.go ->
TestBucketInsertGetListUpdateDelete🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.