Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PSQL for /cupboard/broken-merge-proposals #947

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

g0tmi1k
Copy link
Contributor

@g0tmi1k g0tmi1k commented Feb 22, 2025

Requesting: /cupboard/broken-merge-proposals

Errors with:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/dist-packages/aiohttp/web_protocol.py", line 480, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/dist-packages/aiohttp/web_app.py", line 569, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/dist-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/dist-packages/janitor/site/openid.py", line 40, in openid_middleware
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/dist-packages/aiohttp_openmetrics/__init__.py", line 79, in metrics_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/dist-packages/aiohttp/web_middlewares.py", line 105, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/dist-packages/janitor/state.py", line 263, in asyncpg_error_middleware
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/dist-packages/aiozipkin/aiohttp_helpers.py", line 157, in aiozipkin_middleware
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/dist-packages/janitor/site/common.py", line 377, in handle
    vs = await fn(request)
         ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/dist-packages/janitor/site/cupboard/__init__.py", line 389, in handle_broken_mps
            broken_mps = await conn.fetch(
                         ^^^^^^^^^^^^^^^^^
    ...<23 lines>...
            )
            ^
  File "/usr/local/lib/python3.13/dist-packages/asyncpg/connection.py", line 690, in fetch
    return await self._execute(
           ^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/dist-packages/asyncpg/connection.py", line 1864, in _execute
    result, _ = await self.__execute(
                ^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/dist-packages/asyncpg/connection.py", line 1961, in __execute
    result, stmt = await self._do_execute(
                   ^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/dist-packages/asyncpg/connection.py", line 2004, in _do_execute
    stmt = await self._get_statement(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<4 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/dist-packages/asyncpg/connection.py", line 432, in _get_statement
    statement = await self._protocol.prepare(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
  File "asyncpg/protocol/protocol.pyx", line 165, in prepare
asyncpg.exceptions.AmbiguousColumnError: column reference "codebase" is ambiguous

@g0tmi1k g0tmi1k requested a review from jelmer as a code owner February 22, 2025 07:36
@g0tmi1k g0tmi1k changed the title Fix PSQL for /broken-merge-proposals Fix PSQL for /cupboard/broken-merge-proposals Feb 22, 2025
@g0tmi1k g0tmi1k force-pushed the broken-merge-proposals branch from 9ccc9ac to 2e22e7e Compare February 22, 2025 07:37
@jelmer
Copy link
Owner

jelmer commented Feb 22, 2025

Have you verified that the page renders with this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants