-
Notifications
You must be signed in to change notification settings - Fork 511
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
✨ Adds support for paginated storage queries, and implements pagination for the wallets_list endpoint #3000
Conversation
These changes look pretty logical so far. Something that popped into my head as I was reviewing was the BaseStorageSearch classes, like this one for Askar: https://github.com/hyperledger/aries-cloudagent-python/blob/main/aries_cloudagent/storage/askar.py#L203 I wondered if it would make sense to use those classes still; however, the storage search would be good for ACA-Py to use internally for iterating through a large collection efficiently but not for providing pagination to an external client. All that to say that I can't think of a better way to handle this when it's required. |
Note: I was able to validate that limit/offset works as expected, and there's no duplicate records across pages. But since there's currently no ORDER BY clause in the askar scan SQL query, there may be inconsistent ordering of results over time. I've started work separately in aries-askar to allow for custom ordering, so client can have more control over which records are on page 1. That functionality can be introduced in a future PR |
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
…ed_records` if requested Signed-off-by: ff137 <ff137@proton.me>
…_SIZE` and use in validation. use `limit` and `offset` in records query Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
….store` reference is resolvable Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
✨ Adds support for paginated queries, and in particular implements pagination to the multitenant.admin endpoint:
wallets_list
, with new query params:limit
andoffset
.New default behavior:
Old behavior is preserved for any BaseRecord.query that doesn't specify a limit or offset, it will still fetch all records.
Additional change that may be worth including: add
sort_by
query param to wallets_list endpoint, so that the client can customise the sorting used by Askar's scan method. Pending support in Askar.Notes:
retrieveTags: False
) being passed to BaseRecords' find_all_records method. TheretrieveTags
option is not used anywhere and has no effect.