fix(uv): grapher not preferring lockfile#14518
Merged
jakecoffman merged 1 commit intomainfrom Mar 23, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_fileto returnuv.lockwhen present, otherwise fall back topyproject.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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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