#119 python-copr client_v2 BuildHandler limits builds to the 100 most recent builds
Closed 7 years ago Opened 7 years ago by thofmann.

Getting a list of builds always returns at most 100 builds, even if there are more builds. Setting limit to 0 does not increase the number of returned builds.

How to reproduce

Run the following snippet:

import copr
cc = copr.create_client2_from_file_config()
print('No limit specified: {}'.format(len(cc.builds.get_list(14923))))
print('limit=0: {}'.format(len(cc.builds.get_list(14923,limit=0))))
print('offset=100: {}'.format(len(cc.builds.get_list(14923,offset=100))))

Expected behavior

The first two print statements should output at least 200, because there are at least 200 builds (as seen by the third print statement):

No limit specified: 200
limit=0: 200
offset=100: 100

Actual behavior

No limit specified: 100
limit=0: 100
offset=100: 100

If this behavior is expected, the documentation should mention this.


Metadata Update from @clime:
- Issue assigned to clime

7 years ago

If this behavior is expected, the documentation should mention this.

Hello, it's now documented but here http://copr-rest-api.readthedocs.io/en/latest/Resources/build.html#list-builds for the frontend API.

Metadata Update from @clime:
- Issue status updated to: Closed (was: Open)

7 years ago

Log in to comment on this ticket.

Metadata