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 摘要。