config: use a different source of versioning#9486
Conversation
|
If the code above in the Makefile does not pass our own validation, we should remove it, I find it confusing. Or we can change what was done here: #9413 to put the default into the config file (with a warning) if the version used is not tagged as a release. |
|
I see a few more places where the version is set based on |
|
I don't have the full context on this PR; but I'd like to understand the motivation for the change. My impression is that having the git hash in the version is very useful to find out the code behind a log. |
|
Related: #9503. I'm not convinced though that this PR is the best approach. I agree with @sergio-mena that having the commit hash in the version is useful. The way this is usually handled in semver, however, is to use build metadata. For example, building off of a tagged commit should produce the version specified in Building off of a branch or non-tagged commit should produce |
|
Just discussed with @cmwaters synchronously. My understanding is that we agree for the hash to be there (appended at the end) in our "Makefile" when we are "git checked out" on a commit that has no release (or release candidate) tag; and should not be there in any alpha, beta, release candidate, or official release. |
|
ok I've used Just as a reminder, this only really affects us, the engineering team, who use the Makefile to build the tendermint binary. |
thanethomson
left a comment
There was a problem hiding this comment.
LGTM! Thanks @cmwaters. I see the linter's complaining about the code not being formatted though?
* config: use a different source of versioning (tendermint#9486) * Changed version generation * Fixed comment describing the versioning Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Config versioning pulls the version from
version.TMCoreSemVer. When building in this repo, the Makefile injects the git branch name as the version, overwriting this value. git branch names of course don't follow semver so the config errors on startup.This PR changes the config version to use
version.TMVersionDefaultwhich we manually set.I think we should consider removing this Makefile injection.
The main value seems to be making it easier to tell what branch a node is based off but engineers can just as easily communicate that