Skip to content

[Backport v1.28] [codex] Use reachable git tag for build version#3119

Merged
tbavelier merged 1 commit into
v1.28from
backport-3115-to-v1.28
Jun 9, 2026
Merged

[Backport v1.28] [codex] Use reachable git tag for build version#3119
tbavelier merged 1 commit into
v1.28from
backport-3115-to-v1.28

Conversation

@dd-octo-sts

@dd-octo-sts dd-octo-sts Bot commented Jun 9, 2026

Copy link
Copy Markdown

Backport 7656117 from #3115.


What changed

Update the Makefile version discovery used by build ldflags so the default embedded operator version only uses an explicit release tag when HEAD is 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:

git tag | sort -V | tail -1

That made CI sensitive to unrelated fetched tags. A v1.27 release-branch image build could embed v1.28.0-rc.1 if that tag existed in the checkout, even though the image was built from the correct v1.27 commit.

Impact

  • Tagged release builds embed the exact release tag, for example v1.27.1-rc.1.
  • Untagged builds from main, release branches, or custom branches embed only the short SHA.
  • Explicit make VERSION=... usage still takes precedence, preserving the bundle/release workflow.

Validation

  • make -n docker-build-push-ci GOARCH=amd64 IMG=test/operator:test
  • make -n VERSION=1.27.1-rc.1 LATEST_VERSION=1.27.0 bundle

* Use reachable git tag for build version

* Use short SHA for untagged build version

(cherry picked from commit 7656117)
@dd-octo-sts
dd-octo-sts Bot requested a review from a team as a code owner June 9, 2026 13:29
@dd-octo-sts dd-octo-sts Bot added tooling qa/skip-qa backport label added by backport action bot label added by backport bot team/container-platform labels Jun 9, 2026
@codecov-commenter

codecov-commenter commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.64%. Comparing base (33d6508) to head (daaff3c).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            v1.28    #3119   +/-   ##
=======================================
  Coverage   43.64%   43.64%           
=======================================
  Files         350      350           
  Lines       30097    30097           
=======================================
  Hits        13135    13135           
  Misses      16090    16090           
  Partials      872      872           
Flag Coverage Δ
unittests 43.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33d6508...daaff3c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@datadog-prod-us1-4

Copy link
Copy Markdown

Code Coverage

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 43.96% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: daaff3c | Docs | Datadog PR Page | Give us feedback!

@tbavelier
tbavelier merged commit 104bcf9 into v1.28 Jun 9, 2026
54 of 62 checks passed
@tbavelier
tbavelier deleted the backport-3115-to-v1.28 branch June 9, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport label added by backport action bot label added by backport bot qa/skip-qa team/container-platform tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants