Skip to content

fix(dev): pin the interpreter for make install - #2594

Merged
hidb4ai merged 2 commits into
oceanbase:masterfrom
Claran309:fix/make-install-python-pin
Nov 12, 2026
Merged

hidb4ai merged 2 commits into
oceanbase:masterfrom
Claran309:fix/make-install-python-pin

Conversation

@Claran309

@Claran309 Claran309 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2593

Rationale for this change

make install is the entry point CONTRIBUTING.md gives contributors, and it was
the only uv sync in the Makefile without --locked or an explicit interpreter.
Without a pin, uv resolves CPython 3.15, where uv.lock has no wheels for ten
packages and the build fails on machines without a Rust toolchain. Without
--locked, a drifted lock file would be rewritten instead of failing, which is
the drift AGENTS.md asks contributors to catch with make check.

What changes are included in this PR?

  • Makefile:4 now runs uv sync --locked --python 3.12.

3.12 matches the CI install path: .github/actions/setup-python-env/action.yml
defaults to it, every explicit uv sync in .github/workflows passes it, and the
remaining uv sync invocations in this Makefile pin the same way. No other entry
point, file or behaviour is touched.

For completeness: the same missing pin also affects README.md:205,
README_CN.md:202 and integrations/cindy/README.md:15 / :18. I kept this
change scoped to make install as reported; happy to extend it in a follow-up
if you want those covered.

Are there any user-facing changes?

No. Contributors without Rust now get a working make install; the pin will need
updating once the locked wheels cover a newer interpreter.

How was this change tested?

# after
> uv sync --locked --python 3.12
Using CPython 3.12.16
Creating virtual environment at: .venv
Resolved 270 packages
Installed 179 packages

> cat .venv/pyvenv.cfg
version_info = 3.12
  • Reproduced the original failure on Windows 11, uv 0.13.7, no Rust toolchain:
    the unpinned uv sync selected CPython 3.15.2 and failed building
    tiktoken==0.13.0 (can't find Rust compiler).
  • make check passes the release, upgrade-policy, workflow-actions and
    lock-consistency checks, and the prek hooks.
  • ty check reports 102 diagnostics on this machine. They are the Windows
    platform diagnostics desktop/VALIDATION.md already records (for example
    socket.AF_UNIX does not exist on Windows, and those UDS tests are skipped
    there). Linux-target type checks are the ones CI gates on.
  • Did not run make unit-test: the change only alters the command line of the
    install target, with no Python code, tests or configuration affected.

AI usage statement

Used an AI assistant for reproduction guidance and wording; every command and
result above was run and verified by me on my own machine.

@CLAassistant

CLAassistant commented Nov 11, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Comment thread Makefile Outdated
install: ## Install the virtual environment and install the prek hooks
@echo "🚀 Creating virtual environment using uv"
@uv sync
@uv sync --locked --python 3.13

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 解释器 pin 与 CI 的安装路径不一致

正文称 3.13 "matches what tox.ini, the CI workflows and #2402 already use",在该 head 上不成立:

  • 共享安装入口 .github/actions/setup-python-env/action.yml 的 python-version 默认值是 3.12,安装步骤为 uv sync --frozen;master.yml 的 quality 作业显式传 3.12。
  • .github/workflows 中所有显式 uv sync 都 pin 3.12:desktop.yml:108/:321/:384、desktop-candidate.yml:39/:92/:183、managed-resource-candidates.yml:61。没有任何 workflow 用 3.13 安装。
  • tox.ini 是 uv sync --locked --python {envpython} 配 envlist = py311..py314,3.13 只是四个矩阵项之一,不是"CI 已使用的那个版本"。

影响:make install 建立的 .venv 就是 make check / make unit-test 使用的环境。pin 到 3.13 后,本地解释器与 CI 的安装/质量路径(3.12)以及安装验证矩阵(3.11、3.14)都不相同;只存在于 3.13 的解析差异(例如某个 locked wheel 在 3.12 上缺失)在两侧都看不到。#2593 写的期望正是"resolve the same interpreter and wheels as CI"。

建议改为 uv sync --locked --python 3.12(与 Makefile 其余 uv sync 的 pin 一致),或在正文说明为何选 3.13 而不是 CI 使用的 3.12。

补充:该 head 只有 license/cla commit status、0 个 check run,以上判断为源码级核对(.github/actions/setup-python-env/action.yml、master.yml、各 workflow 的 uv sync 行、tox.ini),没有 CI 佐证。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — you're right, and the PR description was wrong.

CI installs with 3.12: .github/actions/setup-python-env/action.yml defaults to
it and every explicit uv sync in .github/workflows passes it. #2402 pins
3.13, but only for the evaluation containers, and I carried that over
incorrectly. tox.ini runs the 3.11–3.14 matrix, so 3.13 is one of four, not
"the version CI uses".

Changed to uv sync --locked --python 3.12 in 6d57055, which matches the
remaining uv sync invocations in the same Makefile and the CI install path.
Re-verified locally: .venv is now CPython 3.12.16 and make check runs its
release / upgrade-policy / workflow-actions / lock-consistency checks and prek
hooks against it.

With 3.12 the expectation in #2593 — "resolve the same interpreter and wheels as
CI" — now holds. I've also updated the PR description to stop claiming 3.13
matches CI. Thanks for the source-level check.

@AlexStocks AlexStocks added the 1.5.2 v1.5.2 release tracking label Nov 12, 2026

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hidb4ai
hidb4ai merged commit a8f9233 into oceanbase:master Nov 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.5.2 v1.5.2 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(dev): make install runs uv sync without a Python pin or --locked

4 participants