Closed KrishnaIyer closed 16 hours ago
Apply a default pagination on IS List RPCs if not provided in the request.
Limit
Currently limit value of 0 returns all entries.
limit
0
We should use a default value and use that when the limit in the request is not set.
No response
The Things Stack Cloud
3.32.1
Pagination struct { DefaultLimit int64 `name:"default-limit" description:"The default limit applied to paginated requests if not specified"` } `name:"pagination" description:"Pagination settings"`
10
WithPagination
req.Limit
This is tested and being rolled out.
Summary
Apply a default pagination on IS List RPCs if not provided in the request.
Steps to Reproduce
Limit
field of the request.Current Result
Currently
limit
value of0
returns all entries.Expected Result
We should use a default value and use that when the limit in the request is not set.
Relevant Logs
No response
URL
No response
Deployment
The Things Stack Cloud
The Things Stack Version
3.32.1
Client Name and Version
No response
Other Information
No response
Proposed Fix
10
: https://github.com/TheThingsNetwork/lorawan-stack/blob/v3.32/cmd/internal/shared/identityserver/config.go#L28WithPagination
, use this default value ifreq.Limit
is not set. https://github.com/TheThingsNetwork/lorawan-stack/blob/v3.32/pkg/identityserver/store/pagination.go#L36Contributing
Validation
Code of Conduct