Closed Bug 1028086 Opened 10 years ago Closed 9 years ago

OrangeFactor 500 ISE from "ValueError: No JSON object could be decoded" while reading upstream" when calling /api/count with a large date range

Categories

(Tree Management Graveyard :: OrangeFactor, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: emorley, Unassigned)

Details

Well on the plus side, we know bug 965342 and bug 909368 work :-)

In the UI:
" 500: Internal Server Error loading http://brasstacks.mozilla.com/api/count?startday=2014-04-21&endday=2014-06-20&tree=trunk "

Webconsole:
GET http://brasstacks.mozilla.com/orangefactor/api/count [HTTP/1.1 500 Internal Server Error 8707ms]
Ok, OF is working for a the default date range:
http://brasstacks.mozilla.com/orangefactor/

Just not for this query:
http://brasstacks.mozilla.com/orangefactor/?display=OrangeFactor&tree=trunk&startday=2014-04-21&endday=2014-06-20

Which I'd gotten to by clicking the "OrangeFactor" link on the top menu, whilst being on the per-bug OF view (navigating to the overview preserves the currently set date range). The single-bug page (with long date range) is what TBPL had linked to (TBPL defaults to 2 month range, which isn't ideal). 

We should:
* File a TBPL bug to reduce the range + one that doesn't have an endday date in the future.
* Ensure that we don't 500 when the range is too large.

From the server logs:

2014/06/20 02:39:50 [error] 1707#0: *50176842 FastCGI sent in stderr: "Traceback (most recent call last):
  File "/home/webtools/apps/orangefactor/lib/python2.6/site-packages/web/application.py", line 237, in process
    return self.handle()
  File "/home/webtools/apps/orangefactor/lib/python2.6/site-packages/web/application.py", line 228, in handle
    return self._delegate(fn, self.fvars, args)
  File "/home/webtools/apps/orangefactor/lib/python2.6/site-packages/web/application.py", line 409, in _delegate
    return handle_class(cls)
  File "/home/webtools/apps/orangefactor/lib/python2.6/site-packages/web/application.py", line 385, in handle_class
    return tocall(*args)
  File "/home/webtools/apps/orangefactor/src/orangefactor/server/handlers.py", line 171, in GET
    results = json.dumps(self._GET(params, body))
  File "/home/webtools/apps/orangefactor/src/orangefactor/server/handlers.py", line 445, in _GET
    return BugData._GET(self, params, True)
  File "/home/webtools/apps/orangefactor/src/orangefactor/server/handlers.py", line 384, in _GET
    orange_bugs = bzcache.get_bugs(list(buglist))
  File "/home/webtools/apps/orangefactor/lib/python2.6/site-packages/bzcache-0.1.0-py2.6.egg/bzcache/bzcache.py", line 101, in get_bugs
    bzbugs = self._get_bugzilla_data(list(bugset))
  File "/home/webtools/apps/orangefactor/lib/python2.6/site-packages/bzcache-0.1.0-py2.6.egg/bzcache/bzcache.py", line 77, in _get_bugzilla_data
    bugdict = json.loads(buginfo)['bugs']
  File "/usr/lib64/python2.6/json/__init__.py", line 307, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.6/json/decoder.py", line 319, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.6/json/decoder.py", line 338, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded" while reading upstream, client: 10.22.74.208, server: brasstacks1.dmz.scl3.mozilla.com, request: "GET /orangefactor/api/count?startday=2014-04-21&endday=2014-
Summary: OrangeFactor failing with " 500: Internal Server Error loading http://brasstacks.mozilla.com/api/count?startday=2014-04-21&endday=2014-06-20&tree=trunk" → OrangeFactor "ValueError: No JSON object could be decoded" while reading upstream" when calling /api/count with a large date range
Filed bug 1028098 to adjust the TBPL links, however this can still happen if people set too long a range themselves.
Summary: OrangeFactor "ValueError: No JSON object could be decoded" while reading upstream" when calling /api/count with a large date range → OrangeFactor 500 ISE from "ValueError: No JSON object could be decoded" while reading upstream" when calling /api/count with a large date range
Product: Testing → Tree Management
Wontfix in favour of OrangeFactor v2 which will consume Treeherder's API, and likely be written from scratch.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.