I've been setting up Review Board 2.0 RC2, and found I got an HTTP 500
error with an IntegrityError when trying for a second time to post a review
from a git repository using 'rbt post'.

The first time, I'd forgotten to set the Mirror Path in the repository
configuration, so i got:

    ERROR: Error uploading diff

    One or more fields had errors (HTTP 400, API Error 105)

        path: fatal: Not a git repository: 'None'


    Your review request still exists, but the diff is not attached.

So I fixed the configuration and ran the command again, but this time got
an HTTP 500 error, with the following traceback in reviewboard.log:

(1062, "Duplicate entry '4f6666b8f4f5a58a4dab066544a650ccc145268b-98' for
key 'reviews_reviewrequest_b8c24015'")
Traceback (most recent call last):
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/core/handlers/base.py",
line 114, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/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-1.6.2-py2.7.egg/django/views/decorators/vary.py",
line 19, in inner_func
    response = func(*args, **kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/Djblets-0.8rc1-py2.7.egg/djblets/webapi/resources.py",
line 451, in __call__
    result = view(request, api_format=api_format, *args, **kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/Djblets-0.8rc1-py2.7.egg/djblets/webapi/resources.py",
line 669, in post
    return self.create(*args, **kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/Djblets-0.8rc1-py2.7.egg/djblets/webapi/decorators.py",
line 115, in _call
    return view_func(*args, **kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0rc2-py2.7.egg/reviewboard/webapi/decorators.py",
line 110, in _check
    return view_func(*args, **kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/Djblets-0.8rc1-py2.7.egg/djblets/webapi/decorators.py",
line 115, in _call
    return view_func(*args, **kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/Djblets-0.8rc1-py2.7.egg/djblets/webapi/decorators.py",
line 136, in _checklogin
    return view_func(*args, **kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/Djblets-0.8rc1-py2.7.egg/djblets/webapi/decorators.py",
line 115, in _call
    return view_func(*args, **kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/Djblets-0.8rc1-py2.7.egg/djblets/webapi/decorators.py",
line 115, in _call
    return view_func(*args, **kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/Djblets-0.8rc1-py2.7.egg/djblets/webapi/decorators.py",
line 285, in _validate
    return view_func(*args, **new_kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0rc2-py2.7.egg/reviewboard/webapi/resources/review_request.py",
line 561, in create
    create_from_commit_id=create_from_commit_id)
  File
"/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0rc2-py2.7.egg/reviewboard/reviews/managers.py",
line 139, in create
    review_request.save()
  File
"/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0rc2-py2.7.egg/reviewboard/reviews/models/review_request.py",
line 561, in save
    super(ReviewRequest, self).save(**kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0rc2-py2.7.egg/reviewboard/reviews/models/base_review_request_details.py",
line 256, in save
    super(BaseReviewRequestDetails, self).save(**kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/base.py",
line 545, in save
    force_update=force_update, update_fields=update_fields)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-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
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/base.py",
line 635, in _save_table
    forced_update)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/base.py",
line 679, in _do_update
    return filtered._update(values) > 0
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/query.py",
line 507, in _update
    return query.get_compiler(self.db).execute_sql(None)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/sql/compiler.py",
line 976, in execute_sql
    cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/models/sql/compiler.py",
line 782, in execute_sql
    cursor.execute(sql, params)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/backends/util.py",
line 53, in execute
    return self.cursor.execute(sql, params)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/utils.py",
line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/backends/util.py",
line 53, in execute
    return self.cursor.execute(sql, params)
  File
"/usr/local/lib/python2.7/dist-packages/Django-1.6.2-py2.7.egg/django/db/backends/mysql/base.py",
line 124, in execute
    return self.cursor.execute(query, args)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in
execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36,
in defaulterrorhandler
    raise errorclass, errorvalue
IntegrityError: (1062, "Duplicate entry
'4f6666b8f4f5a58a4dab066544a650ccc145268b-98' for key
'reviews_reviewrequest_b8c24015'")

I guess it should be possible to post the same changeset multiple times, or
there should be a better failure message?

-- 
Bruce

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to