#8163 "ProgrammingError" Python backtrace when pushing to modular dist-git
Closed: Fixed 4 years ago by pingou. Opened 4 years ago by mbooth.

I see this when pushing to dist-git:

[mbooth@thinkpad-p50 eclipse]$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 469 bytes | 469.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Emitting a message to the fedmsg bus.
remote: * Publishing information for 1 commits
remote: Traceback (most recent call last):
remote:   File "/usr/lib/python2.7/site-packages/pagure/hooks/__init__.py", line 394, in run_project_hooks
remote:     changes=changes,
remote:   File "/usr/lib/python2.7/site-packages/pagure/hooks/__init__.py", line 111, in runhook
remote:     changes=changes,
remote:   File "/usr/lib/python2.7/site-packages/pagure/hooks/default.py", line 421, in post_receive
remote:     but_uids=pr_uids,
remote:   File "/usr/lib/python2.7/site-packages/celery/local.py", line 191, in __call__
remote:     return self._get_current_object()(*a, **kw)
remote:   File "/usr/lib/python2.7/site-packages/celery/app/task.py", line 375, in __call__
remote:     return self.run(*args, **kwargs)
remote:   File "/usr/lib/python2.7/site-packages/pagure/lib/tasks_utils.py", line 36, in decorated_function
remote:     return function(self, session, *args, **kwargs)
remote:   File "/usr/lib/python2.7/site-packages/pagure/lib/tasks.py", line 696, in refresh_pr_cache
remote:     session, project, but_uids=but_uids
remote:   File "/usr/lib/python2.7/site-packages/pagure/lib/query.py", line 3411, in reset_status_pull_request
remote:     {model.PullRequest.merge_status: None}, synchronize_session=False
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/query.py", line 2796, in update
remote:     update_op.exec_()
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 897, in exec_
remote:     self._do_exec()
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 995, in _do_exec
remote:     update_stmt, params=self.query._params)
remote:   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 991, in execute
remote:     bind, close_with_result=True).execute(clause, params or {})
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: ProgrammingError: (ProgrammingError) permission denied for relation pull_requests
remote:  'UPDATE pull_requests SET merge_status=%(merge_status)s, last_updated=%(last_updated)s WHERE pull_requests.project_id = %(project_id_1)s AND pull_requests.status = %(status_1)s' {'project_id
_1': 34012, 'last_updated': datetime.datetime(2019, 9, 2, 13, 17, 58, 853997), 'merge_status': None, 'status_1': u'Open'}
remote: Sending to redis to log activity and send commit notification emails
remote: * Publishing information for 1 commits
To ssh://pkgs.fedoraproject.org/modules/eclipse
   bd9c40a..92fbbf6  2019-06 -> 2019-06

Note that the push appears to succeed anyway.


Can you replicate this or was it a one-time error?

I experienced it 2 out of 2 times so far today.

Metadata Update from @kevin:
- Issue priority set to: Waiting on Assignee (was: Needs Review)
- Issue tagged with: pagure, src.fp.o

4 years ago

Ok, I've found and (hot)fixed the issue I believe.

Going to push it upstream and likely cut a release as I have another fix I'd like to get out there :)

Sorry for the inconvenience and please let me know if it happens again!

Metadata Update from @pingou:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

4 years ago

Log in to comment on this ticket.

Metadata