From 58fe872a44cea9cb23e5abf52e0ca3a518160b3f Mon Sep 17 00:00:00 2001 From: Rohan Balkondekar Date: Mon, 6 Oct 2025 15:03:12 +0800 Subject: [PATCH 1/6] fix: upgrade packages to address security vulnerabilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Jinja2: 3.1.2 → 3.1.6 - aiohttp: 3.10.2 → 3.12.15 - azure-identity: 1.15.0 → 1.25.0 - urllib3: 2.0.7 → 2.5.0 - starlette: 0.37.2 → 0.48.0 - boto3: 1.33.6 → 1.40.45 (dependency resolution) - fastapi: 0.115.6 → 0.118.0 (dependency resolution) All unit tests passing (192/192) --- requirements.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 50658b69..3338d637 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,18 +1,18 @@ -aiohttp==3.10.2 +aiohttp==3.12.15 anthropic>=0.52.0 #anthropic[vertex]==0.47.1 atlassian-python-api==3.41.4 azure-devops==7.1.0b3 -azure-identity==1.15.0 -boto3==1.33.6 +azure-identity==1.25.0 +boto3==1.40.45 certifi==2024.8.30 dynaconf==3.2.4 -fastapi==0.115.6 +fastapi==0.118.0 GitPython==3.1.41 google-cloud-aiplatform==1.38.0 google-generativeai==0.8.3 google-cloud-storage==2.10.0 -Jinja2==3.1.2 +Jinja2==3.1.6 litellm==1.73.6 loguru==0.7.2 msrest==0.7.1 From fea8bc51506c287c64571ee9f6be9e24f2e9c337 Mon Sep 17 00:00:00 2001 From: sharoneyal Date: Mon, 6 Oct 2025 14:16:10 +0300 Subject: [PATCH 2/6] Update documentation to clarify the need to set bitbucket data center url (#2052) --- docs/docs/installation/bitbucket.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/docs/installation/bitbucket.md b/docs/docs/installation/bitbucket.md index 776f27dc..75084275 100644 --- a/docs/docs/installation/bitbucket.md +++ b/docs/docs/installation/bitbucket.md @@ -39,6 +39,13 @@ Generate the token and add it to .secret.toml under `bitbucket_server` section bearer_token = "" ``` +Don't forget to also set the URL of your Bitbucket Server instance (either in `.secret.toml` or in `configuration.toml`): + +```toml +[bitbucket_server] +url = "" +``` + ### Run it as CLI Modify `configuration.toml`: @@ -47,6 +54,8 @@ Modify `configuration.toml`: git_provider="bitbucket_server" ``` + + and pass the Pull request URL: ```shell From be93651db8b705d40b93a9c144d89817bf58be71 Mon Sep 17 00:00:00 2001 From: tomoya-kawaguchi Date: Tue, 7 Oct 2025 19:19:03 +0900 Subject: [PATCH 3/6] chore: add error log on model prediction failure --- pr_agent/algo/pr_processing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pr_agent/algo/pr_processing.py b/pr_agent/algo/pr_processing.py index dda0d9a2..20010694 100644 --- a/pr_agent/algo/pr_processing.py +++ b/pr_agent/algo/pr_processing.py @@ -329,9 +329,9 @@ async def retry_with_fallback_models(f: Callable, model_type: ModelType = ModelT ) get_settings().set("openai.deployment_id", deployment_id) return await f(model) - except: + except Exception as e: get_logger().warning( - f"Failed to generate prediction with {model}" + f"Failed to generate prediction with {model}: {e}", ) if i == len(all_models) - 1: # If it's the last iteration raise Exception(f"Failed to generate prediction with any model of {all_models}") From 632c39962cbe8c7ec9f2a1039a1ec7ffa05c6ffc Mon Sep 17 00:00:00 2001 From: tomoya-kawaguchi Date: Tue, 7 Oct 2025 21:16:52 +0900 Subject: [PATCH 4/6] chore: add original exception --- pr_agent/algo/pr_processing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_agent/algo/pr_processing.py b/pr_agent/algo/pr_processing.py index 20010694..6c4ad7a9 100644 --- a/pr_agent/algo/pr_processing.py +++ b/pr_agent/algo/pr_processing.py @@ -334,7 +334,7 @@ async def retry_with_fallback_models(f: Callable, model_type: ModelType = ModelT f"Failed to generate prediction with {model}: {e}", ) if i == len(all_models) - 1: # If it's the last iteration - raise Exception(f"Failed to generate prediction with any model of {all_models}") + raise Exception(f"Failed to generate prediction with any model of {all_models}") from e def _get_all_models(model_type: ModelType = ModelType.REGULAR) -> List[str]: From 584e87ae4807fa5ba4b316c5db2984bc0da328ba Mon Sep 17 00:00:00 2001 From: Sviatoslav Bobryshev <61021258+sbobryshev@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:54:00 +0300 Subject: [PATCH 5/6] Remove useless pass from git_provider --- pr_agent/git_providers/git_provider.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pr_agent/git_providers/git_provider.py b/pr_agent/git_providers/git_provider.py index dfb5b224..7288f186 100644 --- a/pr_agent/git_providers/git_provider.py +++ b/pr_agent/git_providers/git_provider.py @@ -376,7 +376,6 @@ def get_main_pr_language(languages, files) -> str: break except Exception as e: get_logger().exception(f"Failed to get main language: {e}") - pass ## old approach: # most_common_extension = max(set(extension_list), key=extension_list.count) @@ -401,7 +400,6 @@ def get_main_pr_language(languages, files) -> str: except Exception as e: get_logger().exception(e) - pass return main_language_str From a194ca65d2d8144ac79843459cae6182f4d6f064 Mon Sep 17 00:00:00 2001 From: Tomoya Kawaguchi <68677002+yamoyamoto@users.noreply.github.com> Date: Fri, 10 Oct 2025 20:44:31 +0900 Subject: [PATCH 6/6] Update pr_agent/algo/pr_processing.py Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com> --- pr_agent/algo/pr_processing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pr_agent/algo/pr_processing.py b/pr_agent/algo/pr_processing.py index 6c4ad7a9..0b76b90e 100644 --- a/pr_agent/algo/pr_processing.py +++ b/pr_agent/algo/pr_processing.py @@ -331,7 +331,8 @@ async def retry_with_fallback_models(f: Callable, model_type: ModelType = ModelT return await f(model) except Exception as e: get_logger().warning( - f"Failed to generate prediction with {model}: {e}", + f"Failed to generate prediction with {model}", + artifact={"error": e}, ) if i == len(all_models) - 1: # If it's the last iteration raise Exception(f"Failed to generate prediction with any model of {all_models}") from e