From cc at pw-wspx.org Wed Nov 20 09:13:07 2024 From: cc at pw-wspx.org (Ed Wong) Date: Wed, 20 Nov 2024 17:13:07 +0800 Subject: cannot create repo; but can create repo group Message-ID: <574408f2-33d2-a3e8-7a17-a7df66bce539@pw-wspx.org> Hi, I'm using Kallithea 0.7.99 and am trying to create a repository under a patches group (as a Kallithea Admin). The new repo is a git repository. 1) I selected the patches group (which I created earlier) 2) Click on + Add Repository 3) Entered "ccpatches" in the Name field. 4) Changed "Type" to "git" 5) Checked "Copy parent group permissions:" 6) Clicked on Add Got the error: "Error creating repository ccpatches" This is the following log: 2024-11-20 17:10:13.179 DEBUG [sqlalchemy.engine.base.Engine] Col ('repositories_user_id', 'repositories_statistics', 'repositories_downloads', 'repositories_landing_revision', 'repositories_changeset_cache', 'repositories_repo_id', 'repositories_repo_name', 'repositories_repo_state', 'repositories_clone_uri', 'repositories_repo_type', 'repositories_private', 'repositories_description', 'repositories_created_on', 'repositories_updated_on', 'repositories_fork_id', 'repositories_group_id') 2024-11-20 17:10:13.180 DEBUG [kallithea.lib.auth] Getting repository group permissions for 2024-11-20 17:10:13.181 INFO [sqlalchemy.engine.base.Engine] SELECT user_repo_group_to_perm.group_to_perm_id AS user_repo_group_to_perm_group_to_perm_id, user_repo_group_to_perm.user_id AS user_repo_group_to_perm_user_id, user_repo_group_to_perm.group_id AS user_repo_group_to_perm_group_id, user_repo_group_to_perm.permission_id AS user_repo_group_to_perm_permission_id, groups_1.group_parent_id AS groups_1_group_parent_id, groups_1.user_id AS groups_1_user_id, groups_1.group_id AS groups_1_group_id, groups_1.group_name AS groups_1_group_name, groups_1.group_description AS groups_1_group_description, groups_1.created_on AS groups_1_created_on, permissions_1.permission_id AS permissions_1_permission_id, permissions_1.permission_name AS permissions_1_permission_name FROM user_repo_group_to_perm LEFT OUTER JOIN groups AS groups_1 ON groups_1.group_id = user_repo_group_to_perm.group_id LEFT OUTER JOIN permissions AS permissions_1 ON permissions_1.permission_id = user_repo_group_to_perm.permission_id WHERE user_repo_group_to_perm.user_id = ? 2024-11-20 17:10:13.182 INFO [sqlalchemy.engine.base.Engine] (1,) 2024-11-20 17:10:13.182 DEBUG [sqlalchemy.engine.base.Engine] Col ('user_repo_group_to_perm_group_to_perm_id', 'user_repo_group_to_perm_user_id', 'user_repo_group_to_perm_group_id', 'user_repo_group_to_perm_permission_id', 'groups_1_group_parent_id', 'groups_1_user_id', 'groups_1_group_id', 'groups_1_group_name', 'groups_1_group_description', 'groups_1_created_on', 'permissions_1_permission_id', 'permissions_1_permission_name') 2024-11-20 17:10:13.182 DEBUG [sqlalchemy.engine.base.Engine] Row (1, 1, 1, 7, None, 2, 1, 'code', 'code', '2024-02-29 08:31:35.248400', 7, 'group.read') 2024-11-20 17:10:13.182 DEBUG [sqlalchemy.engine.base.Engine] Row (2, 1, 2, 7, 1, 2, 2, 'code/central', 'central', '2024-02-29 08:33:39.174291', 7, 'group.read') 2024-11-20 17:10:13.182 DEBUG [sqlalchemy.engine.base.Engine] Row (3, 1, 3, 7, 1, 2, 3, 'code/release', 'release', '2024-02-29 08:34:12.091734', 7, 'group.read') 2024-11-20 17:10:13.183 DEBUG [sqlalchemy.engine.base.Engine] Row (4, 1, 4, 7, None, 2, 4, 'infrastructure', 'infrastructure', '2024-02-29 10:30:02.973408', 7, 'group.read') 2024-11-20 17:10:13.183 DEBUG [sqlalchemy.engine.base.Engine] Row (5, 1, 5, 7, 2, 2, 5, 'code/central/patches', 'patches', '2024-03-01 08:28:10.420124', 7, 'group.read') 2024-11-20 17:10:13.183 DEBUG [sqlalchemy.engine.base.Engine] Row (10, 1, 6, 7, None, 2, 6, 'patches', 'patches', '2024-11-20 16:38:49.343218', 7, 'group.read') 2024-11-20 17:10:13.183 DEBUG [kallithea.lib.auth] Checking if user 'ewong' can 'read' repo group 'code' (RepoGroupList): True (has 'group.admin') 2024-11-20 17:10:13.184 DEBUG [kallithea.lib.auth] Checking if user 'ewong' can 'read' repo group 'infrastructure' (RepoGroupList): True (has 'group.admin') 2024-11-20 17:10:13.184 DEBUG [kallithea.lib.auth] Checking if user 'ewong' can 'read' repo group 'patches' (RepoGroupList): True (has 'group.admin') 2024-11-20 17:10:13.186 DEBUG [kallithea.lib.auth] Getting global permissions for 2024-11-20 17:10:13.186 DEBUG [kallithea.lib.auth] Check ewong for global ('hg.admin',) (access admin main page): True 2024-11-20 17:10:13.188 DEBUG [kallithea.lib.auth] Checking if user 'ewong' can 'admin' repo group None (can write into group index page): False (has None) 2024-11-20 17:10:13.188 DEBUG [kallithea.lib.auth] Checking if user 'ewong' can 'write' repo group None (can write into group index page): False (has None) 2024-11-20 17:10:13.188 DEBUG [kallithea.lib.auth] Check ewong for global ('hg.admin', 'hg.create.repository') (None): True 2024-11-20 17:10:13.188 DEBUG [kallithea.lib.auth] Check ewong for global ('hg.admin',) (None): True 2024-11-20 17:10:13.189 DEBUG [tg.appwrappers.errorpage] ErrorPageApplicationWrapper response: / -> 200 @ text/html 2024-11-20 17:10:13.195 DEBUG [tg.support.middlewares] Removing DBSession from current thread It's probably something simple; but looking at the log, I'm not sure why it keeps on checking against the repo group None. What am I missing? Any help appreciated, Ed From mads at kiilerich.com Wed Nov 20 20:08:31 2024 From: mads at kiilerich.com (Mads Kiilerich) Date: Wed, 20 Nov 2024 21:08:31 +0100 Subject: cannot create repo; but can create repo group In-Reply-To: <574408f2-33d2-a3e8-7a17-a7df66bce539@pw-wspx.org> References: <574408f2-33d2-a3e8-7a17-a7df66bce539@pw-wspx.org> Message-ID: <964168c3-10e4-4a84-b960-27e4d933e33c@kiilerich.com> On 20/11/2024 10:13, Ed Wong wrote: > Hi, > > I'm using Kallithea 0.7.99 and am trying to create a > repository under a patches group (as a Kallithea Admin). (.99 is just a placeholder for the default / development branch. The actual commit hash would be more relevant. But I assume you use latest head. I just updated the default branch with some fixes that had landed on stable. But probably nothing related.) > The new repo is a git repository. > > 1) I selected the patches group (which I created earlier) > 2) Click on + Add Repository > 3) Entered "ccpatches" in the Name field. > 4) Changed "Type" to "git" > 5) Checked "Copy parent group permissions:" > 6) Clicked on Add > > Got the error: > > "Error creating repository ccpatches" It works for me. I assume it also used to work for you. Something must be different... kallithea/controllers/admin/repos.py:122 shows that a traceback should have been logged before showing the error page. Do you not have that further up in the log? > This is the following log: > ... > 2024-11-20 17:10:13.188 DEBUG [kallithea.lib.auth] Checking if user > 'ewong' can 'write' repo group None (can write into group index page): > False (has None) > 2024-11-20 17:10:13.188 DEBUG [kallithea.lib.auth] Check ewong for > global ('hg.admin', 'hg.create.repository') (None): True > 2024-11-20 17:10:13.188 DEBUG [kallithea.lib.auth] Check ewong for > global ('hg.admin',) (None): True > 2024-11-20 17:10:13.189 DEBUG [tg.appwrappers.errorpage] > ErrorPageApplicationWrapper response: / -> 200 @ text/html > 2024-11-20 17:10:13.195 DEBUG [tg.support.middlewares] Removing > DBSession from current thread > > > It's probably something simple; but looking at the log, I'm > not sure why it keeps on checking against the repo group None. "None" is the top level repository. This log snippet seems to be from rendering the error page to tell you it failed. This is not where the actual creation failed. I don't think there is a problem here. /Mads From cc at pw-wspx.org Thu Nov 21 00:03:39 2024 From: cc at pw-wspx.org (Ed Wong) Date: Thu, 21 Nov 2024 08:03:39 +0800 Subject: cannot create repo; but can create repo group In-Reply-To: <964168c3-10e4-4a84-b960-27e4d933e33c@kiilerich.com> References: <574408f2-33d2-a3e8-7a17-a7df66bce539@pw-wspx.org> <964168c3-10e4-4a84-b960-27e4d933e33c@kiilerich.com> Message-ID: <4a29b87e-94ef-d430-d228-ccb484161eac@pw-wspx.org> Mads Kiilerich wrote: > On 20/11/2024 10:13, Ed Wong wrote: >> Hi, >> >> I'm using Kallithea 0.7.99 and am trying to create a >> repository under a patches group (as a Kallithea Admin). > > > (.99 is just a placeholder for the default / development branch. The > actual commit hash would be more relevant. But I assume you use latest > head. I just updated the default branch with some fixes that had landed > on stable. But probably nothing related.) I just updated to head and ran the necessary upgrade procedure. I still get the error. > > kallithea/controllers/admin/repos.py:122 shows that a traceback should > have been logged before showing the error page. Do you not have that > further up in the log? > Nope. I don't see that when I ran 'gearbox server -c ./my.ini'. After changing to debug=true, I see something. 2024-11-21 08:12:09.389 ERROR [kallithea.controllers.admin.repos] Traceback (most recent call last): File "/home/kali/venv/lib/python3.9/site-packages/kombu/utils/functional.py", line 32, in __call__ return self.__value__ AttributeError: 'ChannelPromise' object has no attribute '__value__' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/kali/venv/lib/python3.9/site-packages/kombu/transport/virtual/base.py", line 951, in create_channel return self._avail_channels.pop() IndexError: pop from empty list During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/kali/venv/lib/python3.9/site-packages/kombu/transport/redis.py", line 1121, in _prepare_virtual_host vhost = int(vhost) ValueError: invalid literal for int() with base 10: 'kallitheavhost' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/var/www/kallithea/kallithea/controllers/admin/repos.py", line 119, in create RepoModel().create(form_result, request.authuser.user_id) File "/var/www/kallithea/kallithea/model/repo.py", line 407, in create return create_repo(form_data, cur_user) File "/var/www/kallithea/kallithea/lib/celerylib/__init__.py", line 61, in f_wrapped t = runner.apply_async(args=args, kwargs=kwargs) File "/home/kali/venv/lib/python3.9/site-packages/celery/app/task.py", line 561, in apply_async return app.send_task( File "/home/kali/venv/lib/python3.9/site-packages/celery/app/base.py", line 749, in send_task amqp.send_task_message(P, name, message, **options) File "/home/kali/venv/lib/python3.9/site-packages/celery/app/amqp.py", line 523, in send_task_message ret = producer.publish( File "/home/kali/venv/lib/python3.9/site-packages/kombu/messaging.py", line 186, in publish return _publish( File "/home/kali/venv/lib/python3.9/site-packages/kombu/connection.py", line 556, in _ensured return fun(*args, **kwargs) File "/home/kali/venv/lib/python3.9/site-packages/kombu/messaging.py", line 195, in _publish channel = self.channel File "/home/kali/venv/lib/python3.9/site-packages/kombu/messaging.py", line 218, in _get_channel channel = self._channel = channel() File "/home/kali/venv/lib/python3.9/site-packages/kombu/utils/functional.py", line 34, in __call__ value = self.__value__ = self.__contract__() File "/home/kali/venv/lib/python3.9/site-packages/kombu/messaging.py", line 234, in channel = ChannelPromise(lambda: connection.default_channel) File "/home/kali/venv/lib/python3.9/site-packages/kombu/connection.py", line 953, in default_channel self._ensure_connection(**conn_opts) File "/home/kali/venv/lib/python3.9/site-packages/kombu/connection.py", line 459, in _ensure_connection return retry_over_time( File "/home/kali/venv/lib/python3.9/site-packages/kombu/utils/functional.py", line 318, in retry_over_time return fun(*args, **kwargs) File "/home/kali/venv/lib/python3.9/site-packages/kombu/connection.py", line 934, in _connection_factory self._connection = self._establish_connection() File "/home/kali/venv/lib/python3.9/site-packages/kombu/connection.py", line 860, in _establish_connection conn = self.transport.establish_connection() File "/home/kali/venv/lib/python3.9/site-packages/kombu/transport/virtual/base.py", line 975, in establish_connection self._avail_channels.append(self.create_channel(self)) File "/home/kali/venv/lib/python3.9/site-packages/kombu/transport/virtual/base.py", line 953, in create_channel channel = self.Channel(connection) File "/home/kali/venv/lib/python3.9/site-packages/kombu/transport/redis.py", line 744, in __init__ self.client.ping() File "/home/kali/venv/lib/python3.9/site-packages/kombu/utils/objects.py", line 40, in __get__ return super().__get__(instance, owner) File "/usr/lib/python3.9/functools.py", line 993, in __get__ val = self.func(instance) File "/home/kali/venv/lib/python3.9/site-packages/kombu/transport/redis.py", line 1257, in client return self._create_client(asynchronous=True) File "/home/kali/venv/lib/python3.9/site-packages/kombu/transport/redis.py", line 1213, in _create_client return self.Client(connection_pool=self.async_pool) File "/home/kali/venv/lib/python3.9/site-packages/kombu/transport/redis.py", line 1251, in async_pool self._async_pool = self._get_pool(asynchronous=True) File "/home/kali/venv/lib/python3.9/site-packages/kombu/transport/redis.py", line 1217, in _get_pool params = self._connparams(asynchronous=asynchronous) File "/home/kali/venv/lib/python3.9/site-packages/kombu/transport/redis.py", line 1191, in _connparams connparams['db'] = self._prepare_virtual_host( File "/home/kali/venv/lib/python3.9/site-packages/kombu/transport/redis.py", line 1123, in _prepare_virtual_host raise ValueError( ValueError: Database is int between 0 and limit - 1, not kallitheavhost I'm running kallithea behind a proxyhost. Does this mean (and I'm grasping at straws) I should move to a mod_wsgi setup? Thanks Ed From cc at pw-wspx.org Thu Nov 21 00:16:11 2024 From: cc at pw-wspx.org (Ed Wong) Date: Thu, 21 Nov 2024 08:16:11 +0800 Subject: cannot create repo; but can create repo group In-Reply-To: <4a29b87e-94ef-d430-d228-ccb484161eac@pw-wspx.org> References: <574408f2-33d2-a3e8-7a17-a7df66bce539@pw-wspx.org> <964168c3-10e4-4a84-b960-27e4d933e33c@kiilerich.com> <4a29b87e-94ef-d430-d228-ccb484161eac@pw-wspx.org> Message-ID: As an addendum, I found the only mention of "kallitheavhost" and that was with my celery line in the configuration. celery.broker_url = redis://:@:/kallitheavhost I'm wondering if I actually got this url string correct. Edmund From cc at pw-wspx.org Thu Nov 21 01:08:53 2024 From: cc at pw-wspx.org (Ed Wong) Date: Thu, 21 Nov 2024 09:08:53 +0800 Subject: cannot create repo; but can create repo group In-Reply-To: References: <574408f2-33d2-a3e8-7a17-a7df66bce539@pw-wspx.org> <964168c3-10e4-4a84-b960-27e4d933e33c@kiilerich.com> <4a29b87e-94ef-d430-d228-ccb484161eac@pw-wspx.org> Message-ID: <2a162651-4c73-3321-284f-1fe461fbeab6@pw-wspx.org> Ed Wong wrote: > As an addendum, I found the only mention of "kallitheavhost" > and that was with my celery line in the configuration. > > celery.broker_url = redis://:@:/kallitheavhost > > I'm wondering if I actually got this url string correct. > Sorry for the noise, looks like it's a PEBCAK again. ;/ The redis url is actually: redis://:/0 But even after reading the celery doc from https://docs.celeryq.dev/en/stable/getting-started/backends-and-brokers/redis.html, I'm unsure if this is even right as when I set that, I get a 'better' response: 2024-11-21 09:13:48.762 INFO [sqlalchemy.engine.base.Engine] (9, 2) 2024-11-21 09:13:48.762 DEBUG [sqlalchemy.engine.base.Engine] Col ('user_followings_user_following_id', 'user_followings_user_id', 'user_followings_follows_repository_id', 'user_followings_follows_user_id', 'user_followings_follows_from') 2024-11-21 09:13:48.762 DEBUG [sqlalchemy.engine.base.Engine] Row (8, 2, 9, None, '2024-11-21 09:13:48.275526') 2024-11-21 09:13:48.763 DEBUG [kallithea.lib.auth] Checking access for user @ SummaryController:index 2024-11-21 09:13:48.763 INFO [kallithea.lib.auth] user authenticated with regular auth @ SummaryController:index 2024-11-21 09:13:48.763 DEBUG [kallithea.lib.auth] checking HasRepoPermissionLevelDecorator permissions (['read'],) for 2024-11-21 09:13:48.763 DEBUG [kallithea.lib.auth] Getting repository permissions for 2024-11-21 09:13:48.767 INFO [sqlalchemy.engine.base.Engine] SELECT repo_to_perm.repo_to_perm_id AS repo_to_perm_repo_to_perm_id, repo_to_perm.user_id AS repo_to_perm_user_id, repo_to_perm.permission_id AS repo_to_perm_permission_id, repo_to_perm.repository_id AS repo_to_perm_repository_id, repositories_1.user_id AS repositories_1_user_id, repositories_1.statistics AS repositories_1_statistics, repositories_1.downloads AS repositories_1_downloads, repositories_1.landing_revision AS repositories_1_landing_revision, repositories_1.changeset_cache AS repositories_1_changeset_cache, repositories_1.repo_id AS repositories_1_repo_id, repositories_1.repo_name AS repositories_1_repo_name, repositories_1.repo_state AS repositories_1_repo_state, repositories_1.clone_uri AS repositories_1_clone_uri, repositories_1.repo_type AS repositories_1_repo_type, repositories_1.private AS repositories_1_private, repositories_1.description AS repositories_1_description, repositories_1.created_on AS repositories_1_created_on, repositories_1.updated_on AS repositories_1_updated_on, repositories_1.fork_id AS repositories_1_fork_id, repositories_1.group_id AS repositories_1_group_id, permissions_1.permission_id AS permissions_1_permission_id, permissions_1.permission_name AS permissions_1_permission_name FROM repo_to_perm LEFT OUTER JOIN repositories AS repositories_1 ON repositories_1.repo_id = repo_to_perm.repository_id LEFT OUTER JOIN permissions AS permissions_1 ON permissions_1.permission_id = repo_to_perm.permission_id WHERE repo_to_perm.user_id = ? 2024-11-21 09:13:48.767 INFO [sqlalchemy.engine.base.Engine] (1,) 2024-11-21 09:13:48.767 DEBUG [sqlalchemy.engine.base.Engine] Col ('repo_to_perm_repo_to_perm_id', 'repo_to_perm_user_id', 'repo_to_perm_permission_id', 'repo_to_perm_repository_id', 'repositories_1_user_id', 'repositories_1_statistics', 'repositories_1_downloads', 'repositories_1_landing_revision', 'repositories_1_changeset_cache', 'repositories_1_repo_id', 'repositories_1_repo_name', 'repositories_1_repo_state', 'repositories_1_clone_uri', 'repositories_1_repo_type', 'repositories_1_private', 'repositories_1_description', 'repositories_1_created_on', 'repositories_1_updated_on', 'repositories_1_fork_id', 'repositories_1_group_id', 'permissions_1_permission_id', 'permissions_1_permission_name') 2024-11-21 09:13:48.768 DEBUG [sqlalchemy.engine.base.Engine] Row (1, 1, 3, 1, 2, 0, 0, 'rev:tip', b'{"short_id": "49c6cbd0f7a4", "raw_id": "49c6cbd0f7a4a3d85189c428a0989b3491680cd7", "revision": 15665, "message": "Bug 1432027 - Update pdf.js to version 2.0.288. r=bdahl", "date": "2018-01-21T22:46:41", "author": "Ryan VanderMeulen "}', 1, 'code/release/mozilla-release', 'repo_state_created', 'https://foss.heptapod.net/seamonkey/mozilla-release', 'hg', 0, 'mozilla-release', '2024-02-29 08:35:22.345017', '2018-01-21 22:46:41.000000', None, 3, 3, 'repository.read') 2024-11-21 09:13:48.768 DEBUG [sqlalchemy.engine.base.Engine] Row (2, 1, 3, 2, 2, 0, 0, 'rev:tip', b'{"short_id": "67dc920d4b4d", "raw_id": "67dc920d4b4d8428e5edcd7b39d359c763eb2895", "revision": 21760, "message": "close obsolete gloda-facet branch", "date": "2022-02-07T06:05:58", "author": "Frank-Rainer Grahl "}', 2, 'code/release/comm-release', 'repo_state_created', 'https://foss.heptapod.net/seamonkey/comm-release', 'hg', 0, 'comm-release', '2024-02-29 08:39:35.175544', '2022-02-07 06:05:58.000000', None, 3, 3, 'repository.read') 2024-11-21 09:13:48.768 DEBUG [sqlalchemy.engine.base.Engine] Row (3, 1, 3, 3, 2, 0, 0, 'rev:tip', b'{"short_id": "f80b925f6772", "raw_id": "f80b925f6772c19f2eb2b0957af71c2a7b5a6c44", "revision": 43112, "message": "Bug 1928953 - Improve performance ... (113 characters truncated) ... erential Revision: https://phabricator.services.mozilla.com/D227822", "date": "2024-11-19T13:49:56", "author": "John Bieling "}', 3, 'code/central/comm-central', 'repo_state_created', 'https://hg.mozilla.org/comm-central', 'hg', 0, 'comm-central', '2024-02-29 09:17:07.681246', '2024-11-19 13:49:56.000000', None, 2, 3, 'repository.read') 2024-11-21 09:13:48.769 DEBUG [sqlalchemy.engine.base.Engine] Row (4, 1, 3, 4, 2, 0, 0, 'rev:tip', b'{"short_id": "c845f3207181", "raw_id": "c845f32071817c81069390d3ba4f06b0ee270c20", "revision": 762863, "message": "Backed out 3 changesets (bug 1928 ... (136 characters truncated) ... bug 1928734)\\nBacked out changeset a9f66c1d560d (bug 1928734)", "date": "2024-11-19T07:49:22", "author": "Butkovits Atila "}', 4, 'code/central/mozilla-central', 'repo_state_created', 'https://hg.mozilla.org/mozilla-central', 'hg', 0, 'mozilla-central', '2024-02-29 09:19:57.337581', '2024-11-19 07:49:22.000000', None, 2, 3, 'repository.read') 2024-11-21 09:13:48.769 DEBUG [sqlalchemy.engine.base.Engine] Row (5, 1, 3, 5, 2, 0, 0, 'rev:tip', b'{"short_id": "55b82abe7eeb", "raw_id": "55b82abe7eeb77fb5d847d45f4c7532559f9980e", "revision": 3911, "message": "remove leading / from dirs\\n", "date": "2024-11-13T08:57:47", "author": "Edmund Wong "}', 5, 'infrastructure/tools', 'repo_state_created', '', 'git', 0, 'tools', '2024-02-29 10:30:20.170808', '2024-11-13 08:57:47.000000', None, 4, 3, 'repository.read') 2024-11-21 09:13:48.769 DEBUG [sqlalchemy.engine.base.Engine] Row (10, 1, 3, 7, 2, 0, 0, 'rev:tip', None, 7, 'code/central/patches/mcpatches', 'repo_state_created', None, 'hg', 0, 'code/central/patches/mcpatches repository', '2024-03-01 08:42:47.382856', '2024-03-01 08:42:47.382865', None, 5, 3, 'repository.read') 2024-11-21 09:13:48.769 DEBUG [sqlalchemy.engine.base.Engine] Row (11, 1, 3, 8, 2, 0, 0, 'rev:tip', b'{"short_id": "b30147a58521", "raw_id": "b30147a5852119bb67d99c7713a060b1ffadd8b5", "revision": 0, "message": "Initial Commit some patches", "date": "2024-03-01T16:32:04", "author": "Edmund Wong "}', 8, 'code/central/patches/ccpatches', 'repo_state_created', None, 'hg', 0, 'code/central/patches/ccpatches repository', '2024-03-01 08:43:26.757363', '2024-03-01 16:32:04.000000', None, 5, 3, 'repository.read') 2024-11-21 09:13:48.769 DEBUG [sqlalchemy.engine.base.Engine] Row (15, 1, 3, 9, 2, 0, 0, 'rev:tip', None, 9, 'patches/ccpatches', 'repo_state_created', '', 'git', 0, 'ccpatches', '2024-11-21 09:13:48.258741', '2024-11-21 09:13:48.258749', None, 6, 3, 'repository.read') 2024-11-21 09:13:48.770 DEBUG [kallithea.lib.auth] Checking if user 'ewong' can 'read' repo 'patches/ccpatches' (None): True (has 'repository.admin') 2024-11-21 09:13:48.770 DEBUG [kallithea.lib.auth] Permission granted for 2024-11-21 09:13:48.770 INFO [kallithea.lib.webutils] Flash warning: There are no changesets yet 2024-11-21 09:13:48.773 INFO [sqlalchemy.engine.base.Engine] SELECT statistics.stat_id AS statistics_stat_id, statistics.repository_id AS statistics_repository_id, statistics.stat_on_revision AS statistics_stat_on_revision, statistics.commit_activity AS statistics_commit_activity, statistics.commit_activity_combined AS statistics_commit_activity_combined, statistics.languages AS statistics_languages FROM statistics WHERE ? = statistics.repository_id 2024-11-21 09:13:48.773 INFO [sqlalchemy.engine.base.Engine] (9,) 2024-11-21 09:13:48.773 DEBUG [sqlalchemy.engine.base.Engine] Col ('statistics_stat_id', 'statistics_repository_id', 'statistics_stat_on_revision', 'statistics_commit_activity', 'statistics_commit_activity_combined', 'statistics_languages') but it repeats without going anywhere. So I gave up and disabled celery. Now it's working. Has anyone here setup Celery + redis? If so, was I supposed to somehow create a DB? It doesn't mention anything creating a DB. using redis-cli, "INFO keyspace" shows that there is a db0. No clue if it defaults to readwrite; but from what I gather, default is read/write. Thanks and sorry for the noise. Edmund From mads at kiilerich.com Thu Nov 21 01:46:34 2024 From: mads at kiilerich.com (Mads Kiilerich) Date: Thu, 21 Nov 2024 02:46:34 +0100 Subject: cannot create repo; but can create repo group In-Reply-To: <2a162651-4c73-3321-284f-1fe461fbeab6@pw-wspx.org> References: <574408f2-33d2-a3e8-7a17-a7df66bce539@pw-wspx.org> <964168c3-10e4-4a84-b960-27e4d933e33c@kiilerich.com> <4a29b87e-94ef-d430-d228-ccb484161eac@pw-wspx.org> <2a162651-4c73-3321-284f-1fe461fbeab6@pw-wspx.org> Message-ID: <69664386-d06a-4ae8-bfb2-13423fc4c224@kiilerich.com> On 21/11/2024 02:08, Ed Wong wrote: > Ed Wong wrote: >> As an addendum, I found the only mention of "kallitheavhost" >> and that was with my celery line in the configuration. >> >> celery.broker_url = redis://:@:/kallitheavhost >> >> I'm wondering if I actually got this url string correct. >> > Sorry for the noise, looks like it's a PEBCAK again. ;/ I agree everything points in that direction. Or rather in the configuration of celery and redis ... and Kallithea. > I get a 'better' response: > > 2024-11-21 09:13:48.762 INFO [sqlalchemy.engine.base.Engine] (9, 2) > .. > 2024-11-21 09:13:48.773 DEBUG [sqlalchemy.engine.base.Engine] Col > ('statistics_stat_id', 'statistics_repository_id', > 'statistics_stat_on_revision', 'statistics_commit_activity', > 'statistics_commit_activity_combined', 'statistics_languages') Again, that seems to be the log from the 0.01 second where it is rendering the error page. That is not where the problem is. With a plain ini file, I see plain `gearbox serve -c foo.ini` showing repository creation exceptions on stdout, without additional configuration of debug or logging. But I don't know if your exact problems would be caught elsewhere, perhaps in some celery log. Changing the .ini file to [loggers] keys = root I get much more verbose logging that potentially could be helpful, including 2024-11-21 02:35:41.371 INFO  [kallithea.model.repo] creating repo sadfasdf in /var/tmp/sadfasdf from url: `` I thus think Kallithea did an OK job being helpful in this area out of the box. But it can be configured and has advanced features where users and their system administrators must know all the moving parts. > Has anyone here setup Celery + redis? If so, was I supposed > to somehow create a DB? It doesn't mention anything creating > a DB. using redis-cli, "INFO keyspace" shows that there > is a db0. No clue if it defaults to readwrite; but from > what I gather, default is read/write. FWIW, I don't think I have tried. I have only tried rabbitmq. /Mads