Git Submodules: Prioritizing Tagged Releases Over Latest Commits #13534
Replies: 2 comments
-
|
I'm really looking forward to this change!
I feel that many submodules might have than 250 commits between tags, though I don't have any evidence of that to be the case. For me the most commits on any submodule since a last tag is 201, which is from https://bitbucket.org/multicoreware/x265_git.git
I think opt-out as the new behavior will be much preferred. Personally, I have to close dependabot PRs basically daily on many submodules after verifying that they are not a tagged release.
.NET projects use 4 place versions, e.g.
Most likely. It would be nice to ignore tags/releases marked as a pre-release in the GitHub API. I know this isn't part of git itself, so understand if that's out of scope. |
Beta Was this translation helpful? Give feedback.
-
I'm looking forward to using this at one point with VCPKG releases when integrating their repo as git submodule to avoid spamming updates. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
We're proposing a significant enhancement to how Dependabot handles
gitsubmoduleupdates. Currently, Dependabot always bumps submodules to the latest commit on the tracked branch, regardless of release tags. PR #13052 introduces intelligent version detection that prioritizes semantically versioned tags over untagged commits.The Problem
When using
package-ecosystem: git_submodule, dependencies are currently always bumped to the latest commit on the branch specified in.gitmodule, even when only certain commits have release tags. This creates several issues:This has been a long-standing pain point (see #1639, #2192).
The Solution
PR #13052 introduces semantic version awareness for git submodules:
v1.2.3,2.0.0) are now recognized as release versions0.0.0-N) that sort lower than tagged releasesHow It Works
vprefix)Example Behavior
Consider a submodule with this commit history:
Before: Dependabot would update to ghi789 (latest commit)
After: Dependabot will update to
abc123(latest tagged releasev2.1.0)Opt-Out Mechanism
Users who prefer tracking the latest commit (bleeding edge) can still do so by manually bumping past the latest tag. Once you're ahead of all tagged releases, Dependabot will continue tracking untagged commits.
Testing & Validation
The PR includes comprehensive test coverage:
Breaking Changes?
No breaking changes expected. This is an enhancement that makes the behavior more intelligent while maintaining backward compatibility. Repositories without tags will continue to work exactly as before.
Questions for the Community
Related Issues
We welcome your feedback before merging this change! Please share your thoughts, concerns, or suggestions below.
Beta Was this translation helpful? Give feedback.
All reactions