#1410 Issues update hook failing for a new project
Closed: Duplicate 7 years ago Opened 7 years ago by kushal.

I am trying to import issues from a fedora hosted project. The following error is coming the hook.

$  pgimport push atomic-wg.git
Enter passphrase for key '/home/kdas/.ssh/id_rsa':
remote: Files changed by new commits:        
remote:
remote: repo: atomic-wg None None        
remote: To load: 5287df4e481e4f3186dfeddb84b67008        
remote: Traceback (most recent call last):        
remote:   File "./hooks/post-receive.pagure-ticket", line 105, in <module>        
remote:     main(sys.argv[1:])        
remote:   File "./hooks/post-receive.pagure-ticket", line 101, in main        
remote:     run_as_post_receive_hook()        
remote:   File "./hooks/post-receive.pagure-ticket", line 97, in run_as_post_receive_hook        
remote:     json_data=json_data)        
remote:   File "/usr/lib/python2.7/site-packages/pagure/lib/git.py", line 454, in update_ticket_from_git        
remote:     notify=False,        
remote:   File "/usr/lib/python2.7/site-packages/pagure/lib/__init__.py", line 1198, in new_issue        
remote:     session.flush()        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 150, in do        
remote:     return getattr(self.registry(), name)(*args, **kwargs)        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 1919, in flush        
remote:     self._flush(objects)        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2037, in _flush        
remote:     transaction.rollback(_capture_exception=True)        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__        
remote:     compat.reraise(exc_type, exc_value, exc_tb)        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2001, in _flush        
remote:     flush_context.execute()        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 372, in execute        
remote:     rec.execute(self)        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 526, in execute        
remote:     uow        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 65, in save_obj        
remote:     mapper, table, insert)        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 570, in _emit_insert_statements        
remote:     execute(statement, multiparams)        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 729, in execute        
remote:     return meth(self, multiparams, params)        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py", line 322, in _execute_on_connection        
remote:     return connection._execute_clauseelement(self, multiparams, params)        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 826, in _execute_clauseelement        
remote:     compiled_sql, distilled_params        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 958, in _execute_context        
remote:     context)        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1159, in _handle_dbapi_exception        
remote:     exc_info        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause        
remote:     reraise(type(exception), exception, tb=exc_tb)        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_context        
remote:     context)        
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 436, in do_execute        
remote:     cursor.execute(statement, parameters)        
remote: sqlalchemy.exc.IntegrityError: (IntegrityError) insert or update on table "issues" violates foreign key constraint "issues_status_fkey"        
remote: DETAIL:  Key (status)=(Fixed) is not present in table "status_issue".        
remote:  'INSERT INTO issues (id, uid, project_id, title, content, user_id, assignee_id, status, private, priority, milestone, close_status, date_created, closed_at) VALUES (%(id)s, %(uid)s, %(project_id)s, %(title)s, %(content)s, %(user_id)s, %(assignee_id)s, %(status)s, %(private)s, %(priority)s, %(milestone)s, %(close_status)s, %(date_created)s, %(closed_at)s)' {'status': u'Fixed', 'content': u'I\'m currently testing the F22 Project Atomic as a guest on Windows 8.1 Client Hyper-V. I can convert the TC 2 beta qcow2 to vhdx via qemu-img, boot the disk with the credentials ISO in a Generation 1 Hyper-V guest, log in as "fedora", sudo to "root" and do a \'docker run\' pulling an image from Docker Hub.\r\n\r\nI still need to test browsing to a host-only network adapter from the Windows desktop but that\'s just a matter of reading a few more manuals. And generation 2 VMs don\'t work and would need to work for this to be supportable. So I would like to propose supporting this use case in Fedora 23. \r\n\r\nI don\'t have an effort estimate at the moment. A minimum task list so far would be:\r\n\r\n1. Operationalize the conversion from qcow2 to vhdx in the release process.\r\n2. Get generation 2 machines working. This may have to wait until Windows 10 ships.\r\n3. Define test scenarios and build Windows PowerShell scripts to execute them.\r\n4. Documentation!\r\n\r\nI\'ll volunteer for 3 and 4 for now - it\'s on my road map for my remix anyway.', 'user_id': 1856, 'uid': '5287df4e481e4f3186dfeddb84b67008', 'title': u'Proposed for Fedora 23 - Support for Windows 10 Client Hyper-V', 'private': False, 'id': 101, 'priority': None, 'assignee_id': None, 'milestone': None, 'date_created': datetime.datetime(2015, 3, 27, 16, 19, 8), 'project_id': 1240, 'closed_at': None, 'close_status': None}        
remote: Hook ./hooks/post-receive.pagure-ticket failed with error code 1        
To ssh://git@pagure.io/tickets/atomic-wg.git
 * [new branch]      master -> master

@pingou changed the status to Closed

7 years ago

Login to comment on this ticket.

Metadata