fix: check versions across all the defined maven registries#13747
Merged
kbukum1 merged 1 commit intodependabot:mainfrom Feb 3, 2026
Merged
fix: check versions across all the defined maven registries#13747kbukum1 merged 1 commit intodependabot:mainfrom
kbukum1 merged 1 commit intodependabot:mainfrom
Conversation
1 task
50e3c52 to
1d7eea3
Compare
d4ec419 to
ddf0f86
Compare
Contributor
Author
|
Could you please review this and share your feedback if any? Thank you in advance! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Maven version checking to scan all configured repositories instead of stopping at the first repository that responds. Previously, Dependabot would break after finding versions in the first repository, potentially missing newer versions available in other repositories. The fix ensures the highest version across all repositories is correctly identified.
Key changes:
- Modified version collection logic to aggregate results from all repositories
- Added test coverage for multi-repository scenarios
- Updated test expectations to reflect correct behavior when versions exist in multiple repositories
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
maven/lib/dependabot/maven/package/package_details_fetcher.rb |
Removed break statement to continue collecting versions from all repositories instead of stopping at the first |
maven/spec/fixtures/maven_central_metadata/with_release_older_version.xml |
Added fixture representing a repository with older versions to test cross-repository version comparison |
maven/spec/dependabot/maven/update_checker/version_finder_spec.rb |
Added test case validating that all repositories are checked and the highest version is selected; updated existing test expectations to reflect corrected source_url behavior |
kbukum1
approved these changes
Dec 31, 2025
b6453f8 to
3ada364
Compare
2e8026d to
f1d0bcf
Compare
72f8176 to
cbffdc0
Compare
Contributor
Author
|
Could you please clarify what's blocking this merge? Do you need any additional information, reproducer or tests? Thanks |
7d77995 to
864965a
Compare
864965a to
920df76
Compare
kbukum1
approved these changes
Feb 3, 2026
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?
When checking for new versions, we shouldn’t assume that the first repository to respond has the latest version, as it might return a stale one. Instead, Dependabot should scan all repositories, aggregate all available metadata for an artifact, and select the highest version available across them
This behavior was introduced with #5872 in order to reduce the network load, and while the following is true while resolving
This does not directly translate while looking for new versions as documented in the spec.
For more details, see #5872 (comment)
Fixes #9383
How will you know you've accomplished your goal?
Running the updated version using my reproducer works as expected
See: https://github.com/yeikel/dependabot-reproducer-9383
Current
After:
Checklist