mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 13:45:52 +03:00
[GH-ISSUE #1295] Calling Storage.get() unexpectedly returns zero on BlobIds representing empty objects whose name ends in slash #186
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#186
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?
Originally created by @cbolik on GitHub (Aug 14, 2023).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1295
Between release 1.37.10 and 1.44.2 there appears to have been a change in behavior of the Storage.get() method when used on empty objects whose name ends in "/". The new behavior is that Storage.get() returns
zerowhen used on a BlobId representing such an empty "directory" (i.e. an object with a trailing slash in their name) objects. Interestingly, the current version still returns a non-zero response from Storage.get() when used on empty objects whose name does not end in a slash. Older versions like 1.37.10 as well as the "real" GCS return a non-zero response for empty objects regardless of their name (i.e. wether it ends in a trailing slash or not).Expected behavior: fake-gcs-server behaves the same for empty objects, regardless of whether their name ends in a trailing slash or not.
@Eden90 commented on GitHub (Sep 6, 2023):
I found the same issue. It's not working for the Storage.list() as well. I had to downgrade the version to have the same behaviour.
The issue starts occuring since 1.43.0 version. Maybe it's related to this change - https://github.com/fsouza/fake-gcs-server/pull/1017.