Closed
Bug 1203551
Opened 9 years ago
Closed 9 years ago
Requests to "/jobs/?count=2000&result_set_id__in=&return_type=list" should not return HTTP 200
Categories
(Tree Management :: Treeherder: API, defect, P3)
Tree Management
Treeherder: API
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: KWierso)
References
Details
Attachments
(1 file)
Bug 1203518 was caused by thousands of requests to:
https://treeherder.mozilla.org/api/project/try/jobs/?count=2000&result_set_id__in=&return_type=list
We should make it:
(a) fail earlier, to reduce perf hit
(b) Return a 400, not a 200.
```
GET /api/project/try/jobs/?count=2000&result_set_id__in=&return_type=list
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, POST, HEAD, OPTIONS
{
"meta": {
"count": 2000,
"repository": "try",
"offset": 0
},
"results": []
}
```
Reporter | ||
Comment 1•9 years ago
|
||
The perf hit from queries like these has now been significantly reduced as of bug 1221064.
However we should leave this bug open to stop it from returning an HTTP 200 - since it's not a valid search query.
Priority: P1 → P3
Summary: Requests to "/jobs/?count=2000&result_set_id__in=&return_type=list" should fail early → Requests to "/jobs/?count=2000&result_set_id__in=&return_type=list" should not return HTTP 200
Comment 2•9 years ago
|
||
Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8762911 [details] [review]
[treeherder] KWierso:1203551 > mozilla:master
Similar to bug 1221485, but for the jobs endpoint.
Attachment #8762911 -
Flags: review?(emorley)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → wkocher
Reporter | ||
Updated•9 years ago
|
Attachment #8762911 -
Flags: review?(emorley) → review?(cdawson)
Comment 4•9 years ago
|
||
Comment on attachment 8762911 [details] [review]
[treeherder] KWierso:1203551 > mozilla:master
Wes: what you've done so far (except a little nit and a lint error) looks great. But would you be up for doing as Ed suggested with the limit property? It would be nice to move to this.
Attachment #8762911 -
Flags: review?(cdawson) → review+
Comment 5•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/7d62a4b38bb68c635c48a06da0cf527d89247ad7
Bug 1203551 - Don't allow count to exceed MAX_JOBS_COUNT in the jobs api (#1594) r=camd
Assignee | ||
Comment 6•9 years ago
|
||
Landed without the change to DRF because datasource makes that difficult.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•