Uh oh!
There was an error while loading. Please reload this page.
Allow using pagination - #98
Conversation
At the moment, listing endpoint instances is the only Coriolis API that supports pagination. For this reason, Coriolis clients often retrieve much more database records than needed, leading to poor performance. For this reason, we're now adding pagination to other Coriolis APIs, starting with the transfer executions. A transfer can have a large amount of executions, especially in case of cron jobs. New optional parameters: * limit - the maximum number of entries to retrieve * marker - the last seen id, will not be retrieved again The pagination will be performed on the db API side, leveraging the "utils.paginate_query" helper from oslo_db.
Python 3.9 does not support modern type hints. It's no longer supported by coriolis-core, as such we'll drop it from the python-coriolisclient pipeline.
7759d9b to
e44ee96Comparepetrutlucian94
commented
May 5, 2026
This implies that we'll have two sort parameters, one for the db side sort and pagination and another one for the standard client side sorting: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| query={ | ||
| "some_filter": "some_value", | ||
| "some_other_filter": "some_other_value" | ||
| } |
There was a problem hiding this comment.
nit: query should be a list, not a dict, as seen in the test below, and in the calls in the tests above. It has to be a list because the same key can be specified multiple times.
There was a problem hiding this comment.
urlparse.urlencode accepts both, which is why _list does the same:
def _list(self, url, response_key=None, obj_class=None, json=None,
values_key='values', query: dict | list | None = None):
test_list_with_dict_query covers dict query params, test_list_with_tuple_list_query handles lists of tuples.
Uh oh!
There was an error while loading. Please reload this page.
At the moment, listing endpoint instances is the only Coriolis API that supports pagination. For this reason, Coriolis clients often retrieve much more database records than needed, leading to poor performance.
We're now adding pagination to other Coriolis APIs:
New optional parameters:
sort_key- sort key, repeatable.created_atandidare used by default.sort_dir- sort direction, repeatable.ascordesc(default).marker- the last seen ID, omitted from the results.limit- the maximum number of records to retrieve.Example: