Learn more about these different git repos.
Other Git URLs
While doing following in a git bare repo to mirror to a repository on pagure
git push --mirror
Following condition occurs
remote: Resolving deltas: 100% (2740/2740), done. remote: Running hooks for somegroup/somerepo remote: Traceback (most recent call last): remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context remote: context) remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute remote: cursor.execute(statement, parameters) remote: psycopg2.ProgrammingError: column hook_mirror.public_key does not exist remote: LINE 1: ...ect_id, hook_mirror.active AS hook_mirror_active, hook_mirro... remote: ^ remote: remote: remote: The above exception was the direct cause of the following exception: remote: remote: Traceback (most recent call last): remote: File "hooks/pre-receive", line 24, in <module> remote: run_hook_file(hooktype) remote: File "/usr/lib/python3.7/site-packages/pagure/hooks/__init__.py", line 513, in run_hook_file remote: pull_request, remote: File "/usr/lib/python3.7/site-packages/pagure/hooks/__init__.py", line 355, in run_project_hooks remote: for plugin, _ in get_enabled_plugins(project, with_default=True): remote: File "/usr/lib/python3.7/site-packages/pagure/lib/plugins.py", line 73, in get_enabled_plugins remote: if hasattr(project, plugin.backref): remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/orm/attributes.py", line 242, in __get__ remote: return self.impl.get(instance_state(instance), dict_) remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/orm/attributes.py", line 601, in get remote: value = self.callable_(state, passive) remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/orm/strategies.py", line 631, in _load_for_state remote: session, state, primary_key_identity, passive) remote: File "<string>", line 1, in <lambda> remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/orm/strategies.py", line 771, in _emit_lazyload remote: with_post_criteria(set_default_params).all() remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/ext/baked.py", line 457, in all remote: return list(self) remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/ext/baked.py", line 364, in __iter__ remote: return q._execute_and_instances(context) remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/orm/query.py", line 3018, in _execute_and_instances remote: result = conn.execute(querycontext.statement, self._params) remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute remote: return meth(self, multiparams, params) remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection remote: return connection._execute_clauseelement(self, multiparams, params) remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement remote: compiled_sql, distilled_params remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context remote: context) remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception remote: exc_info remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/util/compat.py", line 265, in raise_from_cause remote: reraise(type(exception), exception, tb=exc_tb, cause=cause) remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/util/compat.py", line 248, in reraise remote: raise value.with_traceback(tb) remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context remote: context) remote: File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute remote: cursor.execute(statement, parameters) remote: sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) column hook_mirror.public_key does not exist remote: LINE 1: ...ect_id, hook_mirror.active AS hook_mirror_active, hook_mirro... remote: ^ remote: [SQL: 'SELECT hook_mirror.id AS hook_mirror_id, hook_mirror.project_id AS hook_mirror_project_id, hook_mirror.active AS hook_mirror_active, hook_mirror.public_key AS hook_mirror_public_key, hook_mirror.target AS hook_mirror_target, hook_mirror.last_log AS hook_mirror_last_log \nFROM hook_mirror \nWHERE %(param_1)s = hook_mirror.project_id'] [parameters: {'param_1': 292}] (Background on this error at: http://sqlalche.me/e/f405) To https://pagure.some.tld/git/somegroup/somerepo.git ! [remote rejected] develop -> develop (pre-receive hook declined)
The underlying database is not up to date, what are alembic current and alembic history returning in the folder where is located the corresponding alembic.ini?
alembic current
alembic history
alembic.ini
# alembic-3 -c /etc/pagure/alembic.ini current Using configuration file `/etc/pagure/pagure.cfg` INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. f16ab75e4d32 (head)
# alembic-3 -c /etc/pagure/alembic.ini history 0a8f99c161e2 -> f16ab75e4d32 (head), Migrate SSH keys to the new format. ba538b2648b7 -> 0a8f99c161e2, Add an index on ssh_search_key 19b67f4b9fe4 -> ba538b2648b7, create hook_mirror table ef98dcb838e4 -> 19b67f4b9fe4, Add repoSpanner region column e34e799e4182 -> ef98dcb838e4, add_reactions_to_request_comments.py 131ad2dc5bbd -> e34e799e4182, add_reactions_to_comments 5bb80aeb238d -> 131ad2dc5bbd, Table for no new branches hook 7f31a9fad89f -> 5bb80aeb238d, refuse_sessions_before 369deb8c8b63 -> 7f31a9fad89f, expand enum for lock types eab41ce5f92a -> 369deb8c8b63, Add the pr_to_issue table e18d5b78d782 -> eab41ce5f92a, add active_commit attribute to the hook_pagure_ci table 22fb5256f555 -> e18d5b78d782, Add ci_job attribute to the hook_pagure_ci table 5affe6f5d94f -> 22fb5256f555, Update RTD table 46df6466b8fa -> 5affe6f5d94f, new_api_token_acl 61ac23e35f86 -> 46df6466b8fa, drop pull_request_check 47f5fab6f46a -> 61ac23e35f86, Fix pr project_from key a13967424130 -> 47f5fab6f46a, private pull-request 01e58ee9eccb -> a13967424130, Add PR tags table 6119fbbcc8e9 -> 01e58ee9eccb, Adjust constraints on pull_request_flags 2b626a16542e -> 6119fbbcc8e9, Migrate current flag 2fb229dac744 -> 2b626a16542e, commit flag e4dbfcd20f42 -> 2fb229dac744, Store the milestone keys 21292448a775 -> e4dbfcd20f42, Add default_priority to projects 3237fc64b306 -> 21292448a775, Update ACLs descriptions c34f4b09ef18 -> 3237fc64b306, Read Only mode in projects 8a5d68f74beb -> c34f4b09ef18, star_a_project 27a79ff0fb41 -> 8a5d68f74beb, Add date_modified for project 5179e99d35a5 -> 27a79ff0fb41, Add modify_project ACL d4d2c5aa8a0 -> 5179e99d35a5, Add lock types 4255158a6913 -> d4d2c5aa8a0, Add granularity to watching repos 4df75d40bafa -> 4255158a6913, Create private column in project table 3ffec872dfdf -> 4df75d40bafa, Log the token used when flagging a PR 770149d96e24 -> 3ffec872dfdf, Add a description to api token 11470abae0d6 -> 770149d96e24, nullable project for api token 987edda096f5 -> 11470abae0d6, Add key_notify to the issues_keys table 8a3b10926153 -> 987edda096f5, access_id in user_projects 38581a8fbae2 -> 8a3b10926153, Create deploy keys table 6addaed6008e -> 38581a8fbae2, Add custom field data 208b0cd232ab -> 6addaed6008e, Add description for tags 588eabcd394c -> 208b0cd232ab, colored tags 349a3890596 -> 588eabcd394c, add quick_replies field to project 114d3a68c1fd -> 349a3890596, Increase length group name 5083efccac7 -> 114d3a68c1fd, add last_update to issues and pull-requests 26af5c3602a0 -> 5083efccac7, Create the _settings fields for user 644ef887bb6f -> 26af5c3602a0, Add the default hook to all projects 368fd931cf7f -> 644ef887bb6f, Add close status 36386a60b3fd -> 368fd931cf7f, Add the notifications column to projects 350efb3f6baf -> 36386a60b3fd, Add milestone to issues 1640c7d75e5f -> 350efb3f6baf, Add namespace to project 1d18843a1994 -> 1640c7d75e5f, Add reports field to project 32d636cb5e00 -> 1d18843a1994, Add is_fork column to projects 43df5e588a87 -> 32d636cb5e00, display_name_in_groups 22db0a833d35 -> 43df5e588a87, add_closed_at_attribute_in_issues 317a285e04a8 -> 22db0a833d35, Add notifications to tickets 2aa7b3958bc5 -> 317a285e04a8, Delete hooks 443e090da188 -> 2aa7b3958bc5, Add the milestones column 496f7a700f2e -> 443e090da188, up to 255 characters for project.name 4cae55a80a42 -> 496f7a700f2e, Add priorities 1f3de3853a1a -> 4cae55a80a42, Add the initial_comment on the PR table 58e60d869326 -> 1f3de3853a1a, Add the tree_id column to PR inline comments 1b6d7dc5600a -> 58e60d869326, add notification bool to PR 3b441ef4e928 -> 1b6d7dc5600a, versioning_passwords 15ea3c2cf83d -> 3b441ef4e928, Adding column to store edited_by and edited_on a issue comment 1cd0a853c697 -> 15ea3c2cf83d, Adding column to store edited_by and edited_on a PR comment 6190226bed0 -> 1cd0a853c697, Add closed_at field in PR 257a7ce22682 -> 6190226bed0, Add the updated_on column to pull-requests 36116bb7a69b -> 257a7ce22682, Add the remote_git entry abc71fd60fa -> 36116bb7a69b, Add the url field to project 298891e63039 -> abc71fd60fa, Add the closed_by column to pull_requests 3c25e14b855b -> 298891e63039, Change the status of pull_requests b5efae6bb23 -> 3c25e14b855b, add an avatar email for project <base> -> b5efae6bb23, Add merge status to the pull_requests table
It looks like this migration had some issue: 19b67f4b9fe4 -> ba538b2648b7, create hook_mirror table
19b67f4b9fe4 -> ba538b2648b7, create hook_mirror table
You can try to re-run it with these steps: - backup the existing database, just in case :) - Go to the base migration: alembic stamp 19b67f4b9fe4 - Re-run just that migration: alembic upgrade +1 - Go back to the latest migration: alembic stamp f16ab75e4d32
alembic stamp 19b67f4b9fe4
alembic upgrade +1
alembic stamp f16ab75e4d32
That being said, it is annoying that it happened :(
i couldn't find any reference to # grep -R public_key /usr/share/pagure/alembic/versions but i will try this out
It fails:
# alembic-3 -c /etc/pagure/alembic.ini stamp 19b67f4b9fe4 Using configuration file `/etc/pagure/pagure.cfg` INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running stamp_revision f16ab75e4d32 -> 19b67f4b9fe4
# alembic-3 -c /etc/pagure/alembic.ini upgrade +1 Using configuration file `/etc/pagure/pagure.cfg` INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. INFO [alembic.runtime.migration] Running upgrade 19b67f4b9fe4 -> ba538b2648b7, create hook_mirror table Traceback (most recent call last): File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context context) File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute cursor.execute(statement, parameters) psycopg2.ProgrammingError: relation "hook_mirror" already exists The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/bin/alembic-3", line 11, in <module> load_entry_point('alembic==1.0.0', 'console_scripts', 'alembic')() File "/usr/lib/python3.7/site-packages/alembic/config.py", line 486, in main CommandLine(prog=prog).main(argv=argv) File "/usr/lib/python3.7/site-packages/alembic/config.py", line 480, in main self.run_cmd(cfg, options) File "/usr/lib/python3.7/site-packages/alembic/config.py", line 463, in run_cmd **dict((k, getattr(options, k, None)) for k in kwarg) File "/usr/lib/python3.7/site-packages/alembic/command.py", line 254, in upgrade script.run_env() File "/usr/lib/python3.7/site-packages/alembic/script/base.py", line 427, in run_env util.load_python_file(self.dir, 'env.py') File "/usr/lib/python3.7/site-packages/alembic/util/pyfiles.py", line 81, in load_python_file module = load_module_py(module_id, path) File "/usr/lib/python3.7/site-packages/alembic/util/compat.py", line 82, in load_module_py spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/usr/share/pagure/alembic/env.py", line 90, in <module> run_migrations_online() File "/usr/share/pagure/alembic/env.py", line 84, in run_migrations_online context.run_migrations() File "<string>", line 8, in run_migrations File "/usr/lib/python3.7/site-packages/alembic/runtime/environment.py", line 836, in run_migrations self.get_context().run_migrations(**kw) File "/usr/lib/python3.7/site-packages/alembic/runtime/migration.py", line 330, in run_migrations step.migration_fn(**kw) File "/usr/share/pagure/alembic/versions/ba538b2648b7_create_hook_mirror_table.py", line 39, in upgrade default=False File "<string>", line 8, in create_table File "<string>", line 3, in create_table File "/usr/lib/python3.7/site-packages/alembic/operations/ops.py", line 1120, in create_table return operations.invoke(op) File "/usr/lib/python3.7/site-packages/alembic/operations/base.py", line 319, in invoke return fn(self, operation) File "/usr/lib/python3.7/site-packages/alembic/operations/toimpl.py", line 101, in create_table operations.impl.create_table(table) File "/usr/lib/python3.7/site-packages/alembic/ddl/impl.py", line 190, in create_table self._exec(schema.CreateTable(table)) File "/usr/lib/python3.7/site-packages/alembic/ddl/impl.py", line 115, in _exec return conn.execute(construct, *multiparams, **params) File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute return meth(self, multiparams, params) File "/usr/lib64/python3.7/site-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection return connection._execute_ddl(self, multiparams, params) File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1009, in _execute_ddl compiled File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context context) File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception exc_info File "/usr/lib64/python3.7/site-packages/sqlalchemy/util/compat.py", line 265, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/usr/lib64/python3.7/site-packages/sqlalchemy/util/compat.py", line 248, in reraise raise value.with_traceback(tb) File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context context) File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation "hook_mirror" already exists [SQL: '\nCREATE TABLE hook_mirror (\n\tid INTEGER NOT NULL, \n\tproject_id INTEGER NOT NULL, \n\tactive BOOLEAN NOT NULL, \n\tCONSTRAINT hook_mirror_pkey PRIMARY KEY (id, project_id), \n\tCONSTRAINT hook_mirror_project_id_fkey FOREIGN KEY(project_id) REFERENCES projects (id) ON DELETE CASCADE ON UPDATE CASCADE\n)\n\n'] (Background on this error at: http://sqlalche.me/e/f405)
as you see the create statement does not say anything about public_key.
Arf, this should have hit me sooner, it's not a DB schema issue. The issue is in the pagure-mirroring code. It looks like the pagure-mirror plugin doesn't get properly loaded or so.
Is there a way to debug this?
[Sun Dec 02 18:25:09.649242 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] mod_wsgi (pid=24303): Exception occurred processing WSGI script '/usr/share/pagure/pagure.wsgi'. [Sun Dec 02 18:25:09.659488 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] Traceback (most recent call last): [Sun Dec 02 18:25:09.659572 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context [Sun Dec 02 18:25:09.659586 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] context) [Sun Dec 02 18:25:09.659605 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute [Sun Dec 02 18:25:09.659615 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] cursor.execute(statement, parameters) [Sun Dec 02 18:25:09.659654 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] psycopg2.ProgrammingError: column hook_mirror.public_key does not exist [Sun Dec 02 18:25:09.659667 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] LINE 1: ...ect_id, hook_mirror.active AS hook_mirror_active, hook_mirro... [Sun Dec 02 18:25:09.659676 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] ^ [Sun Dec 02 18:25:09.659685 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] [Sun Dec 02 18:25:09.659705 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] [Sun Dec 02 18:25:09.659715 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] The above exception was the direct cause of the following exception: [Sun Dec 02 18:25:09.659724 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] [Sun Dec 02 18:25:09.659741 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] Traceback (most recent call last): [Sun Dec 02 18:25:09.659956 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/flask/app.py", line 2309, in __call__ [Sun Dec 02 18:25:09.659972 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] return self.wsgi_app(environ, start_response) [Sun Dec 02 18:25:09.659991 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/pagure/proxy.py", line 74, in __call__ [Sun Dec 02 18:25:09.660001 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] return self.app(environ, start_response) [Sun Dec 02 18:25:09.660018 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/flask/app.py", line 2295, in wsgi_app [Sun Dec 02 18:25:09.660049 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] response = self.handle_exception(e) [Sun Dec 02 18:25:09.660068 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/flask/app.py", line 1741, in handle_exception [Sun Dec 02 18:25:09.660078 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] reraise(exc_type, exc_value, tb) [Sun Dec 02 18:25:09.660248 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise [Sun Dec 02 18:25:09.660259 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] raise value [Sun Dec 02 18:25:09.660276 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app [Sun Dec 02 18:25:09.660286 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] response = self.full_dispatch_request() [Sun Dec 02 18:25:09.660303 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request [Sun Dec 02 18:25:09.660314 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] rv = self.handle_user_exception(e) [Sun Dec 02 18:25:09.660331 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception [Sun Dec 02 18:25:09.660341 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] reraise(exc_type, exc_value, tb) [Sun Dec 02 18:25:09.660358 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise [Sun Dec 02 18:25:09.660368 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] raise value [Sun Dec 02 18:25:09.660384 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request [Sun Dec 02 18:25:09.660394 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] rv = self.dispatch_request() [Sun Dec 02 18:25:09.660411 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request [Sun Dec 02 18:25:09.660422 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] return self.view_functions[rule.endpoint](**req.view_args) [Sun Dec 02 18:25:09.660438 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/pagure/utils.py", line 244, in decorated_function [Sun Dec 02 18:25:09.660448 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] return function(*args, **kwargs) [Sun Dec 02 18:25:09.660466 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/pagure/decorators.py", line 80, in check_repo_admin [Sun Dec 02 18:25:09.660476 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] return function(*args, **kwargs) [Sun Dec 02 18:25:09.660492 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib/python3.7/site-packages/pagure/ui/plugins.py", line 101, in view_plugin [Sun Dec 02 18:25:09.660502 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] if hasattr(repo, plugin.backref): [Sun Dec 02 18:25:09.660520 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/orm/attributes.py", line 242, in __get__ [Sun Dec 02 18:25:09.660539 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] return self.impl.get(instance_state(instance), dict_) [Sun Dec 02 18:25:09.660558 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/orm/attributes.py", line 601, in get [Sun Dec 02 18:25:09.660568 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] value = self.callable_(state, passive) [Sun Dec 02 18:25:09.660585 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/orm/strategies.py", line 631, in _load_for_state [Sun Dec 02 18:25:09.660596 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] session, state, primary_key_identity, passive) [Sun Dec 02 18:25:09.660612 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "<string>", line 1, in <lambda> [Sun Dec 02 18:25:09.660630 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/orm/strategies.py", line 771, in _emit_lazyload [Sun Dec 02 18:25:09.660640 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] with_post_criteria(set_default_params).all() [Sun Dec 02 18:25:09.660656 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/ext/baked.py", line 457, in all [Sun Dec 02 18:25:09.660666 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] return list(self) [Sun Dec 02 18:25:09.660683 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/ext/baked.py", line 364, in __iter__ [Sun Dec 02 18:25:09.660693 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] return q._execute_and_instances(context) [Sun Dec 02 18:25:09.660711 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/orm/query.py", line 3018, in _execute_and_instances [Sun Dec 02 18:25:09.660721 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] result = conn.execute(querycontext.statement, self._params) [Sun Dec 02 18:25:09.660738 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 948, in execute [Sun Dec 02 18:25:09.660748 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] return meth(self, multiparams, params) [Sun Dec 02 18:25:09.660765 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection [Sun Dec 02 18:25:09.660775 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] return connection._execute_clauseelement(self, multiparams, params) [Sun Dec 02 18:25:09.660792 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement [Sun Dec 02 18:25:09.660802 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] compiled_sql, distilled_params [Sun Dec 02 18:25:09.660818 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context [Sun Dec 02 18:25:09.660828 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] context) [Sun Dec 02 18:25:09.660845 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception [Sun Dec 02 18:25:09.660862 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] exc_info [Sun Dec 02 18:25:09.660894 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/util/compat.py", line 265, in raise_from_cause [Sun Dec 02 18:25:09.660907 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] reraise(type(exception), exception, tb=exc_tb, cause=cause) [Sun Dec 02 18:25:09.660924 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/util/compat.py", line 248, in reraise [Sun Dec 02 18:25:09.660934 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] raise value.with_traceback(tb) [Sun Dec 02 18:25:09.660951 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context [Sun Dec 02 18:25:09.660961 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] context) [Sun Dec 02 18:25:09.660978 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] File "/usr/lib64/python3.7/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute [Sun Dec 02 18:25:09.660988 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] cursor.execute(statement, parameters) [Sun Dec 02 18:25:09.661023 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) column hook_mirror.public_key does not exist [Sun Dec 02 18:25:09.661037 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] LINE 1: ...ect_id, hook_mirror.active AS hook_mirror_active, hook_mirro... [Sun Dec 02 18:25:09.661045 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] ^ [Sun Dec 02 18:25:09.661056 2018] [wsgi:error] [pid 24303:tid 140122099640064] [remote 1.2.3.4:38092] [SQL: 'SELECT hook_mirror.id AS hook_mirror_id, hook_mirror.project_id AS hook_mirror_project_id, hook_mirror.active AS hook_mirror_active, hook_mirror.public_key AS hook_mirror_public_key, hook_mirror.target AS hook_mirror_target, hook_mirror.last_log AS hook_mirror_last_log \\nFROM hook_mirror \\nWHERE %(param_1)s = hook_mirror.project_id'] [parameters: {'param_1': 292}] (Background on this error at: http://sqlalche.me/e/f405)
Does this help, at least it's called during the settings view when clicking on the mirroring plugin.
I think I've found it, it was in fact fixed in 5.1.4 see the changelog: https://pagure.io/pagure/c/205e6789fee12b9e152bdf989de3b85b8258d398?branch=rel_5.1.z
I'll edit the changelog to also include the other option to fix this:
Running the following SQL queries by hand directly:
ALTER TABLE hook_mirror ADD COLUMN 'public_key' TEXT; ALTER TABLE hook_mirror ADD COLUMN 'target' TEXT; ALTER TABLE hook_mirror ADD COLUMN 'last_log' TEXT;
Metadata Update from @pingou: - Issue assigned to pingou - Issue set to the milestone: 5.2 - Issue tagged with: bug, doc
See PR: https://pagure.io/pagure/pull-request/4122
Commit 974be5d fixes this issue
solves the issue, thank you!
On Wed, Dec 12, 2018 at 5:03 PM Pierre-YvesChibon pagure@pagure.io wrote:
The status of the issue: column hook_mirror.public_key does not exist of project: pagure has been updated to: Closed as Fixed by pingou. https://pagure.io/pagure/issue/4089
The status of the issue: column hook_mirror.public_key does not exist of project: pagure has been updated to: Closed as Fixed by pingou.
column hook_mirror.public_key does not exist
pagure
https://pagure.io/pagure/issue/4089
Login to comment on this ticket.