-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug vars: Expose build version in /debug/vars
#14713
Debug vars: Expose build version in /debug/vars
#14713
Conversation
Signed-off-by: Tyler Coleman <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
* Export `buildValues` for use in the unit test * Add a unit test to assert that the version name appears in `buildValues` * Fix spelling and spacing in other files Signed-off-by: Tyler Coleman <[email protected]>
Signed-off-by: Tyler Coleman <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good @tycol7!
This change is so minor that I'm not sure it merits documentation, but the Vitess eng. team will make the call on that.
Not sure it's worth website documentation, but you could add something to the 19.0.0 changelog. Here's an example: https://github.com/vitessio/vitess/blob/main/changelog/19.0/19.0.0/summary.md#new-stats.
go/vt/servenv/buildinfo.go
Outdated
@@ -33,6 +33,7 @@ var ( | |||
buildTime = "" | |||
buildGitRev = "" | |||
buildGitBranch = "" | |||
buildVersion *stats.String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe call this statBuildVersion
to distinguish from the other variables, which are not stats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -190,7 +190,7 @@ var ( | |||
vstreamSkewDelayCount = stats.NewCounter("VStreamEventsDelayedBySkewAlignment", | |||
"Number of events that had to wait because the skew across shards was too high") | |||
|
|||
vindexUnknownParams = stats.NewGauge("VindexUnknownParameters", "Number of parameterss unrecognized by Vindexes") | |||
vindexUnknownParams = stats.NewGauge("VindexUnknownParameters", "Number of parameters unrecognized by Vindexes") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol thank you
Signed-off-by: Tyler Coleman <[email protected]>
Signed-off-by: Tyler Coleman <[email protected]>
|
Signed-off-by: Tyler Coleman <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, @tycol7 ! ❤️ Thank you for this.
Signed-off-by: Tyler Coleman <[email protected]>
Description
Expose
BuildVersion
(as defined ingo/vt/servenv/version.go
) via/debug/vars
. Allows programmatic access to the build version. E.g.,Related Issue(s)
/debug/vars
#14736Checklist