Collect script fails with "sqlite3.IntegrityError: column name is not unique"

Bug #996948 reported by Данило Шеган
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
status.linaro.org
Fix Released
Critical
Milo Casagrande

Bug Description

As seen on linaro-infrastructure-errors list:

Traceback (most recent call last):
  File "./collect", line 791, in <module>
    main()
  File "./collect", line 780, in main
    lp_import(collector, cfg, opts.pattern)
  File "./collect", line 482, in lp_import
    people_cache=people_cache, projects=non_distro_projects)
  File "./collect", line 199, in lp_import_blueprint_workitems
    Blueprint, Blueprint.name == bp.name).one()
  File "/usr/lib/python2.6/dist-packages/storm/store.py", line 206, in find
    self.flush()
  File "/usr/lib/python2.6/dist-packages/storm/store.py", line 486, in flush
    self._flush_one(obj_info)
  File "/usr/lib/python2.6/dist-packages/storm/store.py", line 523, in _flush_one
    result = self._connection.execute(expr)
  File "/usr/lib/python2.6/dist-packages/storm/database.py", line 217, in execute
    raw_cursor = self.raw_execute(statement, params)
  File "/usr/lib/python2.6/dist-packages/storm/databases/sqlite.py", line 153, in raw_execute
    return Connection.raw_execute(self, statement, params)
  File "/usr/lib/python2.6/dist-packages/storm/database.py", line 299, in raw_execute
    self._check_disconnect(raw_cursor.execute, *args)
  File "/usr/lib/python2.6/dist-packages/storm/database.py", line 342, in _check_disconnect
    return function(*args, **kwargs)
sqlite3.IntegrityError: column name is not unique
collect failed for current

Related branches

Revision history for this message
Данило Шеган (danilo) wrote :

The problem is with the following blueprints using the same base-name which is used as the key in launchpad-work-items-tracker:

  * https://blueprints.launchpad.net/lava-lab/+spec/ni-power-meter
  * https://blueprints.launchpad.net/linaro-android/+spec/ni-power-meter

Revision history for this message
Данило Шеган (danilo) wrote :
Changed in linaro-status-website:
importance: Critical → Medium
Revision history for this message
Данило Шеган (danilo) wrote :

This would require refactoring the entire launchpad-work-items-tracker blueprints model code, which we don't want to spend time on.

Revision history for this message
Данило Шеган (danilo) wrote :

What we'll do instead is make this a warning and make a nicer error message that is sent to people who can do something about blueprints with identical names.

Changed in linaro-status-website:
milestone: 2012.05 → backlog
assignee: Данило Шеган (danilo) → nobody
Fathi Boudra (fboudra)
Changed in linaro-status-website:
milestone: backlog → none
Revision history for this message
Fathi Boudra (fboudra) wrote :

Issue re-appeared since 3 days:
Traceback (most recent call last):
  File "./collect", line 852, in <module>
    main()
  File "./collect", line 841, in main
    lp_import(collector, cfg, opts.pattern)
  File "./collect", line 524, in lp_import
    people_cache=people_cache, projects=non_distro_projects)
  File "./collect", line 227, in lp_import_blueprint_workitems
    Blueprint, Blueprint.name == bp.name).one()
  File "/usr/lib/python2.6/dist-packages/storm/store.py", line 206, in find
    self.flush()
  File "/usr/lib/python2.6/dist-packages/storm/store.py", line 486, in flush
    self._flush_one(obj_info)
  File "/usr/lib/python2.6/dist-packages/storm/store.py", line 523, in _flush_one
    result = self._connection.execute(expr)
  File "/usr/lib/python2.6/dist-packages/storm/database.py", line 217, in execute
    raw_cursor = self.raw_execute(statement, params)
  File "/usr/lib/python2.6/dist-packages/storm/databases/sqlite.py", line 153, in raw_execute
    return Connection.raw_execute(self, statement, params)
  File "/usr/lib/python2.6/dist-packages/storm/database.py", line 299, in raw_execute
    self._check_disconnect(raw_cursor.execute, *args)
  File "/usr/lib/python2.6/dist-packages/storm/database.py", line 342, in _check_disconnect
    return function(*args, **kwargs)
sqlite3.IntegrityError: column name is not unique
collect failed for current

Revision history for this message
Loïc Minier (lool) wrote :

Marking Critical again while we have an actual name conflict to resolve

Changed in linaro-status-website:
importance: Medium → Critical
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

<pfalcon> lool: do you understand right that just better diagnostics would be enough as a resolution?
<lool> pfalcon: I guess it would be nice to have enough debug to quickly resolve such cases manually

Changed in linaro-status-website:
importance: Critical → High
milestone: none → 2012.10
importance: High → Critical
Milo Casagrande (milo)
Changed in linaro-status-website:
assignee: nobody → Milo Casagrande (milo)
Revision history for this message
Milo Casagrande (milo) wrote :

Just a quick update. From running the 'collect' script locally, I can see at least this Bluperint that is causing the error:

ni-power-meter

Milo Casagrande (milo)
Changed in linaro-status-website:
status: Triaged → In Progress
Milo Casagrande (milo)
Changed in linaro-status-website:
status: In Progress → Fix Committed
Revision history for this message
Milo Casagrande (milo) wrote :

After a brief chat on IRC with Fathi, he already fixed the duplicated Blueprint name.
The logger warning has also already been deployed on status.l.o.

Changed in linaro-status-website:
status: Fix Committed → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

Don't we want to keep this bug open (as minor) for the work to make status.l.o able to support multiple blueprints with the same name? Or perhaps it should be wontfix, don't know

Revision history for this message
Milo Casagrande (milo) wrote : Re: [Bug 996948] Re: Collect script fails with "sqlite3.IntegrityError: column name is not unique"

On Wed, Oct 10, 2012 at 6:28 PM, Loïc Minier <email address hidden> wrote:
> Don't we want to keep this bug open (as minor) for the work to make
> status.l.o able to support multiple blueprints with the same name? Or
> perhaps it should be wontfix, don't know

Do not know either to be honest.
Reading previous comments I was under the impression to just enable
status.l.o to log the problematic Blueprint, and notify people
(probably this last part should be worked on indeed).

--
Milo Casagrande
Infrastructure Engineer
Linaro.org <www.linaro.org> │ Open source software for ARM SoCs

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.