Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix auth pagination #1755

Merged
merged 4 commits into from
Apr 13, 2021
Merged

Fix auth pagination #1755

merged 4 commits into from
Apr 13, 2021

Conversation

arielshaqed
Copy link
Contributor

Fixes #1748 as well as two subsequently-discovered (smaller) bugs.

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.
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!
@arielshaqed arielshaqed requested a review from nopcoder April 12, 2021 11:05
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.
@arielshaqed arielshaqed requested review from ozkatz and removed request for nopcoder April 12, 2021 12:28
@johnnyaug johnnyaug merged commit c5b4aa6 into master Apr 13, 2021
@johnnyaug johnnyaug deleted the bug/1748-page-auth-token-field branch April 13, 2021 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pagination in auth is broken
2 participants