We currently cap the 'count' param passed to the API for things like the jobs endpoint, eg: https://github.com/mozilla/treeherder/blob/f9d2efddb8d778cf8cdd9c5a5dfd34d6e9f42416/treeherder/webapp/api/jobs.py#L70 However we do so transparently, which could cause buggy behaviour, eg to handle the pagination, consumers of our API will likely do things like: ``` CHUNK_SIZE = 3000 while True: jobs_chunk = fetch_jobs(count=CHUNK_SIZE) if len(job) < CHUNK_SIZE: break jobs.append(jobs_chunk) ``` However they'll break after the first iteration, since they'll only get 2000 jobs back. We should make the request fail with an HTTP 400 or similar. At the same time, it would be good to double check all endpoints have a max count of items returned.
s/len(job)/len(job_chunk)/ that is.
This was fixed in another bug
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.