[codex] Use reachable git tag for build version#3115
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3115 +/- ##
=======================================
Coverage 43.48% 43.48%
=======================================
Files 352 352
Lines 30020 30020
=======================================
Hits 13053 13053
Misses 16095 16095
Partials 872 872
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
adel121
approved these changes
Jun 9, 2026
This was referenced Jun 9, 2026
tbavelier
added a commit
that referenced
this pull request
Jun 9, 2026
* Use reachable git tag for build version * Use short SHA for untagged build version (cherry picked from commit 7656117) Co-authored-by: Timothée Bavelier <[email protected]>
tbavelier
added a commit
that referenced
this pull request
Jun 9, 2026
* Use reachable git tag for build version * Use short SHA for untagged build version (cherry picked from commit 7656117) Co-authored-by: Timothée Bavelier <[email protected]>
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 changed
Update the Makefile version discovery used by build ldflags so the default embedded operator version only uses an explicit release tag when
HEADis exactly on that tag. Untagged builds now fall back to the current short commit SHA.Why
The previous default selected the highest version tag present in the local clone:
That made CI sensitive to unrelated fetched tags. A v1.27 release-branch image build could embed
v1.28.0-rc.1if that tag existed in the checkout, even though the image was built from the correct v1.27 commit.Impact
v1.27.1-rc.1.main, release branches, or custom branches embed only the short SHA.make VERSION=...usage still takes precedence, preserving the bundle/release workflow.Validation
make -n docker-build-push-ci GOARCH=amd64 IMG=test/operator:testmake -n VERSION=1.27.1-rc.1 LATEST_VERSION=1.27.0 bundle