-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
skaffold image does not have version. #2093
Comments
@tejal29 As said in #2062, I don't think this is actually the case. Take a look at docker run --rm -ti gcr.io/k8s-skaffold/skaffold:latest skaffold version \
-o "{{.Version}} {{.GitCommit}} {{.GitTreeState}}" which prints
The version is therefore set with value a117236. |
docker image tagged v0.28.0 works fine btw. |
Btw, the reason why the version is not formatted as |
@tejal29 So I tested this locally with
When I run the getting-started example inside this container, I get the label @Jonathan34 I think this must be a different problem, maybe connected to istio? |
@corneliusweig I saw that error happening for a standard deployment (and service and namespace object) too using 0.29:
|
@Jonathan34 is that deterministic or does it only happen once in a while? It would also help, if you could provide a minimal example where this happens. |
It happens every time. Can we do a hangout/zoom (or whatever else) ? That might be easier to illustrate and run some live debugging. |
@corneliusweig I didnt make it clear on #2062, i am fixing the bug where skaffold should not append a "-<version>" if version is empty. Regarding why version is empty for @Jonathan34 i am not yet sure. |
|
agree with 1.
i pulled latest (yesterday) and put the sha in that comment: #2062 (comment) |
🤦♂️ 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
So the version is indeed unset. Commit 63f353f is a merge with two parents, but that does not break |
Looking at the logs it looks like it was resolving to empty for some reason...
|
@balopat I even tried a shallow git checkout, but that worked as expected (so no empty version string) |
yeah, this is completely related to our cloudbuild/dockerfile mishap... on a "good" latest build we have:
I.e. somehow the Dockerfile build picks up the result of the previous cross compilation (btw which is correctly copied to GCS with the correct version info in both the cases) In the "wrong" version we have
because this line in the Dockerfile results to an empty value... I understand when it doesn't work. Now I'm puzzled by how it can work at all, but the "caching" is hinting towards some kind of statefulness in our build process that I still have to wrap my head around... :D |
the fix is in: #2099 |
Expected behavior
In #2055, we added version string to label value like "skaffold-"
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
<paste your skaffold.yaml here>
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: