Skip to content
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

[feat] include non-release commit and repo dirty state info in version reported by the executable #107

Open
robbkidd opened this issue Apr 26, 2023 · 3 comments

Comments

@robbkidd
Copy link
Member

robbkidd commented Apr 26, 2023

As a vendor receiving telemetry from thousands of independent customer sources, Honeycomb has found that telemetry clients that include nuanced version information in their transmissions will dramatically shorten the time involved in troubleshooting data issues. In addition to a standard release version number, builds can include in their reported version whether the build occurred directly on the release commit or on an identifiable commit some number of changes away from a recent release commit and/or whether the build occurred with modifications to version-controlled files (repo "dirty" state).

A disadvantage of version.go's hard-coded number being solely managed with multimod is that the version number set within a built executable does not communicate whether the build was on the commit the release tag is on (so Actual Release build or a Dev Build between releases) or whether the repository working copy was "ditry". This is one benefit of the common-but-fiddly technique of determining a version at build time based on the output of git describe and setting the version for the build through LDFLAGS.

Originally posted by @robbkidd in #94 (comment) and then revised in #94 (comment)

@robbkidd
Copy link
Member Author

robbkidd commented Apr 26, 2023

I intend to get a PR opened today for this for your consideration! Overcome By Events in #94

@robbkidd
Copy link
Member Author

robbkidd commented Apr 27, 2023

Maybe obviated Definitely changed course in #94 after adding a version.go file to the project in response to comments there. multimod will update the hard-coded version string in this file as part of the current and soon-to-be-documented release process.

@robbkidd robbkidd changed the title chore: wire in builds knowing their version based on release tag [chore] wire in builds knowing their version based on release tag Apr 27, 2023
@robbkidd robbkidd changed the title [chore] wire in builds knowing their version based on release tag [feat] version reported from within the executable reflects non-release commit and/or dirty working copy Apr 27, 2023
@robbkidd
Copy link
Member Author

I'm going to scuttle my original description† here and update this issue to reflect the reported version addendum I described in a comment on #94 after a multimod-managed version.go was settled upon there.

Quick Version: add a releaseinfo package to the project to receive LDFLAG-set version number determined at build time

@robbkidd robbkidd changed the title [feat] version reported from within the executable reflects non-release commit and/or dirty working copy [feat] include non-release commit and repo dirty state info in version reported by the executable Apr 27, 2023
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

No branches or pull requests

1 participant