4834: Server error after deleting dependent review or any other object recorded in change descriptions
- Confirmed
- Review Board
cyran.norbert | |
What version are you running?
3.0.14
What's the URL of the page containing the problem?
/r/{id} or /api/review-requests/{id}/changes
What steps will reproduce the problem?
- Create 2 review requests
- Make review request A dependent on B
- Delete review request B
- Try to enter on the review request's A page or API endpoint
- 500 server error
What is the expected output? What do you see instead?
Review request page or json, 500 server instead
What operating system are you using? What browser?
Browser and OS independent
Please provide any additional information below.
Traceback:
ERROR - None - - /api/review-requests/42829/changes/ - djblets.log.middleware - Exception thrown for user at /api/review-requests/42829/changes/
43436
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112, in get_response
response = wrapped_callback(request, callback_args, callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py", line 52, in _wrapped_view_func
response = view_func(request, *args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/vary.py", line 19, in inner_func
response = func(args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/resources/base.py", line 244, in call
request, method, view, api_format=api_format, *args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/webapi/base.py", line 338, in call_method_view
request, method, view, args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/resources/mixins/api_tokens.py", line 66, in call_method_view
request, method, view, *args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/resources/mixins/oauth2_tokens.py", line 102, in call_method_view
request, method, view, args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/resources/base.py", line 369, in call_method_view
return view(request, *args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 125, in _call
return view_func(args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/webapi/decorators.py", line 169, in _check
return view_func(*args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/util/decorators.py", line 77, in _call
f = augmented_func(args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 125, in _call
return view_func(*args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/webapi/decorators.py", line 39, in _check
return view_func(args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 125, in _call
return view_func(*args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/webapi/decorators.py", line 169, in _check
return view_func(args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 125, in _call
return view_func(*args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 311, in _validate
return view_func(args, new_kwargs)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/webapi/base.py", line 204, in get_list
return self._get_list_impl(request, *args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/webapi/base.py", line 219, in _get_list_impl
return super(WebAPIResource, self).get_list(request, args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 125, in _call
return view_func(*args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 125, in _call
return view_func(args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/decorators.py", line 311, in _validate
return view_func(*args, new_kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/resources/base.py", line 585, in get_list
self.build_response_args(request))
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/responses.py", line 164, in init
for obj in self.results
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/resources/base.py", line 583, in <lambda>
obj, request=request, *args, kwargs),
File "/usr/local/lib/python2.7/dist-packages/reviewboard/webapi/mixins.py", line 62, in serialize_object
obj, args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/djblets/webapi/resources/base.py", line 817, in serialize_object
value = serialize_func(obj, request=request)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/webapi/resources/change.py", line 109, in serialize_fields_changed_field
field.serialize_change_entry(obj)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/reviews/fields.py", line 808, in serialize_change_entry
return self.serialize_change_entry_for_model_list(field_info)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/reviews/fields.py", line 391, in serialize_change_entry_for_model_list
if key in field_info
KeyError: 43436
We should definitely bullet-proof this.
We don't recommend ever deleting review requests once you're using the service in production, though, unless there's something really bad that went up for review (something that would pose security problems, for instance). Only administrators can delete review requests for this reason. Discarding is the proper way of making a review request go away.
But yes, we should bullet-proof this.
David, mind taking a look?
-
- New + Confirmed -
+ Release-3.0.x -
+ Component:ChangeDescriptions + Component:Reviews -
+ david