3329: Show proper error message when attempting to publish review request with duplicate commit ID
- Confirmed
- Review Board
tomi*****@gmai***** (Google Code) (Is this you? Claim this profile.) | |
What version are you running? 2.0 RC2 (dev) (http://reviews.reviewboard.org) What's the URL of the page this enhancement relates to, if any? http://reviews.reviewboard.org/r/<id> Describe the enhancement and the motivation for it. See the actual defect in issue 3328. Review board should show proper error message when the Ajax request is returned with HTTP error 500. Currently an alert box is shown with value "undefined" and JavaScript console shows the HTTP error 500. What operating system are you using? What browser? Please provide any additional information below. This issue is related to https://code.google.com/p/reviewboard/issues/detail?id=3328.
I'll work on this.
This is certainly harder to hit now, but not fully fixed. The following repro case results in two review requests with the same commit ID: 1. Run `rbt post` 2. Update the branch, run `rbt post` again, creating a new review request. 3. Update the original review request with `rbt post -r <ID>`. 4. Publish both review requests. While it doesn't seem to break anymore (fortunately), it does result in two review requests with the same commit ID. We need to check more thoroughly that publishing a draft wouldn't result in a duplicate commit ID, before any actual publishing takes place.
-
- Fixed + Confirmed -
+ Component-Reviews
Seeing this in deployed Reviewboard 2.0.1 with a MySQL db. user doing PUT /api/review-requests/<ID>/draft/ and getting a 500 error. The exception is IntegrityError(1062, "Duplicate entry '.....' for key 'reviews_reviewrequest_b8c24015'") ... would a stack trace be helpful? The last bit of reviewboard code before all the django mysql stuff is: File "reviewboard/webapi/resources/review_request_draft.py", line 394, in update review_request.publish(user=request.user)