You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
auth.ListPaged expectes the struct field name to match the name of the column in the database. In our case, this is never true. This means pagination in auth is essentially broken for all paginated responses.
Reproduction is easy: calling listUsers with an amount < number of users will result in has_more: false with "next_offset": "<invalid Value>".
The text was updated successfully, but these errors were encountered:
* [bug] Use DB tag to look up "next" field in auth pagination
Tested by fixing the test (to look at >1 word), and also by paging with amount 2 and examining
the `next_offset` field.
Fixes#1748.
* [bug] Return HasMore field from auth listings
Previously was always `false`, so paging was never flagged.
Tested by listing:
```
go run ./cmd/lakectl -c ~/.lakectl.nessie.yaml auth users list --amount 2 --after five
+---------+-------------------------------+
| USER ID | CREATION DATE |
+---------+-------------------------------+
| four | 2021-04-12 13:29:20 +0300 IDT |
| nessie | 2021-04-11 17:07:59 +0300 IDT |
+---------+-------------------------------+
for more results run with --amount 2 --after "nessie"
```
The line "for more results..." never used to appear!
* [bug] Cap maximal number amount in auth listings
* Use unadorned column names
auth paginator cannot handle table-decorated column names, it looks for the a field with an
exact tag name. Avoid unnecessary adornment of the table from which a column comes. It is
(by definition!) not needed to describe the column, which is how the unadorned `db:...` tag
works.
auth.ListPaged
expectes the struct field name to match the name of the column in the database. In our case, this is never true. This means pagination in auth is essentially broken for all paginated responses.Reproduction is easy: calling listUsers with an amount < number of users will result in
has_more: false
with"next_offset": "<invalid Value>"
.The text was updated successfully, but these errors were encountered: