豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

fix(uv): grapher not preferring lockfile#14518

Merged
jakecoffman merged 1 commit intomainfrom
fix-uv-manifest-file
Mar 23, 2026
Merged

fix(uv): grapher not preferring lockfile#14518
jakecoffman merged 1 commit intomainfrom
fix-uv-manifest-file

Conversation

@jakecoffman
Copy link
Copy Markdown
Member

@jakecoffman jakecoffman commented Mar 23, 2026

What are you trying to accomplish?

Dependabot must match Dependency Graph behavior and prefer the lockfile over the manifest. It was already parsing the lockfile, we just needed to return it in this method as well.

Anything you want to highlight for special attention from reviewers?

Pretty straight forward.

How will you know you've accomplished your goal?

I was expecting to see the uv smoke test failing due to this change but looks like uv's smoke tests were never set up. I will create a PR for that afterwards.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@jakecoffman jakecoffman changed the title fix UV grapher not preferring lockfile fix(uv): grapher not preferring lockfile Mar 23, 2026
@jakecoffman jakecoffman marked this pull request as ready for review March 23, 2026 19:30
@jakecoffman jakecoffman requested a review from a team as a code owner March 23, 2026 19:30
Copilot AI review requested due to automatic review settings March 23, 2026 19:30
Copy link
Copy Markdown
Contributor

@Ahmed3lmallah Ahmed3lmallah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the UV dependency grapher to align with GitHub Dependency Graph conventions by preferring uv.lock over pyproject.toml when selecting the “relevant” dependency file for dependency snapshot submissions.

Changes:

  • Update Dependabot::Uv::DependencyGrapher#relevant_dependency_file to return uv.lock when present, otherwise fall back to pyproject.toml.
  • Expand the UV dependency grapher spec to cover both lockfile-present and lockfile-absent scenarios.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
uv/lib/dependabot/uv/dependency_grapher.rb Prefer uv.lock as the relevant dependency file, with a clear error if neither file exists.
uv/spec/dependabot/uv/dependency_grapher_spec.rb Add coverage asserting uv.lock is preferred when present, otherwise pyproject.toml is used.

@jakecoffman jakecoffman merged commit 8341dc1 into main Mar 23, 2026
86 of 88 checks passed
@jakecoffman jakecoffman deleted the fix-uv-manifest-file branch March 23, 2026 19:52
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.

3 participants