Bug report
StorageAnalyticsClient.list() sends its sort options as snake_case query parameters, but the Storage GET /iceberg/bucket endpoint only reads camelCase. sort_column and sort_order are therefore silently ignored.
https://github.com/supabase/supabase-py/blob/main/src/storage/src/storage3/_async/analytics.py#L35-L41
params = dict(
limit=limit,
offset=offset,
sort_column=sort_column, # sent as ?sort_column=...
sort_order=sort_order, # sent as ?sort_order=...
search=search,
)
The server's query schema (iceberg/bucket.ts) declares limit, offset, sortColumn, sortOrder, search, and storage-js sends sortColumn / sortOrder. Unknown query keys are not rejected, so there is no error: the buckets just come back in the default order. limit, offset and search work because their names are the same in both conventions. The sync client has the same code.
Reproduction
from httpx import Client, MockTransport, Response
from storage3 import SyncStorageClient
def handler(request):
print(dict(request.url.params))
return Response(200, json=[])
storage = SyncStorageClient(
"https://example.supabase.co/storage/v1/",
{"apikey": "key"},
http_client=Client(transport=MockTransport(handler)),
)
storage.analytics().list(sort_column="created_at", sort_order="desc")
Expected behavior
{'sortColumn': 'created_at', 'sortOrder': 'desc'}
Actual behavior
{'sort_column': 'created_at', 'sort_order': 'desc'}
The server ignores both keys, so list(sort_column="created_at", sort_order="desc") returns buckets in the default order. Code that takes the first element as "newest bucket" gets the wrong bucket.
System information
Bug report
StorageAnalyticsClient.list()sends its sort options as snake_case query parameters, but the StorageGET /iceberg/bucketendpoint only reads camelCase.sort_columnandsort_orderare therefore silently ignored.https://github.com/supabase/supabase-py/blob/main/src/storage/src/storage3/_async/analytics.py#L35-L41
The server's query schema (
iceberg/bucket.ts) declareslimit,offset,sortColumn,sortOrder,search, and storage-js sendssortColumn/sortOrder. Unknown query keys are not rejected, so there is no error: the buckets just come back in the default order.limit,offsetandsearchwork because their names are the same in both conventions. The sync client has the same code.Reproduction
Expected behavior
Actual behavior
The server ignores both keys, so
list(sort_column="created_at", sort_order="desc")returns buckets in the default order. Code that takes the first element as "newest bucket" gets the wrong bucket.System information
main@ bb7ecc5storage3(async and sync)list_indexes()request, which is a different endpoint.