Closed
Bug 1311982
Opened 9 years ago
Closed 9 years ago
PerformanceDatumViewSet.list "ValueError: invalid literal for int() with base 10: ..."
Categories
(Tree Management :: Perfherder, defect, P2)
Tree Management
Perfherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: ShrutiJ)
References
Details
Attachments
(2 files)
We should handle this case gracefully (with an HTTP 400) not HTTP 500.
/treeherder.webapp.api.performance_data:PerformanceDatumViewSet.list
File "/app/treeherder/webapp/api/performance_data.py", line 185, in list
File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/query.py", line 679, in filter
File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/query.py", line 697, in _filter_or_exclude
File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1310, in add_q
File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1338, in _add_q
File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1209, in build_filter
File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1102, in build_lookup
File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/lookups.py", line 105, in __init__
File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/lookups.py", line 143, in get_prep_lookup
File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 1875, in get_prep_lookup
File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 729, in get_prep_lookup
File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 1869, in get_prep_value
exceptions:ValueError: invalid literal for int() with base 10: 'http://8948474958936717641.owasp.org'
/api/project/mozilla-inbound/performance/data/
parameters
job_id http://8948474958936717641.owasp.org
| Reporter | ||
Comment 1•9 years ago
|
||
Comment 2•9 years ago
|
||
We should check that the job_id parameter is an integer here, and return a sensible error if it isn't:
https://github.com/mozilla/treeherder/blob/master/treeherder/webapp/api/performance_data.py#L173
| Assignee | ||
Comment 3•9 years ago
|
||
:wlach, I'll work on this bug.
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → shrutijasoria1996
Comment 4•9 years ago
|
||
| Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8828925 [details] [review]
[treeherder] SJasoria:Bug_1311982 > mozilla:master
I've made a few changes. Please take a look.
Attachment #8828925 -
Flags: review?(wlachance)
Comment 6•9 years ago
|
||
Comment on attachment 8828925 [details] [review]
[treeherder] SJasoria:Bug_1311982 > mozilla:master
Left some comments. Please re-r? when feedback is addressed. :)
Attachment #8828925 -
Flags: review?(wlachance)
| Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8828925 [details] [review]
[treeherder] SJasoria:Bug_1311982 > mozilla:master
Made the changes which you had asked for in the PR. I've written a test too. I hope it's good.
Attachment #8828925 -
Flags: feedback?(wlachance)
Comment 8•9 years ago
|
||
Comment on attachment 8828925 [details] [review]
[treeherder] SJasoria:Bug_1311982 > mozilla:master
Left some comments on github!
Attachment #8828925 -
Flags: feedback?(wlachance)
| Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8828925 [details] [review]
[treeherder] SJasoria:Bug_1311982 > mozilla:master
I've made the required changes. I hope it's good now.
Attachment #8828925 -
Flags: review?(wlachance)
Comment 10•9 years ago
|
||
Comment on attachment 8828925 [details] [review]
[treeherder] SJasoria:Bug_1311982 > mozilla:master
Just needs one small change, pre-emptively r+'ing.
Attachment #8828925 -
Flags: review?(wlachance) → review+
Comment 11•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/5ec35f62d0f152688dcdd9ea346faed044e29dad
Bug 1311982 - Handle PerformanceDatumViewSet.list error more gracefully (#2090)
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 12•9 years ago
|
||
Unfortunately this actually broke production. :( Apologies, I should have asked for a unit test to make sure this also worked in the normal case. I'll do up a followup.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 13•9 years ago
|
||
Comment 14•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/21348b70ad8d249096ef1ef728c9931a4f8d3451
Bug 1311982 - Fix accidentally broken endpoint (#2102)
| Reporter | ||
Updated•9 years ago
|
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•