Closed Bug 1201662 Opened 6 years ago Closed 6 years ago

Internal server errors fetching review-request summaries

Categories

(MozReview Graveyard :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mcote, Unassigned)

Details

Attachments

(1 file)

Looks like bug 1200881 didn't solve the whole problem.  Some bugs are getting 500 errors when trying to load their review-request summaries, e.g.

- Exception thrown for user AnonymousUser at https://reviewboard.mozilla.org/api/extensions/mozreview.extension.MozReviewExtension/summary/?bug=1148855

u'6265'
Traceback (most recent call last):
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib64/python2.6/site-packages/newrelic-2.44.0.36/newrelic/hooks/framework_django.py", line 497, in wrapper
    return wrapped(*args, **kwargs)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/views/decorators/cache.py", line 52, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/views/decorators/vary.py", line 19, in inner_func
    response = func(*args, **kwargs)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/djblets/webapi/resources.py", line 497, in __call__
    request, method, view, api_format=api_format, *args, **kwargs)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/djblets/webapi/resources.py", line 568, in call_method_view
    return view(request, *args, **kwargs)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/djblets/webapi/decorators.py", line 117, in _call
    return view_func(*args, **kwargs)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/djblets/webapi/decorators.py", line 287, in _validate
    return view_func(*args, **new_kwargs)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/djblets/webapi/decorators.py", line 117, in _call
    return view_func(*args, **kwargs)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/mozreview-0.1.2a0-py2.6.egg/mozreview/resources/review_request_summary.py", line 145, in get_list
    summaries = self._summarize_families(request, families)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/mozreview-0.1.2a0-py2.6.egg/mozreview/resources/review_request_summary.py", line 272, in _summarize_families
    for child_rrid in child_rrids
KeyError: u'6265'

I believe this is caused by older review requests storing review-request ids in the p2rb.commits table as strings instead of ints.  Easy fix.
mozreview: Convert review-request IDs in p2rb.commits to ints when sorting children for summaries (bug 1201662). r?smacleod

Older parent review requests stored the IDs of children as strings in the
p2rb.commits list.  Since we use the actual review request ID when building
up our family dictionaries in the summary API, ensure we convert all IDs
from p2rb.commits into integers when sorting the children.
Attachment #8656767 - Flags: review?(smacleod)
Assignee: nobody → mcote
Status: NEW → ASSIGNED
Priority: -- → P1
Comment on attachment 8656767 [details]
MozReview Request: mozreview: Convert review-request IDs in p2rb.commits to ints when sorting children for summaries (bug 1201662). r?smacleod

https://reviewboard.mozilla.org/r/18245/#review16359
Attachment #8656767 - Flags: review?(smacleod) → review+
http://hg.mozilla.org/hgcustom/version-control-tools/rev/eb76c0fec83a
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Version: Trunk → unspecified
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.