-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Git provider
Github Cloud
System Info
within the last few weeks or so it seems something is broken on the master branch and pr-agent is failing with
raise ValueError(f"Failed to get git provider for {pr_url}") from e
no config changes were made, the only change is updating the docker image.
we're running self hosted in github app mode. outside of the necessary github auth secrets these our only config changes
CONFIG.REASONING_EFFORT: 'medium'
CONFIG.LOG_LEVEL: 'WARNING'
PR_CODE_SUGGESTIONS.ALLOW_THUMBS_UP_DOWN: 'true'
PR_CODE_SUGGESTIONS.COMMITABLE_CODE_SUGGESTIONS: 'true'
PR_CODE_SUGGESTIONS.ENABLE_CHAT_TEXT: 'true'
PR_DESCRIPTION.ENABLE_PR_DIAGRAM: 'false'
PR_IMPROVE_COMPONENT.NUM_CODE_SUGGESTIONS: '10'
PR_REVIEWER.REQUIRE_TICKET_ANALYSIS_REVIEW: 'false'
GITHUB_APP.BOT_USER: 'pr-agent'
GITHUB_APP.HANDLE_PUSH_TRIGGER: 'true' # make more suggestions after new pushes
GITHUB.DEPLOYMENT_TYPE: 'app'
GUNICORN_WORKERS: '5'
Bug details
here is the full error message
pr-agent-68b9b477d4-wb2n9 pr-agent [2026-02-09 21:14:50 +0000] [6] [ERROR] Exception in ASGI application
pr-agent-68b9b477d4-wb2n9 pr-agent Traceback (most recent call last):
pr-agent-68b9b477d4-wb2n9 pr-agent File "/app/pr_agent/git_providers/__init__.py", line 62, in get_git_provider_with_context
pr-agent-68b9b477d4-wb2n9 pr-agent git_provider = _GIT_PROVIDERS[provider_id](pr_url)
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/app/pr_agent/git_providers/github_provider.py", line 52, in __init__
pr-agent-68b9b477d4-wb2n9 pr-agent self.set_pr(pr_url)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/app/pr_agent/git_providers/github_provider.py", line 150, in set_pr
pr-agent-68b9b477d4-wb2n9 pr-agent self.pr = self._get_pr()
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/app/pr_agent/git_providers/github_provider.py", line 865, in _get_pr
pr-agent-68b9b477d4-wb2n9 pr-agent return self._get_repo().get_pull(self.pr_num)
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/app/pr_agent/git_providers/github_provider.py", line 860, in _get_repo
pr-agent-68b9b477d4-wb2n9 pr-agent self.repo_obj = self.github_client.get_repo(self.repo)
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/github/MainClass.py", line 363, in get_repo
pr-agent-68b9b477d4-wb2n9 pr-agent headers, data = self.__requester.requestJsonAndCheck("GET", url)
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/github/Requester.py", line 443, in requestJsonAndCheck
pr-agent-68b9b477d4-wb2n9 pr-agent *self.requestJson(
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/github/Requester.py", line 580, in requestJson
pr-agent-68b9b477d4-wb2n9 pr-agent return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/github/Requester.py", line 673, in __requestEncode
pr-agent-68b9b477d4-wb2n9 pr-agent ] = f"{self.__auth.token_type} {self.__auth.token}"
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/github/Auth.py", line 300, in token
pr-agent-68b9b477d4-wb2n9 pr-agent self.__installation_authorization = self._get_installation_authorization()
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/github/Auth.py", line 317, in _get_installation_authorization
pr-agent-68b9b477d4-wb2n9 pr-agent return self.__integration.get_access_token(
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/github/GithubIntegration.py", line 183, in get_access_token
pr-agent-68b9b477d4-wb2n9 pr-agent headers, response = self.__requester.requestJsonAndCheck(
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/github/Requester.py", line 443, in requestJsonAndCheck
pr-agent-68b9b477d4-wb2n9 pr-agent *self.requestJson(
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/github/Requester.py", line 580, in requestJson
pr-agent-68b9b477d4-wb2n9 pr-agent return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/github/Requester.py", line 673, in __requestEncode
pr-agent-68b9b477d4-wb2n9 pr-agent ] = f"{self.__auth.token_type} {self.__auth.token}"
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/github/Auth.py", line 169, in token
pr-agent-68b9b477d4-wb2n9 pr-agent return self.create_jwt()
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/github/Auth.py", line 205, in create_jwt
pr-agent-68b9b477d4-wb2n9 pr-agent encrypted = jwt.encode(
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/jwt/api_jwt.py", line 145, in encode
pr-agent-68b9b477d4-wb2n9 pr-agent raise TypeError("Issuer (iss) must be a string.")
pr-agent-68b9b477d4-wb2n9 pr-agent TypeError: Issuer (iss) must be a string.
pr-agent-68b9b477d4-wb2n9 pr-agent
pr-agent-68b9b477d4-wb2n9 pr-agent The above exception was the direct cause of the following exception:
pr-agent-68b9b477d4-wb2n9 pr-agent
pr-agent-68b9b477d4-wb2n9 pr-agent Traceback (most recent call last):
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 428, in run_asgi
pr-agent-68b9b477d4-wb2n9 pr-agent result = await app( # type: ignore[func-returns-value]
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
pr-agent-68b9b477d4-wb2n9 pr-agent return await self.app(scope, receive, send)
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/fastapi/applications.py", line 1133, in __call__
pr-agent-68b9b477d4-wb2n9 pr-agent await super().__call__(scope, receive, send)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/applications.py", line 113, in __call__
pr-agent-68b9b477d4-wb2n9 pr-agent await self.middleware_stack(scope, receive, send)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
pr-agent-68b9b477d4-wb2n9 pr-agent raise exc
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
pr-agent-68b9b477d4-wb2n9 pr-agent await self.app(scope, receive, _send)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette_context/middleware/raw_middleware.py", line 92, in __call__
pr-agent-68b9b477d4-wb2n9 pr-agent await self.app(scope, receive, send_wrapper)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
pr-agent-68b9b477d4-wb2n9 pr-agent await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
pr-agent-68b9b477d4-wb2n9 pr-agent raise exc
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
pr-agent-68b9b477d4-wb2n9 pr-agent await app(scope, receive, sender)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
pr-agent-68b9b477d4-wb2n9 pr-agent await self.app(scope, receive, send)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 716, in __call__
pr-agent-68b9b477d4-wb2n9 pr-agent await self.middleware_stack(scope, receive, send)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 736, in app
pr-agent-68b9b477d4-wb2n9 pr-agent await route.handle(scope, receive, send)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 290, in handle
pr-agent-68b9b477d4-wb2n9 pr-agent await self.app(scope, receive, send)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 123, in app
pr-agent-68b9b477d4-wb2n9 pr-agent await wrap_app_handling_exceptions(app, request)(scope, receive, send)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
pr-agent-68b9b477d4-wb2n9 pr-agent raise exc
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
pr-agent-68b9b477d4-wb2n9 pr-agent await app(scope, receive, sender)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/fastapi/routing.py", line 110, in app
pr-agent-68b9b477d4-wb2n9 pr-agent await response(scope, receive, send)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/responses.py", line 168, in __call__
pr-agent-68b9b477d4-wb2n9 pr-agent await self.background()
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/background.py", line 42, in __call__
pr-agent-68b9b477d4-wb2n9 pr-agent await task()
pr-agent-68b9b477d4-wb2n9 pr-agent File "/usr/local/lib/python3.12/site-packages/starlette/background.py", line 27, in __call__
pr-agent-68b9b477d4-wb2n9 pr-agent await self.func(*self.args, **self.kwargs)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/app/pr_agent/servers/github_app.py", line 343, in handle_request
pr-agent-68b9b477d4-wb2n9 pr-agent await handle_comments_on_pr(body, event, sender, sender_id, action, log_context, agent)
pr-agent-68b9b477d4-wb2n9 pr-agent File "/app/pr_agent/servers/github_app.py", line 115, in handle_comments_on_pr
pr-agent-68b9b477d4-wb2n9 pr-agent provider = get_git_provider_with_context(pr_url=api_url)
pr-agent-68b9b477d4-wb2n9 pr-agent ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pr-agent-68b9b477d4-wb2n9 pr-agent File "/app/pr_agent/git_providers/__init__.py", line 67, in get_git_provider_with_context
pr-agent-68b9b477d4-wb2n9 pr-agent raise ValueError(f"Failed to get git provider for {pr_url}") from e
pr-agent-68b9b477d4-wb2n9 pr-agent ValueError: Failed to get git provider for
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels