Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling Storage.get() unexpectedly returns zero on BlobIds representing empty objects whose name ends in slash #1295

Open
cbolik opened this issue Aug 14, 2023 · 1 comment
Labels

Comments

@cbolik
Copy link

cbolik commented Aug 14, 2023

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 zero when 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
Copy link

Eden90 commented 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 - #1017.

@fsouza fsouza added the bug label Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants