#2587: Buildbot doesn't accept changes done by the same user for different
repositories
-----------------------+----------------------------
Reporter:  jollyroger  |      Owner:
    Type:  defect      |     Status:  new
Priority:  major       |  Milestone:  undecided
 Version:  0.8.8       |   Keywords:  database users
-----------------------+----------------------------
 If you try to push two similar changes (for example, with changesource
 command) that differ only by VCS type (passed as --vc argument, for
 example, git and svn), the second one won't be added and master will raise
 the following exception:

 {{{
 2013-11-16 00:39:36+0200 [Broker,1,127.0.0.1] perspective_addChange called
 2013-11-16 00:39:36+0200 [-] Peer will receive following PB traceback:
 2013-11-16 00:39:36+0200 [-] Unhandled Error
 Traceback (most recent call last):
 File "/usr/lib/python2.7/threading.py", line 781, in __bootstrap
 self.__bootstrap_inner()
 File "/usr/lib/python2.7/threading.py", line 808, in __bootstrap_inner
 self.run()
 File "/usr/lib/python2.7/threading.py", line 761, in run
 self.__target(*self.__args, **self.__kwargs)
 --- <exception caught here> ---
 File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line
 172, in _worker
 result = context.call(ctx, function, *args, **kwargs)
 File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line
 118, in callWithContext
 return self.currentContext().callWithContext(ctx, func, *args, **kw)
 File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line
 81, in callWithContext
 return func(*args,**kw)
 File "/usr/lib/python2.7/dist-packages/buildbot/db/pool.py", line 184, in
 __thd
 rv = callable(arg, *args, **kwargs)
 File "/usr/lib/python2.7/dist-packages/buildbot/db/users.py", line 67, in
 thd
 return thd(conn, no_recurse=True)
 File "/usr/lib/python2.7/dist-packages/buildbot/db/users.py", line 52, in
 thd
 r = conn.execute(tbl.insert(), dict(identifier=identifier))
 File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
 662, in execute
 params)
 File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
 761, in _execute_clauseelement
 compiled_sql, distilled_params
 File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
 874, in _execute_context
 context)
 File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
 1024, in _handle_dbapi_exception
 exc_info
 File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line
 196, in raise_from_cause
 reraise(type(exception), exception, tb=exc_tb)
 File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
 867, in _execute_context
 context)
 File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line
 324, in do_execute
 cursor.execute(statement, parameters)
 sqlalchemy.exc.IntegrityError: (IntegrityError) column identifier is not
 unique u'INSERT INTO users (identifier) VALUES (?)' (u'User Name
 <[email protected]>',)
 }}}

 Database will not contain anything about second user as well as the change
 info. Possible database contents:

 {{{
 #!sql
 CREATE TABLE users (
 uid INTEGER NOT NULL,
 identifier VARCHAR(256) NOT NULL, bb_username VARCHAR(128), bb_password
 VARCHAR(128),
 PRIMARY KEY (uid)
 );
 INSERT INTO users VALUES(1,'User Name <[email protected]>',NULL,NULL);
 CREATE TABLE users_info (
 uid INTEGER NOT NULL,
 attr_type VARCHAR(128) NOT NULL,
 attr_data VARCHAR(128) NOT NULL,
 FOREIGN KEY(uid) REFERENCES users (uid)
 );
 INSERT INTO users_info VALUES(1,'git','User Name
 <[email protected]>');
 }}}

 Comments from djmitche:

   basically, Buildbot's unable to find the git user with the svn
 informatoin [[BR]]
   but both have the same identifier[[BR]]
   it really should invent a new and different identifier in that case

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2587>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits

Reply via email to