staging-next-version/deposit: Failure to trigger migration
Everything is fine in staging but in staging-next-version:
2024-12-04T15:31:05.754651898Z psycopg2.OperationalError: FATAL: permission denied for database "swh-deposit"
2024-12-04T15:31:05.754658948Z DETAIL: User does not have CONNECT privilege.
2024-12-04T15:31:05.754664475Z
2024-12-04T15:31:05.754669888Z
2024-12-04T15:31:05.754676399Z The above exception was the direct cause of the following exception:
2024-12-04T15:31:05.754684550Z
2024-12-04T15:31:05.754693015Z Traceback (most recent call last):
2024-12-04T15:31:05.754726660Z File "/opt/swh/.local/bin/django-admin", line 8, in <module>
2024-12-04T15:31:05.754867058Z sys.exit(execute_from_command_line())
2024-12-04T15:31:05.754885338Z File "/opt/swh/.local/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
2024-12-04T15:31:05.755249832Z utility.execute()
2024-12-04T15:31:05.755260547Z File "/opt/swh/.local/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
2024-12-04T15:31:05.755627822Z self.fetch_command(subcommand).run_from_argv(self.argv)
2024-12-04T15:31:05.755643003Z File "/opt/swh/.local/lib/python3.10/site-packages/django/core/management/base.py", line 413, in run_from_argv
2024-12-04T15:31:05.755931126Z self.execute(*args, **cmd_options)
2024-12-04T15:31:05.755941238Z File "/opt/swh/.local/lib/python3.10/site-packages/django/core/management/base.py", line 459, in execute
2024-12-04T15:31:05.756212037Z output = self.handle(*args, **options)
2024-12-04T15:31:05.756230038Z File "/opt/swh/.local/lib/python3.10/site-packages/django/core/management/base.py", line 107, in wrapper
2024-12-04T15:31:05.756324964Z res = handle_func(*args, **kwargs)
2024-12-04T15:31:05.756335130Z File "/opt/swh/.local/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 118, in handle
2024-12-04T15:31:05.756543407Z executor = MigrationExecutor(connection, self.migration_progress_callback)
2024-12-04T15:31:05.756552787Z File "/opt/swh/.local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 18, in __init__
2024-12-04T15:31:05.756756243Z self.loader = MigrationLoader(self.connection)
2024-12-04T15:31:05.756768771Z File "/opt/swh/.local/lib/python3.10/site-packages/django/db/migrations/loader.py", line 58, in __init__
2024-12-04T15:31:05.756926221Z self.build_graph()
2024-12-04T15:31:05.756935804Z File "/opt/swh/.local/lib/python3.10/site-packages/django/db/migrations/loader.py", line 235, in build_graph
2024-12-04T15:31:05.757114354Z self.applied_migrations = recorder.applied_migrations()
2024-12-04T15:31:05.757128733Z File "/opt/swh/.local/lib/python3.10/site-packages/django/db/migrations/recorder.py", line 89, in applied_migrations
2024-12-04T15:31:05.757275852Z if self.has_table():
2024-12-04T15:31:05.757287248Z File "/opt/swh/.local/lib/python3.10/site-packages/django/db/migrations/recorder.py", line 63, in has_table
2024-12-04T15:31:05.757424728Z with self.connection.cursor() as cursor:
2024-12-04T15:31:05.757433874Z File "/opt/swh/.local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
2024-12-04T15:31:05.757535364Z return func(*args, **kwargs)
2024-12-04T15:31:05.757544109Z File "/opt/swh/.local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 320, in cursor
2024-12-04T15:31:05.757716434Z return self._cursor()
2024-12-04T15:31:05.757745862Z File "/opt/swh/.local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 296, in _cursor
2024-12-04T15:31:05.758019700Z self.ensure_connection()
2024-12-04T15:31:05.758029255Z File "/opt/swh/.local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
2024-12-04T15:31:05.758130284Z return func(*args, **kwargs)
2024-12-04T15:31:05.758139442Z File "/opt/swh/.local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
2024-12-04T15:31:05.758329752Z with self.wrap_database_errors:
2024-12-04T15:31:05.758339263Z File "/opt/swh/.local/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
2024-12-04T15:31:05.758506288Z raise dj_exc_value.with_traceback(traceback) from exc_value
2024-12-04T15:31:05.758515095Z File "/opt/swh/.local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2024-12-04T15:31:05.758716327Z self.connect()
2024-12-04T15:31:05.758725026Z File "/opt/swh/.local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
2024-12-04T15:31:05.758850967Z return func(*args, **kwargs)
2024-12-04T15:31:05.758859716Z File "/opt/swh/.local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 256, in connect
2024-12-04T15:31:05.759074825Z self.connection = self.get_new_connection(conn_params)
2024-12-04T15:31:05.759083892Z File "/opt/swh/.local/lib/python3.10/site-packages/django/utils/asyncio.py", line 26, in inner
2024-12-04T15:31:05.759232732Z return func(*args, **kwargs)
2024-12-04T15:31:05.759242208Z File "/opt/swh/.local/lib/python3.10/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2024-12-04T15:31:05.759444806Z connection = self.Database.connect(**conn_params)
2024-12-04T15:31:05.759453325Z File "/opt/swh/.local/lib/python3.10/site-packages/psycopg2/__init__.py", line 122, in connect
2024-12-04T15:31:05.759604118Z conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
2024-12-04T15:31:05.759613901Z django.db.utils.OperationalError: FATAL: permission denied for database "swh-deposit"
2024-12-04T15:31:05.759620033Z DETAIL: User does not have CONNECT privilege.