Skip to content

Conversation

@func25
Copy link
Contributor

@func25 func25 commented Jul 8, 2025

during build the linker flag that populates buildinfo.Version was pointing at github.com/VictoriaMetrics/VictoriaLogs/lib/buildinfo, but all binaries import github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo.

+ VM_PKG_PREFIX := github.com/VictoriaMetrics/VictoriaMetrics

- GO_BUILDINFO = -X '$(PKG_PREFIX)/lib/buildinfo.Version=$(APP_NAME)-$(DATEINFO_TAG)-$(BUILDINFO_TAG)'
+ GO_BUILDINFO = -X '$(VM_PKG_PREFIX)/lib/buildinfo.Version=$(APP_NAME)-$(DATEINFO_TAG)-$(BUILDINFO_TAG)'

Fixes #409

@Shawn8901
Copy link

Can confirm that it also solves -version but the journal still shows a strange version number after changing that, but not sure if related at all.

@valyala valyala merged commit 1a43ddb into master Jul 8, 2025
1 check passed
@valyala valyala deleted the fix-version branch July 8, 2025 09:24
@valyala
Copy link
Contributor

valyala commented Jul 8, 2025

@func25 , thanks for the fix!

valyala added a commit that referenced this pull request Jul 8, 2025


While at it, remove the VM_PKG_PREFIX var from Makefile and use the inline reference to the github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo
package inside GO_BUILDINFO var. This simplifies reading the initialization code for GO_BUILDINFO var.

Updates #419
Updates #409
@valyala
Copy link
Contributor

valyala commented Jul 8, 2025

@func25 , please see the follow-up commit 7db3660 , which mentions the fix in the VictoriaLogs changelog.

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.

Version no longer shown in /metrics endpoint

3 participants