apycot #2766223 duplicate using_revision relations [done]

sometimes (not clear why, possibly related to connection pool exhaustion?), narvalbot tries to create duplicate using_revision relations.

Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/narvalbot/delegates.py", line 289, in _execute
output = self._execute_target(input_set)
File "/usr/lib/python2.6/dist-packages/narvalbot/delegates.py", line 320, in _execute_target
output_dict = self.action['func'](args_d)
File "/var/lib/narval/plugins/apycot.py", line 77, in act_checkout
test.checkout(inputs['projectenv'])
File "/usr/lib/python2.6/dist-packages/apycotlib/atest.py", line 232, in checkout
self.writer.link_to_revision(pe, vcsrepo)
File "/usr/lib/python2.6/dist-packages/apycotlib/writer.py", line 209, in link_to_revision
'r': environment.repository.eid}):
File "/usr/lib/python2.6/dist-packages/narvalbot/__init__.py", line 298, in execute
return self._cu.execute(rql, kwargs)
File "/usr/lib/python2.6/dist-packages/cubicweb/dbapi.py", line 502, in execute
build_descr=build_descr, **self._txid())
File "/usr/lib/pymodules/python2.6/Pyro/core.py", line 384, in __call__
return self.__send(self.__name, args, kwargs)
File "/usr/lib/pymodules/python2.6/Pyro/core.py", line 459, in _invokePYRO
return self.adapter.remoteInvocation(name, Pyro.constants.RIF_VarargsAndKeywords, vargs, kargs)
File "/usr/lib/pymodules/python2.6/Pyro/protocol.py", line 439, in remoteInvocation
return self._remoteInvocation(method, flags, *args)
File "/usr/lib/pymodules/python2.6/Pyro/protocol.py", line 500, in _remoteInvocation
answer.raiseEx()
File "/usr/lib/pymodules/python2.6/Pyro/errors.py", line 72, in raiseEx
raise self.excObj
IntegrityError: duplicate key value violates unique constraint "using_revision_relation_p_key"

prioritynormal
typebug
done in2.2.5
load left0.000
closed by#58359ab60f98 Avoid duplicate using_revision relations (closes #2766223)
patchAvoid duplicate using_revision relations [applied]