Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 3508 by thom.ger...@gmail.com: Post Reivew allows you to update a
review request draft to a commit ID that is already present in another
review.
http://code.google.com/p/reviewboard/issues/detail?id=3508
*** READ THIS BEFORE POSTING!
***
*** You must complete this form in its entirety, or your bug report will be
*** rejected.
***
*** If you have a security issue to report, please send it confidentially
to
*** secur...@reviewboard.org. Posting security-related issues to this bug
*** tracker causes us to have to do an emergency release.
***
*** For customer support, please post to reviewbo...@googlegroups.com
***
*** If you have a patch, please submit it to
http://reviews.reviewboard.org/
***
*** This bug tracker is public. Please check that any logs or other
information
*** that you include has been stripped of confidential information.
What version are you running?
Triggered the exception on https://reviews.reviewboard.org/ at sometime
around July 30, 2014 1:30 PM PT .
What's the URL of the page containing the problem?
https://reviews.reviewboard.org/api/review-requests/6169/draft/
What steps will reproduce the problem?
1. Create a review request (# 6168) for commit
09263fedc72b1dd34b7ce11d7e9238664d3316ed . It need not be published.
2. Create a review request (# 6169) for commit
9419d95630f1d455ceaf8932fdf793faee03543b .
3. Update the second review request with the same SHA as the first `rbt
post -r6169 09263fedc72b1dd34b7ce11d7e9238664d3316ed`
- This should get rejected because a review request exists already for
this ID but it is not currently.
4. Attempt to publish Request #6169 from the web ui or rbt post -p
- Trigger 500 error for Integrity Error.
What is the expected output? What do you see instead?
Step #3 should not be be possible. Step #4 should give a better error
message if you get to this state somehow.
What operating system are you using? What browser?
Chrome, Firefox, rbt post on linux.
Please provide any additional information below.
Stack trace of the Integrity Error from a Reviewboard 2.0.3 server:
Traceback (most recent call last):
File "Django-1.6.5-py2.7.egg/django/core/handlers/base.py", line 112, in
get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "Django-1.6.5-py2.7.egg/django/views/decorators/cache.py", line 52,
in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "Django-1.6.5-py2.7.egg/django/views/decorators/vary.py", line 19,
in inner_func
response = func(*args, **kwargs)
File "Djblets-0.8.6-py2.7.egg/djblets/webapi/resources.py", line 494, in
__call__
request, method, view, api_format=api_format, *args, **kwargs)
File "Djblets-0.8.6-py2.7.egg/djblets/webapi/resources.py", line 565, in
call_method_view
return view(request, *args, **kwargs)
File "Djblets-0.8.6-py2.7.egg/djblets/webapi/resources.py", line 753, in
put
return self.update(request, *args, **kwargs)
File "Djblets-0.8.6-py2.7.egg/djblets/webapi/decorators.py", line 117, in
_call
return view_func(*args, **kwargs)
File "ReviewBoard-2.0.3-py2.7.egg/reviewboard/webapi/decorators.py", line
110, in _check
return view_func(*args, **kwargs)
File "Djblets-0.8.6-py2.7.egg/djblets/webapi/decorators.py", line 117, in
_call
return view_func(*args, **kwargs)
File "Djblets-0.8.6-py2.7.egg/djblets/webapi/decorators.py", line 138, in
_checklogin
return view_func(*args, **kwargs)
File "Djblets-0.8.6-py2.7.egg/djblets/webapi/decorators.py", line 117, in
_call
return view_func(*args, **kwargs)
File "Djblets-0.8.6-py2.7.egg/djblets/webapi/decorators.py", line 287, in
_validate
return view_func(*args, **new_kwargs)
File "ReviewBoard-2.0.3-py2.7.egg/reviewboard/webapi/resources/review_request_draft.py",
line 394, in update
review_request.publish(user=request.user)
File "ReviewBoard-2.0.3-py2.7.egg/reviewboard/reviews/models/review_request.py",
line 716, in publish
changes = draft.publish(self, send_notification=False)
File "ReviewBoard-2.0.3-py2.7.egg/reviewboard/reviews/models/review_request_draft.py",
line 318, in publish
review_request.save()
File "ReviewBoard-2.0.3-py2.7.egg/reviewboard/reviews/models/review_request.py",
line 581, in save
super(ReviewRequest, self).save(**kwargs)
File "ReviewBoard-2.0.3-py2.7.egg/reviewboard/reviews/models/base_review_request_details.py",
line 258, in save
super(BaseReviewRequestDetails, self).save(**kwargs)
File "Django-1.6.5-py2.7.egg/django/db/models/base.py", line 545, in save
force_update=force_update, update_fields=update_fields)
File "Django-1.6.5-py2.7.egg/django/db/models/base.py", line 573, in
save_base
updated = self._save_table(raw, cls, force_insert, force_update, using,
update_fields)
File "Django-1.6.5-py2.7.egg/django/db/models/base.py", line 635, in
_save_table
forced_update)
File "Django-1.6.5-py2.7.egg/django/db/models/base.py", line 679, in
_do_update
return filtered._update(values) > 0
File "Django-1.6.5-py2.7.egg/django/db/models/query.py", line 510, in
_update
return query.get_compiler(self.db).execute_sql(None)
File "Django-1.6.5-py2.7.egg/django/db/models/sql/compiler.py", line 980,
in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "Django-1.6.5-py2.7.egg/django/db/models/sql/compiler.py", line 786,
in execute_sql
cursor.execute(sql, params)
File "Django-1.6.5-py2.7.egg/django/db/backends/util.py", line 53, in
execute
return self.cursor.execute(sql, params)
File "Django-1.6.5-py2.7.egg/django/db/utils.py", line 99, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "Django-1.6.5-py2.7.egg/django/db/backends/util.py", line 53, in
execute
return self.cursor.execute(sql, params)
File "Django-1.6.5-py2.7.egg/django/db/backends/mysql/base.py", line 124,
in execute
return self.cursor.execute(query, args)
File "MySQL_python-1.2.5-py2.7-linux-i686.egg/MySQLdb/cursors.py", line
205, in execute
self.errorhandler(self, exc, value)
File "MySQL_python-1.2.5-py2.7-linux-i686.egg/MySQLdb/connections.py",
line 36, in defaulterrorhandler
raise errorclass, errorvalue
IntegrityError: (1062, "Duplicate
entry '49023f413fc1c59fc04e0e78eadc8f935c1c3bbc-245' for
key 'reviews_reviewrequest_b8c24015'")
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.