Closed Bug 1520101 Opened 5 years ago Closed 5 years ago

/jobs/ endpoint should be able to take an array of jobs and return information on all of them.

Categories

(Tree Management :: Treeherder: API, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

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.

Status: NEW → RESOLVED
Closed: 5 years ago
Component: Treeherder → Treeherder: API
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.