Closed errordeveloper closed 6 years ago
read
red?
Why only this one checkout
? Are the others not noisy/red too?
@ijc clone is also red, but I see only two lines, and it seems inappropriate to completely silence it, as you might want to see output if it fails (which is less unlikely)...
Also, I just noticed that our method results in -dirty
appended to the version string, i.e.:
> docker run -ti --entrypoint /usr/bin/kubelet linuxkit/kubelet:ea4a24907759efb729784fe5b50c3dc88feb046d --version
Kubernetes v1.9.0-dirty
I think that git checkout -q $REV -b build
could fix this, but will have to test it out... I think it's an important detail, users might get an impression that the code had been patched.
I meant all the other git checkout
s, there is at least cni and critools in addition to kube itself in this Dockerfile.
I don't think -q
suppresses the error messages:
$ git clone -q http://notathing/notarepo
fatal: unable to access 'http://notathing/notarepo/': Could not resolve host: notathing
Although maybe there would have been useful non-error messages before that point in some cases.
Perhaps 2>&1
without using -q
is the right answer? Assuming git can be trusted to exit with an error code on an error and we use set -e
where necessary.
The -dirty
thing is odd -- are you sure that is not a preexisting issue?
...there is at least cni and critools in addition to kube itself in this Dockerfile.
Ah, yes. I've done cni, but missed critools, will update.
Looks like -dirty
is a preexisting condition:
$ docker run -ti --entrypoint /usr/bin/kubelet linuxkit/kubelet:03205e3daddfeedeb64d4e023b42c225c8e00945 --version
Unable to find image 'linuxkit/kubelet:03205e3daddfeedeb64d4e023b42c225c8e00945' locally
03205e3daddfeedeb64d4e023b42c225c8e00945: Pulling from linuxkit/kubelet
1ed3bb82ce05: Pull complete
Digest: sha256:0f442097dcd90c1e46e5a90c68a2a7ea7173d451e2d4e8b81d18742903106d77
Status: Downloaded newer image for linuxkit/kubelet:03205e3daddfeedeb64d4e023b42c225c8e00945
Kubernetes v1.9.0-dirty
Looks like -dirty is a preexisting condition...
It is indeed – I didn't mean it was new, just thought I'd look into it while at it.
https://github.com/linuxkit/kubernetes/issues/44 now covers the -dirty
.
@ijc thanks, will deal with that separately.
Perhaps
2>&1
without using-q
is the right answer? Assuming git can be trusted to exit with an error code on an error and we use set-e
where necessary.
I think -q
is okay for checkout
s, but not sure about clone. I'd leave that for now, I'm quite happy we don't get a line for each progress update 🤣
LGTM but will need a rebase.
This gets rid of big red message in the build output.