[GH-ISSUE #267] partial responses using fields query parameter not implemented #53

Open
opened 2026-03-03 12:07:48 +03:00 by kerem · 0 comments
Owner

Originally created by @anz-rfc on GitHub (Jun 11, 2020).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/267

this issue is just to note one gap in behaviour between real GCS backend and this great fake-gcs-server : the fake server does not appear to implement partial response support using the fields query parameter, if given the fields query param appears to be ignored.

examples of behaviour of passing fields parameter against GCS backend:

iffields=prefixes, expected response should only contain prefixes , no items

https://storage.googleapis.com/storage/v1/b/gcp-public-data-landsat/o?prefix=LC08%2f01%2f001%2f002%2fLC08_L1GT_001002_20160817_20170322_01_T2%2f&delimiter=B&fields=prefixes

iffields=items(name), expected response should only contain name field of each item

https://storage.googleapis.com/storage/v1/b/gcp-public-data-landsat/o?prefix=LC08%2f01%2f001%2f002%2fLC08_L1GT_001002_20160817_20170322_01_T2%2f&delimiter=B&fields=items(name)

if fields=FOOBARR expected failure because fields specifies a nonsensical attribute name

https://storage.googleapis.com/storage/v1/b/gcp-public-data-landsat/o?prefix=LC08%2f01%2f001%2f002%2fLC08_L1GT_001002_20160817_20170322_01_T2%2f&delimiter=B&fields=FOOBARR

c.f. "partial response" https://cloud.google.com/storage/docs/json_api/v1/how-tos/performance

c.f. SetAttrSelection in the gcs client library: https://godoc.org/cloud.google.com/go/storage#Query.SetAttrSelection

Originally created by @anz-rfc on GitHub (Jun 11, 2020). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/267 this issue is just to note one gap in behaviour between real GCS backend and this great fake-gcs-server : the fake server does not appear to implement partial response support using the fields query parameter, if given the fields query param appears to be ignored. examples of behaviour of passing fields parameter against GCS backend: ### if`fields=prefixes`, expected response should only contain prefixes , no items https://storage.googleapis.com/storage/v1/b/gcp-public-data-landsat/o?prefix=LC08%2f01%2f001%2f002%2fLC08_L1GT_001002_20160817_20170322_01_T2%2f&delimiter=B&fields=prefixes ### if`fields=items(name)`, expected response should only contain name field of each item https://storage.googleapis.com/storage/v1/b/gcp-public-data-landsat/o?prefix=LC08%2f01%2f001%2f002%2fLC08_L1GT_001002_20160817_20170322_01_T2%2f&delimiter=B&fields=items(name) ### if `fields=FOOBARR` expected failure because fields specifies a nonsensical attribute name https://storage.googleapis.com/storage/v1/b/gcp-public-data-landsat/o?prefix=LC08%2f01%2f001%2f002%2fLC08_L1GT_001002_20160817_20170322_01_T2%2f&delimiter=B&fields=FOOBARR c.f. "partial response" https://cloud.google.com/storage/docs/json_api/v1/how-tos/performance c.f. SetAttrSelection in the gcs client library: https://godoc.org/cloud.google.com/go/storage#Query.SetAttrSelection
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#53
No description provided.