fix: filter git tags with --match 'v*' to avoid pkg/ submodule tags in MILVUS_VERSION#48418
fix: filter git tags with --match 'v*' to avoid pkg/ submodule tags in MILVUS_VERSION#48418yanliang567 wants to merge 1 commit intomilvus-io:masterfrom
Conversation
…n MILVUS_VERSION `git describe --exact-match --tags` may return `pkg/v2.6.13` (Go submodule tag) instead of `v2.6.13` when both tags exist on the same commit. The subsequent `sed 's/^v//'` does not strip the `pkg/` prefix, causing GetVersion to return `pkg/v2.6.13` instead of `2.6.13` on release builds. Add `--match 'v*'` to only match root module tags starting with `v`. issue: milvus-io#47823 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: yanliang567 <82361606+yanliang567@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yanliang567 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
[ci-v2-notice] To rerun ci-v2 checks, comment with:
If you have any questions or requests, please contact @zhikunyao. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #48418 +/- ##
===========================================
+ Coverage 74.85% 77.55% +2.70%
===========================================
Files 1480 2107 +627
Lines 245722 349380 +103658
===========================================
+ Hits 183935 270974 +87039
- Misses 53516 70136 +16620
+ Partials 8271 8270 -1
🚀 New features to boost your workflow:
|
|
@yanliang567 go-sdk check failed, comment |
Summary
--match 'v*'togit describe --exact-match --tagsinMILVUS_VERSIONcalculationpkg/v2.6.13(Go submodule tag) from being picked instead ofv2.6.13on release buildsGetVersionreturnspkg/v2.6.13instead of2.6.13becausesed 's/^v//'doesn't strip thepkg/prefixRoot Cause
The milvus repo uses Go multi-module:
pkg/has its owngo.modwith tags likepkg/v2.6.13. When bothv2.6.13andpkg/v2.6.13exist on the same commit,git describe --exact-match --tagsmay return thepkg/prefixed tag.issue: #47823
Test plan
v*andpkg/v*tags:git describe --exact-match --tags --match 'v*'returns only the root tag🤖 Generated with Claude Code