Fixed in release-2.0.x (eec377b). Thanks!
- PendingReview + Fixed
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
(Actually, I imagine it just doesn't crash because it's SQLite3, which I think is less strict?)
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)
I think that yours is a separate bug. Would you mind filing it, and including the stack trace?