-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: 4.4.31, 6.0.29, 5.0.34, 8.2.11, 8.0.26, 7.0.37, 8.3.7
-
Component/s: None
-
None
-
DevProd Build
-
Fully Compatible
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
What happened
Historically every MongoDB release tag (rX.Y.Z) has been an annotated git tag. Starting at a recent point, the release pipeline began pushing lightweight tags instead. This regression now affects every supported release series, and it breaks version-string generation for anyone building from a tagged source tree.
Verified against github.com/mongodb/mongo (git 2.39.5) with git cat-file -t <tag> (tag = annotated, commit = lightweight). The cutover point per series:
Series Last annotated First lightweight (and after)
4.4.x r4.4.30 r4.4.31
5.0.x r5.0.32 r5.0.33, r5.0.34
6.0.x r6.0.27 r6.0.28, r6.0.29
7.0.x r7.0.32 r7.0.34, r7.0.35, r7.0.37 (note: r7.0.36 is annotated again)
8.0.x r8.0.21 r8.0.23, r8.0.24, r8.0.25, r8.0.26
8.2.x r8.2.7 r8.2.9, r8.2.10, r8.2.11
8.3.x r8.3.1 r8.3.2, r8.3.3, r8.3.4, r8.3.7
All series flipped at roughly the same time, and r7.0.36 briefly reverted to annotated — indicating this is an unguarded regression in the release/tagging pipeline rather than a one-off mistake.
Why it matters
buildscripts/utils.py derives the build version via:
- buildscripts/utils.py
def get_git_describe():
"""Return 'git describe --abbrev=7'."""
proc = subprocess.Popen("git describe --abbrev=7", ...)
consumed by SConstruct ('version': utils.get_git_describe()[1:]).
Plain git describe (without --tags) only considers annotated tags. When a release commit carries only a lightweight tag, git describe skips it and walks back to the previous annotated tag,
producing a wrong version string.
Example on r4.4.31:
- HEAD checked out at r4.4.31
$ git describe --abbrev=7
r4.4.30-16-gcfe43bb3f7a # WRONG -> reported version "4.4.30-16-g..."
$ git describe --abbrev=0 --tags
r4.4.31 # correct
A mongod built from a clean git checkout r4.4.31 therefore reports its version as 4.4.30-16-gcfe43bb3f7a instead of 4.4.31. The same happens for every lightweight-tagged release above.
Steps to reproduce
git clone https://github.com/mongodb/mongo.git
cd mongo
git checkout r4.4.31 # or any lightweight-tagged release
git cat-file -t r4.4.31 # -> commit (expected: tag)
git describe --abbrev=7 # -> r4.4.30-16-g... (expected: r4.4.31)
Expected behavior
All release tags should be annotated, consistent with historical convention, so git describe and the SCons build produce the correct version string.