skaffold: skaffold image does not have version.

Expected behavior

In #2055, we added version string to label value like “skaffold-<version>” This was to get some metrics on which versions of skaffold are in used. However, that is breaking users who use skaffold image which does not have version set See here

Actual behavior

skaffold image shd have version set.

Information

  • Skaffold version: version…
  • Operating system: …
  • Contents of skaffold.yaml:
<paste your skaffold.yaml here>

Steps to reproduce the behavior

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 15 (11 by maintainers)

Most upvoted comments

🤦‍♂️ I should have checked more thoroughly: when using the exact image as @Jonathan34, the version is indeed emtpy:

docker run --rm -ti gcr.io/k8s-skaffold/skaffold@sha256:275894cbe96cbf2c5262bba710530acbad91bd8af329b6d6eea9ca6086d14642 \
   skaffold version -o "'{{.Version}}'   '{{.GitCommit}}'  '{{.BuildDate}}'  '{{.GitTreeState}}'  '{{.Platform}}'  "

yields

''   '63f353f05fd6258bb4a682e658bf5656e7f88a77'  '2019-05-08T16:47:13Z'  'clean'  'linux/amd64'  %

So the version is indeed unset.

Commit 63f353f05f is a merge with two parents, but that does not break git describe so that it outputs “”. Could there be any chance that the VERSION env variable is set to an empty string for the non-release cloudbuild?