fix(ci): clear leftover .venv before Python 3.14 venv create (BUG-677)
Staging gate run 2594 died in Install dependencies with FileExistsError on a reused hostexecutor .venv. Remove the leftover directory and create the venv with --clear so Python 3.14 mkdir does not abort the job.
This commit is contained in:
@@ -10532,3 +10532,19 @@
|
||||
- 相关记录:BUG-442
|
||||
- 复发自:无
|
||||
- 修复版本:待发布
|
||||
|
||||
## BUG-677 | staging quality gate 在残留 .venv 上被 Python 3.14 mkdir 打断
|
||||
|
||||
- 状态:resolved
|
||||
- 首次发现:2026-09-14
|
||||
- 最近更新:2026-09-14
|
||||
- 影响面:Gitea `Independent Staging Quality Gate` validate「Install dependencies」、publish(因 `needs: validate` 被 skip)
|
||||
- 用户现象:推送 `69ffa07d` 后门禁 run `2594` 约 20 秒失败;测试、lint、build 未执行,publish/deploy skipped。
|
||||
- 触发条件:`runs-on: xiaoxin` 的 act_runner hostexecutor 复用 job 目录且已有 gitignored `.venv/`;runner 报告 `Python 3.14.4`。
|
||||
- 根因:`python3 -m venv .venv` 对已存在目录执行 `mkdir`,Python 3.14 抛出 `FileExistsError: [Errno 17] File exists: '.../hostexecutor/.venv'`。`git status --porcelain --untracked-files=all` 仍为空,因为忽略目录不出现在 porcelain 里。不是 pip、npm 或校正测试失败。
|
||||
- 修复:安装步骤先 `rm -rf -- .venv`,再 `python3 -m venv --clear .venv`。不改测试、lint、build、exact-SHA 与镜像发布语义。
|
||||
- 验证:`frontend/tests/staging-backend-workflows.test.ts` 锁定清除后再 `--clear`;Gitea gate 对修复 SHA 复跑。
|
||||
- 防复发:质量门创建 `.venv` 必须允许 hostexecutor 残留目录。不得把 Python 3.14 `FileExistsError` 当成业务测试失败。
|
||||
- 相关记录:BUG-149、BUG-364
|
||||
- 复发自:无
|
||||
- 修复版本:待发布
|
||||
|
||||
Reference in New Issue
Block a user