[Bug] 'grafana-server' version commit-info incorrect #7227

ikkemaniac opened this Issue Jan 11, 2017 · 1 comment


None yet

2 participants

ikkemaniac commented Jan 11, 2017 edited
  • What Grafana version are you using?
    V4.0.2 (32-bit and 64-bit from source, 64-bit precompiled) , V4.1.0 (32-bit from source)
  • What datasource are you using?
    SimpleJSON v1.2.4
  • What OS are you running grafana on?
  • What did you do?
    $ grafana-server -v
  • What was the expected result?
    Version 4.0.2 (commit: GIT_COMMIT_HASH[-dirty])
  • What happened instead?
    Version 4.0.2 (commit: GIT_TAG[-dirty]) displayed examples:
    Version 4.0.2 (commit: v4.0.2)
    Version 4.0.2 (commit: v4.0.2-dirty)
    Version 4.1.0-beta1 (commit: v4.1.0-beta1)
    grafana uses the getGitSha function in build.go which calls git describe --always --dirty.
$ git --version 
git version

From man git describe

--always _____ Show uniquely abbreviated commit object as fallback.
Git will not display a hash necessarily, but it will describe the current state uniquely.

*** I have to say that while digging deeper and deeper into this while writing the issue i actually found out that the output produced by the git cmd, with more than only the tag ofcourse, can directly be used in a git checkout GIT_DESCRIBE_ALWAYS_OUTPUT so this is not really an issue but maybe a misunderstanding of what is meant with commit because this is so often used to display the commit SHA***

But when not on a 'tagged' commit (32bit) NA is shown while the git describe shows a lot more:

$ ~/grafana/grafana-src/src/github.com/grafana/grafana/bin$ ../../../../../bin/grafana-server -v
Version 4.1.0 (commit: NA)
$ ~/grafana/grafana-src/src/github.com/grafana/grafana/bin$ git describe --always --dirty
  • Cause
  1. ? no suggestion, sorry
torkelo commented Jan 12, 2017

strange, maybe some issue in this code:


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment