Dependabot uv job times out and tries to update workspace members

未關閉
#7,457 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 3 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
45/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
github-actions, python, yaml

研究方向

Start by reading .github/dependabot.yml and the root pyproject.toml workspace configuration; the linked Dependabot run shows the failure and timeout. Compare the two proposed approaches: renaming internal distributions or generating and validating the ignore list. Done means Dependabot skips workspace members and the weekly uv update completes without timing out.

由索引模型根據 Issue 內容生成。

描述

The weekly Dependabot uv update for / has been timing out or failing since early November (e.g. https://github.com/mozilla/bugbug/network/updates/1694419512).

Two causes:

  1. Dependabot treats uv workspace members as PyPI packages. testrail-client exists on PyPI (0.1.2), so Dependabot tries to "update" our 0.1.0 workspace member and fails with dependency_file_not_resolvable. Same for agent-tools. Dependabot does not honor { workspace = true } sources, even when declared in the root pyproject.toml.
  2. The job is right at the ~55 min timeout. Each check re-resolves the whole workspace (~16s each) and a run does 200-250 checks; ~30 of those are on workspace members, which we never want updated.

Ignoring the workspace members in .github/dependabot.yml fixes both, but an explicit list of names would have to be kept in sync manually as members are added. Options to avoid that:

Option 1: rename internal packages under a common prefix

Most members are already hackbot-*. Rename the remaining ones (agent-tools, autowebcompat-tools, bugzilla-client, lando-client, phabricator-client, phabricator-proxy, testrail-client) to e.g. hackbot-agent-tools, hackbot-testrail-client, ... so the ignore block becomes a fixed pair of wildcards:

ignore:
  - dependency-name: "hackbot-*"
  - dependency-name: "bugbug*"

Only distribution names change (pyproject.toml files and uv.lock); import names like testrail_client stay the same. It also removes a dependency-confusion risk: anything installing these outside the workspace (Docker builds, plain pip install) could currently pull an unrelated package from PyPI.

Option 2: generate the ignore list automatically

Add a pre-commit hook that reads the workspace member names and rewrites (or validates) the ignore block in dependabot.yml. No renames needed, but it adds a script to maintain and the PyPI name collisions remain.

主要語言
Python
星號
579
分支
369
平均合併
3 天 5 小時
30 天內合併 PR
139

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

mozilla/bugbug 的其他 Issue

查看 mozilla/bugbug 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。