Skip to content

Comments

MTV-4517 | standardise version embedding using git-describe#4595

Merged
mnecas merged 1 commit intokubev2v:mainfrom
rgolangh:standardise-version-extraction
Feb 13, 2026
Merged

MTV-4517 | standardise version embedding using git-describe#4595
mnecas merged 1 commit intokubev2v:mainfrom
rgolangh:standardise-version-extraction

Conversation

@rgolangh
Copy link
Collaborator

@rgolangh rgolangh commented Feb 4, 2026

Resoles: MTV-4517

By using git describe the version of the binary becomes dependant on git
as source-of-truth. When combined with tags this is how the version
string looks like when the HEAD has the tag 'v2.10.4'

I0208 19:25:09.323603 3637005 vsphere-xcopy-volume-populator.go:313] binary=vsphere-xcopy-volume-populator version=v2.10.4 vib_version=0.3.0 vmkfstools_wrapper_version=0.3.0

If the HEAD is 2 commits above the tag v2.10.4 then version will be:
v2.10.4-2-g{GIT_COMMIT_SHA}

Signed-off-by: Roy Golan rgolan@redhat.com

@rgolangh rgolangh requested a review from mnecas as a code owner February 4, 2026 17:13
@rgolangh
Copy link
Collaborator Author

rgolangh commented Feb 4, 2026

This should help with #4502 and #4193

@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 10.03%. Comparing base (f1fe5d0) to head (33abad4).
⚠️ Report is 1796 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4595      +/-   ##
==========================================
- Coverage   15.45%   10.03%   -5.42%     
==========================================
  Files         112      468     +356     
  Lines       23377    53463   +30086     
==========================================
+ Hits         3613     5367    +1754     
- Misses      19479    47629   +28150     
- Partials      285      467     +182     
Flag Coverage Δ
unittests 10.03% <ø> (-5.42%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@rgolangh rgolangh force-pushed the standardise-version-extraction branch from c991f73 to 50e4199 Compare February 8, 2026 16:36
@rgolangh rgolangh changed the title MTV-XXXX | standardise version embedding using git-describe MTV-4166 | standardise version embedding using git-describe Feb 8, 2026
@rgolangh
Copy link
Collaborator Author

rgolangh commented Feb 8, 2026

@solenoci @mnecas PTAL

@rgolangh rgolangh force-pushed the standardise-version-extraction branch 3 times, most recently from eb93ba7 to 5f5fc0c Compare February 8, 2026 17:27
@rgolangh rgolangh force-pushed the standardise-version-extraction branch 2 times, most recently from 9341b40 to 08af95f Compare February 11, 2026 07:43
@rgolangh rgolangh force-pushed the standardise-version-extraction branch from 08af95f to 11da0ec Compare February 11, 2026 14:13
@rgolangh rgolangh force-pushed the standardise-version-extraction branch from 11da0ec to ef2c5ed Compare February 12, 2026 16:34
@@ -1,5 +1,4 @@
# Ignore Git files
.git
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to remove this so the git info be used inside the container build

@rgolangh rgolangh force-pushed the standardise-version-extraction branch from 1b19daa to 14530f8 Compare February 12, 2026 19:37
Resolves: MTV-4166

By using git describe the version of the binary becomes dependant on git
as source-of-truth. When combined with tags this is how the version
string looks like when the HEAD has the tag 'v2.10.4'

    I0208 19:25:09.323603 3637005 vsphere-xcopy-volume-populator.go:313] binary=vsphere-xcopy-volume-populator version=v2.10.4 vib_version=0.3.0 vmkfstools_wrapper_version=0.3.0

If the HEAD is 2 commits above the tag v2.10.4 then version will be:
v2.10.4-2-g{GIT_COMMIT_SHA}

Signed-off-by: Roy Golan <rgolan@redhat.com>
@rgolangh rgolangh force-pushed the standardise-version-extraction branch from 14530f8 to 33abad4 Compare February 12, 2026 19:41
@sonarqubecloud
Copy link

@mnecas mnecas merged commit 739d9b7 into kubev2v:main Feb 13, 2026
15 checks passed
@rgolangh rgolangh changed the title MTV-4166 | standardise version embedding using git-describe MTV-4517 | standardise version embedding using git-describe Feb 15, 2026
@rgolangh
Copy link
Collaborator Author

commit message should say MTV-4517. Will fix on downport

@rgolangh
Copy link
Collaborator Author

/backport release-2.11

@github-actions
Copy link

🔄 Backport Status

Starting backport of PR #4595 to release-2.11
🚀 Live mode - Changes will be applied

View workflow run

@github-actions
Copy link

Backport Completed Successfully

PR #4595 has been successfully backported to release-2.11.

A new pull request should have been created with the backported changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants