[GH-ISSUE #1434] Inconsistent file system emulation compared to actual GCS #198

Open
opened 2026-03-03 12:09:05 +03:00 by kerem · 2 comments
Owner

Originally created by @anveshreddy18 on GitHub (Dec 19, 2023).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1434

Our application has a requirement that in the store, there be a folder and a file with the same name, as we use the folder to store chunks of the corresponding composite file with the same name as that of folder. This was happening successfully in actual GCS till now as gcs uses flat hierarchy and maps object name to its content by using the object prefix as it's name. Refer the G cloud doc explaining this.

Recently we decided to use the fake server to avoid costs while testing and I have observed that the mock gcs server uses a tree like hierarchical file system ( I know it's because of the alpine base image ) which doesn't permit creating a file and a folder with the same name.

Is there any plan of supporting a file and folder with the same name in the future?

Originally created by @anveshreddy18 on GitHub (Dec 19, 2023). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1434 Our [application](https://github.com/gardener/etcd-backup-restore) has a requirement that in the store, there be a folder and a file with the same name, as we use the folder to store chunks of the corresponding composite file with the same name as that of folder. This was happening successfully in actual `GCS` till now as `gcs` uses flat hierarchy and maps object name to its content by using the object prefix as it's name. Refer the [G cloud doc](https://cloud.google.com/storage/docs/objects#namespace) explaining this. Recently we decided to use the fake server to avoid costs while testing and I have observed that the mock gcs server uses a tree like hierarchical file system ( I know it's because of the `alpine` base image ) which doesn't permit creating a file and a folder with the same name. Is there any plan of supporting a file and folder with the same name in the future?
Author
Owner

@fsouza commented on GitHub (Dec 19, 2023):

If I understand correctly, you need something like a set of objects named "foo", "foo/bar", "foo/baz", etc?

I believe this should be supported by the memory backend, but you're correct, the filesystem backend uses a hierarchical structure that isn't compatible with that. At some point we should redesign the filesystem backend to take into consideration generations and other missing capabilities, but there are no clear plans right now.

<!-- gh-comment-id:1862574614 --> @fsouza commented on GitHub (Dec 19, 2023): If I understand correctly, you need something like a set of objects named "foo", "foo/bar", "foo/baz", etc? I believe this should be supported by the memory backend, but you're correct, the filesystem backend uses a hierarchical structure that isn't compatible with that. At some point we should redesign the filesystem backend to take into consideration generations and other missing capabilities, but there are no clear plans right now.
Author
Owner

@anveshreddy18 commented on GitHub (Dec 19, 2023):

If I understand correctly, you need something like a set of objects named "foo", "foo/bar", "foo/baz", etc?

Yes, you are right.

At some point we should redesign the filesystem backend to take into consideration generations and other missing capabilities, but there are no clear plans right now.

Thanks for acknowledging the issue, understood the limitations, hoping to get it redesigned soon. ✌️

<!-- gh-comment-id:1862588336 --> @anveshreddy18 commented on GitHub (Dec 19, 2023): >If I understand correctly, you need something like a set of objects named "foo", "foo/bar", "foo/baz", etc? Yes, you are right. >At some point we should redesign the filesystem backend to take into consideration generations and other missing capabilities, but there are no clear plans right now. Thanks for acknowledging the issue, understood the limitations, hoping to get it redesigned soon. ✌️
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#198
No description provided.