fake-gcs-server icon indicating copy to clipboard operation
fake-gcs-server copied to clipboard

partial responses using fields query parameter not implemented

Open anz-rfc opened this issue 5 years ago • 0 comments

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

anz-rfc avatar Jun 11 '20 23:06 anz-rfc