/jobs/ endpoint should be able to take an array of jobs and return information on all of them.
Categories
(Tree Management :: Treeherder: API, enhancement)
Tracking
(Not tracked)
People
(Reporter: KWierso, Unassigned)
References
Details
In bug 1519599, I'm batching up retrigger requests from the pinboard so they only submit one retrigger request per push that's involved with jobs in the pinboard.
After doing that, it will take a very long time for the requests to be submitted, because each job in the pinboard makes its own request to JobModel.get(repo, job)
, and the requests to taskcluster can only begin once those are all completed.
This isn't too bad if there's only a handful of jobs in the pinboard, but it can quickly end up taking tens of seconds before all of the job details are fetched.
I'd like to be able to call something like JobModel.get(repo, jobsArray)
and have the JobModel get the info for all of the jobs in jobsArray via a single request, which should hopefully have a much faster turnaround time (and much less server overhead) than requesting each job individually.
The pinboard maxes out at 500 jobs, which may be more than we'd want for this, though I don't know where the line should be drawn for that.
Comment 1•5 years ago
|
||
The jobs API usesd django-filter (), and is set up to support this already:
https://github.com/mozilla/treeherder/blob/0979b68d8d4c358de6df1c7673a595936d548532/treeherder/webapp/api/jobs.py#L37
eg:
https://treeherder.mozilla.org/api/project/mozilla-inbound/jobs/?id__in=221988742,221989155
Description
•