Skip to content

docs: drop in-cluster nginx-pypi-cache references - #291

Open
ccijunk wants to merge 8 commits into
Ascend:mainfrom
ccijunk:ci/remove-nginx-pypi-cache
Open

ccijunk wants to merge 8 commits into
Ascend:mainfrom
ccijunk:ci/remove-nginx-pypi-cache

Conversation

@ccijunk

@ccijunk ccijunk commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

背景

集群内的 nginx pypi 缓存(cache-service.nginx-pypi-cache.svc.cluster.local)已下线,改用 squid 正向代理透明缓存 PyPI 流量。本仓库(Ascend/docs)仍保留大量指向该缓存的配置,会导致快速开始流程在缓存地址失效后无法安装依赖。

拆分说明:会触发既有/上游 CI 失败的 10 个文件(lmcache / onnxruntime 的 quick_start.md;ms-swift / specforge / slime / tgi / bitsandbytes / peft 的 setup_example.sh;tests/tgi / tests/peft 的测试文件)已移到 #315,本 PR 只保留 CI 可通过的改动。这些文件移出后本 PR 不再触发对应的 quick-start / examples workflow。

改动内容

  • .github/workflows/quick-start-template.yml
    • 删除指向 nginx 缓存的 PIP_INDEX_URL、PIP_TRUSTED_HOST、UV_INDEX_URL、UV_INSECURE_HOST 环境变量覆盖,恢复为默认(走 runner 上的 squid 代理)。
  • tests/*/test_quick_start_ascend.py(17 个文件)
    • _CLUSTER_INDEX 由 http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple 改为 https://pypi.org/simple。
  • examples-guards/*/scripts/setup_example.sh(15 个文件)
    • 删除 CLUSTER_PIP_HOST / CLUSTER_PIP_INDEX 等与集群缓存相关的辅助变量;
    • select_pip_index() 改为回落到公开镜像(Aliyun),并 unset PIP_TRUSTED_HOST;
    • mooncake 移除 configure_apt_cache() 及其调用(apt 缓存同样已下线);
    • torchtitan / ktransformers / tensordict / flash-linear-attention 等按各自场景改为显式公开索引,保留华为云 Ascend 源作为 extra index。

验证

关联

@ccijunk

ccijunk commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

CI 失败分析:onnxruntime-quick-start(与本 PR 改动无关)

失败的 job 是 onnxruntime-quick-start / monitor + test on change(job 139084147931,runner linux-aarch64-a2-1-gc6q4-runner-zrzvg),失败步骤为 Decide which ref to test:

ERROR: failed to resolve latest upstream ref for PR run (auto-fallback chain exhausted)

根因:上游仓库 microsoft/onnxruntime 已返回 404

实测(2026-11-25):

https://github.com/microsoft/onnxruntime                 -> 404
https://api.github.com/repos/microsoft/onnxruntime       -> 404
https://api.github.com/repos/microsoft/onnxruntime/releases/latest -> 404

同时 microsoft/vscode、vllm-project/vllm、onnx/onnx 均为 200,可排除网络/代理问题。该仓库疑似被临时设为私有,具体原因待确认(PyPI 上的 onnxruntime 包仍可正常安装)。

.github/workflows/quick-start-template.yml 的 ref 解析有 4 层 fallback,全部依赖 GitHub API:

  1. releases/latest
  2. releases?per_page=20
  3. tags?per_page=1
  4. commits/HEAD

四层全部 404 后,PR 分支的逻辑是直接 exit 1,所以必然失败。

main 分支从 2026-11-23 22:44 起连续 4 次 schedule 也失败,同一根因(monitor: reason=cache-miss ref=main 之后 commits/main 返回 404)。

为什么改文档也没法绕过

sources/onnxruntime/quick_start.md 本身是 从源码编译:

git clone https://github.com/microsoft/onnxruntime.git

即使 ref 解析恢复,clone 仍会 404。在上游仓库恢复之前,这个 guard 不可能通过。

本 PR 的改动范围

本 PR 只删除已下线的 cache-service.nginx-pypi-cache 相关环境变量(PIP_INDEX_URL / PIP_TRUSTED_HOST / UV_INDEX_URL / UV_INSECURE_HOST 等),不涉及 onnxruntime 教程内容,与该失败无因果关系。

建议维护者在上游仓库恢复后 rerun 该 job;如短期无法恢复,可考虑让 PR 分支在“上游仓库整体 404”时降级为 skipped。

The cluster-local nginx pypi cache (cache-service.nginx-pypi-cache) has been
decommissioned in favour of the squid forward proxy, which caches PyPI
traffic transparently. Remove the now-dead mirror wiring from the quick-start
workflow, tests and example setup scripts:

- quick-start-template.yml: drop PIP_INDEX_URL / PIP_TRUSTED_HOST /
  UV_INDEX_URL / UV_INSECURE_HOST overrides pointing at the cache
- tests/*/test_quick_start_ascend.py: use https://pypi.org/simple
- examples-guards/*/setup_example.sh: drop CLUSTER_PIP_* helpers, keep the
  public Aliyun mirror fallback; mooncake no longer configures an apt cache
- lmcache / onnxruntime quick_start.md: remove commented cache probes
@ccijunk
ccijunk force-pushed the ci/remove-nginx-pypi-cache branch from 5bd2541 to f32e550 Compare November 26, 2026 06:11
The tgi setup script unsets PIP_TRUSTED_HOST but then still re-exports it
and writes it to GITHUB_ENV when non-empty, which can never happen after
the unset; the variable's only producer was the removed cluster-cache
branch. Drop the unset and both conditional blocks, and fix the stale
comment that still names the decommissioned cluster pip cache.
github-actions Bot pushed a commit that referenced this pull request Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📖 文档预览:https://ascend.github.io/docs/pr-preview/pr-291/

构建自 542f7fa61fb3bbbf0fdc9a63d9362692684eb121。
每次推送后自动更新,PR 关闭时自动清理。

@ccijunk

ccijunk commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

CI 现状说明:24 条失败检查均与 nginx-pypi-cache 清理无关

已逐条与 main 对比(2026-11-28)。此前只说明了 onnxruntime 一条,这里补齐完整分类。

1. main 上本来就红(既有问题,连续 3 天)

2. main 上"绿"是因为 monitor 缓存跳过了测试,本 PR 首次真实执行才暴露的既有问题

  • lmcache-quick-start(1 条):main 上 need_to_test=false,测试作业被跳过(https://github.com/Ascend/docs/actions/runs/46057299371 )。本 PR 改了 sources/lmcache/quick_start.md 使 doc hash 变化,真实执行后报:
    RuntimeError: module was compiled against NumPy C-API version 0x12 (NumPy 2.0)
    but the running NumPy has C-API version 0x11
    
    根因是 vllm==0.23.0 wheel + vllm-ascend==0.23.0 把 numpy 降到 1.26.4,而 xgrammar/tvm_ffi 按 NumPy 2.0 编译。与 vllm-ascend 自身 pip doctest 的失败同根因,需要单独修(例如改为源码构建 vllm 或锁定兼容的 numpy 组合)。
  • slime-examples(10 条):main 上所有 matrix 作业均为 skipped(https://github.com/Ascend/docs/actions/runs/46091708383 )。本 PR 改了 examples-guards/slime/scripts/setup_example.sh 后首次真实执行,pip install -e deps/slime-ascend(fork HEAD a4475d5)报:
    error: Multiple top-level packages discovered in a flat-layout: ['slime', 'docker', 'patches'].
    
    属于 slime-ascend 仓库的 packaging 问题(新增了顶层 patches/ 目录),需要上游 fork 修 pyproject.toml 或 pin 到可用 ref。

结论

  • 本 PR 的改动(删除 nginx-pypi-cache 引用、pip 索引回落到公网)没有引入上述失败;文档 build 检查为 SUCCESS。
  • 以上失败建议单独建 issue 跟踪,不宜作为本 PR 的阻塞项。

The lmcache/onnxruntime quick-start doctests and the ms-swift/specforge/slime example guards currently fail for pre-existing or upstream reasons. Revert the cleanup in these files so this PR only carries changes whose checks pass; the cleanup will be submitted in a separate PR.
ccijunk added a commit to ccijunk/docs that referenced this pull request Nov 28, 2026
github-actions Bot pushed a commit that referenced this pull request Nov 28, 2026
ccijunk added a commit to ccijunk/docs that referenced this pull request Nov 28, 2026
github-actions Bot pushed a commit that referenced this pull request Nov 28, 2026
ccijunk added a commit to ccijunk/docs that referenced this pull request Nov 30, 2026
github-actions Bot pushed a commit that referenced this pull request Nov 30, 2026
@ccijunk
ccijunk force-pushed the ci/remove-nginx-pypi-cache branch from fce6303 to 542f7fa Compare December 1, 2026 02:32
github-actions Bot pushed a commit that referenced this pull request Dec 1, 2026
@ccijunk
ccijunk force-pushed the ci/remove-nginx-pypi-cache branch from 83ed2b2 to 542f7fa Compare December 1, 2026 06:32
github-actions Bot pushed a commit that referenced this pull request Dec 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant