From 4a624d46f932315908762ce0a46e2568c21fc262 Mon Sep 17 00:00:00 2001 From: "ark-hand[bot]" <315378070+ark-hand[bot]@users.noreply.github.com> Date: Thu, 20 Aug 2026 01:35:37 +0800 Subject: [PATCH] ci(lint): run ruff directly without syncing project dependencies uv sync in lint pulled every runtime dependency, including a 34MiB wheel that consistently stalls between cluster runners and the internal mirror (small files download instantly; large ones hang for 20+ min). Ruff is static and needs none of them, so install only the ruff version pinned by uv.lock and run it directly. Also trigger on pipeline-yaml changes so edits to this file are self-tested. Co-Authored-By: Claude Sync-Source-Commit: 9b16f8e052569f62fab726bd17e4bae9cf559d68 Ark-APIs-Commit: 59c90de5ac837a87443bd463e4500f6ef6eceda6 Hand-Written-Reason: Manual lint pipeline fix (run ruff directly without syncing project dependencies). No ark-apis regeneration involved; attributed to the same ark-apis snapshot as parent. Release-Version: 0.2.0 --- .codebase/pipelines/python-lint-ci.yaml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.codebase/pipelines/python-lint-ci.yaml b/.codebase/pipelines/python-lint-ci.yaml index 9909f00..32dc9be 100644 --- a/.codebase/pipelines/python-lint-ci.yaml +++ b/.codebase/pipelines/python-lint-ci.yaml @@ -5,6 +5,7 @@ trigger: paths: - "src/arkruntime/**" - "pyproject.toml" + - ".codebase/pipelines/python-lint-ci.yaml" jobs: lint: @@ -12,16 +13,17 @@ jobs: runs-on: cluster: envs: - # uv does not read pip.conf, so it resolves against pypi.org directly - # and times out from CN cluster runners. The mirror URL itself lives - # in Repository -> Pipeline -> Variables (PYPI_MIRROR_URL) so the - # internal hostname stays out of this mirrored-to-GitHub tree; pip is - # platform-configured and needs nothing. - UV_INDEX_URL: ${{PYPI_MIRROR_URL}} + # Ruff is a static analyzer — it needs no project dependencies, so the + # lint installs only the ruff version pinned by uv.lock instead of + # syncing the whole venv. The full sync pulled a 34MiB dependency that + # stalls between cluster runners and the internal mirror (small files + # fly, >10MiB ones hang), making lint take 20+ minutes or never finish. + # The version is refreshed by `make generate` syncing uv.lock content; + # bump it there when the lock moves. + RUFF_VERSION: 0.15.14 steps: - name: ruff lint and format check commands: - - pip install --quiet uv - - uv sync --frozen --no-progress - - uv run ruff check src/ - - uv run ruff format --check src/ + - pip install --quiet --index-url ${{PYPI_MIRROR_URL}} "ruff==${RUFF_VERSION}" + - ruff check src/ + - ruff format --check src/