From fb23b73714b93504b608625386c5ba36cad09936 Mon Sep 17 00:00:00 2001 From: openhands Date: Thu, 23 Apr 2026 16:02:05 +0000 Subject: [PATCH] fix(pr-review): use UV_PYTHON instead of UV_PYTHON_PREFERENCE PR #200 added UV_PYTHON_PREFERENCE=only-system to prevent the target repo's .python-version from overriding setup-python. This works when .python-version is *older* than 3.12 (e.g. 3.11), but breaks when it is *newer* (e.g. 3.13 in software-agent-sdk) because uv cannot find 3.13 on the system and is not allowed to download it. Replace with UV_PYTHON=3.12 which explicitly tells uv which interpreter to use, ignoring .python-version in either direction. Fixes: https://github.com/OpenHands/software-agent-sdk/actions/runs/24844346484 Co-authored-by: openhands --- plugins/pr-review/action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/pr-review/action.yml b/plugins/pr-review/action.yml index 77b46ae2..48211754 100644 --- a/plugins/pr-review/action.yml +++ b/plugins/pr-review/action.yml @@ -149,7 +149,10 @@ runs: - name: Run PR review shell: bash env: - UV_PYTHON_PREFERENCE: only-system + # Pin uv to the exact Python installed by setup-python so it + # ignores any .python-version in the PR repo checkout (which + # could be older *or* newer than 3.12). + UV_PYTHON: '3.12' LLM_MODEL: ${{ steps.select-model.outputs.selected_model }} LLM_BASE_URL: ${{ inputs.llm-base-url }} REVIEW_STYLE: ${{ inputs.review-style }}