IntegrityError: duplicate key value violates unique constraint "dashboard_app_testcase_test_id_5adbcd0c920afd4d_uniq"

Bug #813567 reported by Paul Larson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA Dashboard (deprecated)
Fix Released
Critical
Zygmunt Krynicki

Bug Description

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/dashboard_app/models.py", line 394, in deserialize
    self._do_deserialize(prefer_evolution)
  File "/usr/lib/pymodules/python2.7/dashboard_app/models.py", line 412, in _do_deserialize
    helper.deserialize(self, prefer_evolution)
  File "/usr/lib/pymodules/python2.7/dashboard_app/helpers.py", line 737, in deserialize
    importer().import_document(s_bundle, doc)
  File "/usr/lib/pymodules/python2.7/dashboard_app/helpers.py", line 64, in import_document
    self._import_document_with_transaction(s_bundle, doc)
  File "/usr/lib/pymodules/python2.7/django/db/transaction.py", line 299, in _commit_on_success
    res = func(*args, **kw)
  File "/usr/lib/pymodules/python2.7/dashboard_app/helpers.py", line 106, in _import_document_with_transaction
    self._import_document(s_bundle, doc)
  File "/usr/lib/pymodules/python2.7/dashboard_app/helpers.py", line 110, in _import_document
    self._import_test_run(c_test_run, s_bundle)
  File "/usr/lib/pymodules/python2.7/dashboard_app/helpers.py", line 152, in _import_test_run
    self._import_test_results(c_test_run, s_test_run)
  File "/usr/lib/pymodules/python2.7/dashboard_app/helpers.py", line 385, in _import_test_results
    self._import_test_cases_pgsql(c_test_results, s_test_run.test)
  File "/usr/lib/pymodules/python2.7/dashboard_app/helpers.py", line 465, in _import_test_cases_pgsql
    """ % (s_test.id, s_test.id))
  File "/usr/lib/pymodules/python2.7/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
    return self.cursor.execute(query, args)
IntegrityError: duplicate key value violates unique constraint "dashboard_app_testcase_test_id_5adbcd0c920afd4d_uniq"

It seems to happen if I submit a result where I have 2 results with the same test_case_id

Revision history for this message
Paul Larson (pwlars) wrote :

Here's the bundle where I first saw the error

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This only happens on PostgreSQL

Revision history for this message
Spring Zhang (qzhang) wrote :

You mean it is related to database?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

We use different import code for postgres and sqlite, and this was only a problem in the postgres version. Fixed in trunk now, we should release/deploy tomorrow I think.

Changed in lava-dashboard:
status: New → Fix Committed
Paul Larson (pwlars)
Changed in lava-dashboard:
milestone: none → 2011.07
importance: Undecided → Critical
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I'll package & deploy this

Changed in lava-dashboard:
assignee: nobody → Zygmunt Krynicki (zkrynicki)
Paul Larson (pwlars)
Changed in lava-dashboard:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers