Closed Bug 1167349 Opened 9 years ago Closed 9 years ago

Turn swagger back on in production (and paginate any api's which aren't already)

Categories

(Tree Management :: Treeherder: API, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wlach, Assigned: wlach)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
mdoglio
: review+
Details | Review
In bug 1065786 we disabled swagger on production. It was really useful though! We should turn it back, after paginating any api endpoints which aren't currently  (to prevent accidental DDOS, the original concern here).

Mauro, do you know which api's we need to look into here offhand?
Flags: needinfo?(mdoglio)
The only endpoints I would check are the ones in PerformanceDataViewSet and BugscacheViewSet. The former because I don't know the maximum size of the dataset returned, the latter because now we have several thousands intermittent bugs and I guess with the right search string you can fetch most of them.
Flags: needinfo?(mdoglio)
Blocks: 1061235
Going to try to get this turned back on in advance of Whistler.
Assignee: nobody → wlachance
(In reply to Mauro Doglio [:mdoglio] from comment #1)
> The only endpoints I would check are the ones in PerformanceDataViewSet and
> BugscacheViewSet. The former because I don't know the maximum size of the
> dataset returned, the latter because now we have several thousands
> intermittent bugs and I guess with the right search string you can fetch
> most of them.

It looks like BugscacheViewSet's output is essentially capped at 50 because of the underlying method in refdata.py:

https://github.com/mozilla/treeherder/blob/master/treeherder/model/derived/refdata.py#L1374

There are no methods in PerformanceDataViewSet that return an unbounded set of results:

https://github.com/mozilla/treeherder/blob/master/treeherder/webapp/api/performance_data.py

I'd say we're probably good to just turn this back on.
Attached file PR
Attachment #8623240 - Flags: review?(mdoglio)
Attachment #8623240 - Flags: review?(mdoglio) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Blocks: 1125838
Depends on: 1176118
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: