Strange issue with log insertion into wanna-build database using wbpy.
I'm running wanna-build setup with wbpy to insert logs into the
database. Some logs are failling to insert with errors like:
Jun 11 19:16:34 root CRITICAL exception caught outside main
Traceback (most recent call last):
File "/org/wbpy/wp-inject", line 126, in <module>
main()
File "/org/wbpy/wp-inject", line 90, in main
buildlog.store()
File "<string>", line 3, in __assert_MailedBuildLog_store_chk
File "/usr/lib/pymodules/python2.7/contract.py", line 1177, in
call_public_method_all
return _method_call_all(mro, method, va, ka)
File "/usr/lib/pymodules/python2.7/contract.py", line 1292, in
_method_call_all
return _call_all(a, func, va, ka)
File "/usr/lib/pymodules/python2.7/contract.py", line 1341, in _call_all
result = func.__assert_orig(*va, **ka)
File "lib/debwb/logs.py", line 311, in store
self._write_dbinfo()
File "<string>", line 3, in __assert_MailedBuildLog__write_dbinfo_chk
File "/usr/lib/pymodules/python2.7/contract.py", line 1254, in
call_private_method_all
return _method_call_all(getmro(cls), method, va, ka)
File "/usr/lib/pymodules/python2.7/contract.py", line 1292, in
_method_call_all
return _call_all(a, func, va, ka)
File "/usr/lib/pymodules/python2.7/contract.py", line 1341, in _call_all
result = func.__assert_orig(*va, **ka)
File "lib/debwb/logs.py", line 702, in _write_dbinfo
self.factory.dbfactory.conn.execute(sql)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1449, in execute
params)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1584, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1698, in _execute_context
context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1691, in _execute_context
context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py",
line 331, in do_execute
cursor.execute(statement, parameters)
ProgrammingError: (ProgrammingError) could not determine which collation
to use for string comparison
HINT: Use the COLLATE clause to set the collation explicitly.
'INSERT INTO armhf.pkg_history (package, distribution, version,
timestamp, result, builder, build_time, disk_space) VALUES (%(package)s,
%(distribution)s, %(version)s, %(timestamp)s, %(result)s, %(builder)s,
%(build_time)s, %(disk_space)s)' {'package': 'tseries', 'timestamp':
datetime.datetime(2013, 6, 11, 19, 16, 34), 'builder': 'Source Builder
<sbuild@debian-armhf>', 'build_time': 528, 'version': '0.10-31-1',
'result': 'successful', 'disk_space': 1355776, 'distribution':
'jessie-staging'}
The majority of logs insert successfully. The issue does not appear to
be random. If I try and pass a log that failed to insert to wp-inject
manually to retry the injection it will fail every time.
Any idea what might be going wrong and how to debug this? I am using
postgresql 9.1 (rather than the 8.4 used on buildd.debian.org) could
this be the cause of the problem?
Reply to: