Repository navigation
fix(docker): 镜像内置 jev extra,修复 typesafe 后端缺少 typesafe-sdk - #6
Merged
Merged
Conversation
requirements.lock 由 `uv export --no-dev`(未带 extra)生成,官方 Docker 镜像因此不含可选依赖 typesafe-sdk。设置页切到 typesafe 后端点“测试连接” 会报 `No module named 'typesafe_sdk'`。 改为带 `--extra jev` 导出,typesafe-sdk 及其依赖(httpx2/httpcore2/ truststore/tenacity)随镜像安装;已确认差异仅新增这些包,无既有包版本变化。 验证: - grep 'typesafe-sdk' requirements.lock 命中 - CI 的 docker 构建任务会实际安装该依赖
Owner
|
感谢你及时定位并修复 Docker 镜像缺少 typesafe-sdk 的问题!把 jev extra 纳入镜像依赖导出,既保持本地可选依赖的定位,也让 Docker 中设置页提供的 typesafe 后端真正开箱可用。CI 检查已通过,感谢贡献。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
设置页把 Jev 后端切到 typesafe 并点“测试连接”,报错:
根因
typesafe-sdk是pyproject.toml里的可选依赖jev:但镜像构建只安装
requirements.lock,而该文件由生成——没有带
--extra jev,所以typesafe-sdk从未进入镜像。注意这里存在一处脱节:CI 的
uv lock --check只校验uv.lock(其中已含typesafe-sdk,通过),但真正进 Docker 镜像的是requirements.lock(不含)。因此uv.lock同步、CI 全绿,发布镜像却缺依赖。修复
导出时带上
--extra jev:这样
typesafe-sdk及其依赖(httpx2/httpcore2/truststore/tenacity)随镜像安装,typesafe 后端开箱可用(纯 Python,体积很小)。typesafe-sdk仍保持可选依赖的定位,只是官方镜像默认内置。验证
git diff已核对)。requirements.lock含typesafe-sdk==0.7.2(含 sdist/wheel 双 hash)。python -c "import typesafe_sdk"通过,设置页 typesafe 测试连接成功。备注
若更希望镜像保持精简、不默认内置该可选依赖,也可以改为在
Dockerfile中按 build arg 选择性pip install ".[jev]";但考虑到设置页已直接暴露 typesafe 后端与“测试连接”,这里选择开箱即用。