Skip to content

GO-6869 Exclude nightly tags from git describe in CI workflows#3064

Merged
requilence merged 1 commit intodevelopfrom
go-6869-go-incorrect-version-gitsummary
Apr 15, 2026
Merged

GO-6869 Exclude nightly tags from git describe in CI workflows#3064
requilence merged 1 commit intodevelopfrom
go-6869-go-incorrect-version-gitsummary

Conversation

@requilence
Copy link
Copy Markdown
Contributor

Summary

  • Add --exclude='*-nightly.*' to git describe in build.yml, perftests-grafana.yml, and perftests.yml
  • Fixes non-deterministic tag selection when a nightly tag and a release tag coexist on the same commit
  • nightly.yml already computes its version explicitly and is unaffected

Problem

git describe --tags --always picks tags non-deterministically when multiple tags point to the same commit. A nightly tag like v0.44.0-nightly.20260307.1 can be selected over the actual release tag v0.49.0, causing the built binary to report an incorrect version.

Fix

# Before
GIT_SUMMARY=$(git describe --tags --always)

# After
GIT_SUMMARY=$(git describe --tags --exclude='*-nightly.*' --always)

Test plan

  • Trigger a release build on a commit that has both a nightly tag and a release tag — verify the binary reports the release version

Add --exclude='*-nightly.*' to git describe so release builds always
pick the actual release tag when both a nightly and release tag exist
on the same commit.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

New Coverage 46.6% of statements
Patch Coverage 0.0% of changed statements (0/0)

Coverage provided by https://github.com/seriousben/go-patch-cover-action

@requilence requilence requested a review from cheggaaa April 13, 2026 10:25
@requilence requilence merged commit fe0bef8 into develop Apr 15, 2026
14 checks passed
@requilence requilence deleted the go-6869-go-incorrect-version-gitsummary branch April 15, 2026 12:06
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants