Closed
Bug 1281044
Opened 10 years ago
Closed 10 years ago
Remove the bugscache API endpoint
Categories
(Tree Management :: Treeherder: API, defect, P3)
Tree Management
Treeherder: API
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: ShrutiJ)
References
Details
Attachments
(1 file)
Bug 1280910 is making Treeherder access the bugscache via the DB directly, rather than via the API.
autophone no longer uses the bugscache API as of bug 1160188, leaving no other consumers.
We should just remove it, once bug 1280910 lands. However we'll need to convert the tests in test_bugscache.py to call `.search()` directly, since they provide most of the coverage of the feature.
| Reporter | ||
Updated•10 years ago
|
Assignee: emorley → nobody
Status: ASSIGNED → NEW
Comment 1•10 years ago
|
||
Hi Shruti, if you're interested in fixing this bug go ahead and take it; this is a pretty simple one that you can work on if you need a break from bug 1273513. I believe it should mostly be about removing this chunk of code (and anything that references it, the unit tests should tell you what needs to be modified by failing):
https://github.com/mozilla/treeherder/blob/master/treeherder/webapp/api/refdata.py#L64
Ed can hopefully answer any other questions you might have. :)
Updated•10 years ago
|
Assignee: nobody → shrutijasoria1996
| Assignee | ||
Comment 2•10 years ago
|
||
After removing bugscache API and all the references to it, the tests in test_bugscache.py started to fail.
https://github.com/mozilla/treeherder/blob/master/tests/webapp/api/test_bugscache.py#L79
How are these get requests supposed to be altered as reverse() will not work anymore?
Flags: needinfo?(emorley)
| Reporter | ||
Comment 3•10 years ago
|
||
I would:
* Move the test file to `tests/model/test_bugscache.py`
* Instead of doing a `webapp.get()`, use `Bugscache.search(search_term)` directly (see the switch made in https://github.com/mozilla/treeherder/commit/78bd30bb3b5b0e4c3a7fc40f102d809133b7b051)
* Remove any leftovers in the file relating to using the API (eg the `webapp` fixture that spins up an app instance to connect to)
Let me know if you have any other questions :-)
Flags: needinfo?(emorley)
| Reporter | ||
Comment 4•10 years ago
|
||
ie instead of:
test_bugscache.py -> /bugscache/ HTTP request -> BugscacheViewSet -> models.Bugscache.search(search_term)
It's now:
test_bugscache.py -> models.Bugscache.search(search_term)
So the public API can be removed.
Comment 5•10 years ago
|
||
| Assignee | ||
Comment 6•10 years ago
|
||
Comment on attachment 8770093 [details] [review]
[treeherder] SJasoria:Bug_1281044 > mozilla:master
I have made some changes. Please take a look and let me know if any change has to be made.
Also can you rerun the Travis CI build? It has stopped running due to some error.
Attachment #8770093 -
Flags: review?(emorley)
| Reporter | ||
Updated•10 years ago
|
Attachment #8770093 -
Flags: review?(emorley) → review+
Comment 7•10 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/a8717ec2b4e06687a1cec441b79b34527dcabf69
Bug 1281044 - Remove the bugscache API endpoint (#1676)
| Reporter | ||
Comment 8•10 years ago
|
||
Looks great - many thanks! :-)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•