-
Notifications
You must be signed in to change notification settings - Fork 809
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
Emitting version metrics also adding a githook that runs a script the automatically updates the version unless the user manually skips #4994
Conversation
common/metrics/runtime.go
Outdated
@@ -52,6 +52,8 @@ var ( | |||
|
|||
// goVersion is the current runtime version. | |||
goVersion = runtime.Version() | |||
// cadenceVersion is the current version of cadence | |||
cadenceVersion = "0.25.x" |
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.
Can we add a makefile step or some other test step to ensure this doesn't get out of sync with the tagged release? @Groxx does this seem insane?
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.
I think Stephen/Ender was saying that the tag version being the last and all the way to do it is to make sure we update the release steps to update this version with every branch since the version itself isn't accessible.
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.
I mean something like make test
also doing a grep for this value and ensuring it's not out of sync with the tag
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.
late to the game, but:
unfortunately I don't think there's a way to automate this, short of automating releases entirely... which brings other major complications too. though we might do that eventually.
for environments that use go modules (i.e. not our internal monorepo, at least currently), we could pull this information from the module's build-time metadata, which is probably the best option. that's always up to date.
for non-module environments... dunno.
Pull Request Test Coverage Report for Build 01843a8e-0849-4c88-849e-1f372e273338
💛 - Coveralls |
Please update the commit summary to include: The problem:That figuring out what the open-source version is doing for emitted metrics is hard, and this is a change to expose the open-source version as a snapshot to logs, metrics etc. It'll help operationally to understand what's running where. The solution
Potentially this will be annoying / not work for some build or pipeline or other edge-case that |
Adding version into the build_info metric gauge.
Played around with metrics on grafana should be able to add a graph in pretty easily once this is done.
Also added a script that updates a version number with a timestamp if there's no manual update the major or patch version.
Added a githook that ensures the user is aware that they're updating the version or skipping it entirely if it's something really small