Closed tonistiigi closed 6 years ago
--no–progress
was added in #70 but output is currently really only usable for debugging and not for nice overview
Looking into this. Trying to understand what is expected output format required in case --no-progress
flag.
For current output like below
$ ./buildkit4 | sudo ../../buildctl --debug build --no-progress
INFO[0000] tracing logs to /tmp/buildctl338487667
DEBU[0000] serving grpc connection
DEBU[0000] vertex: sha256:0e6b31ceed3e6dc542018f35a53a0e857e6a188453d32a2a5bbe7aa2971c1220 docker-image://docker.io/library/alpine:latest <nil> <nil>
DEBU[0000] vertex: sha256:10d8c20fbf1f31dd85c8c6a2ab3133193262ae137430e8ba6c893548813ea475 echo hello <nil> <nil>
DEBU[0000] vertex: sha256:42b3ce956d05b67053f05ca61b2abdfe59adce3e5c540e92352981105581940e ls -l /bin <nil> <nil>
DEBU[0000] status: sha256:0e6b31ceed3e6dc542018f35a53a0e857e6a188453d32a2a5bbe7aa2971c1220 resolve docker.io/library/alpine:latest 0
DEBU[0000] status: sha256:0e6b31ceed3e6dc542018f35a53a0e857e6a188453d32a2a5bbe7aa2971c1220 resolve docker.io/library/alpine:latest 0
DEBU[0000] stopping session
DEBU[0000] vertex: sha256:0e6b31ceed3e6dc542018f35a53a0e857e6a188453d32a2a5bbe7aa2971c1220 docker-image://docker.io/library/alpine:latest 2017-11-17 02:30:31.614180843 +0000 UTC 2017-11-17 02:30:31.614180843 +0000 UTC
DEBU[0000] vertex: sha256:0e6b31ceed3e6dc542018f35a53a0e857e6a188453d32a2a5bbe7aa2971c1220 docker-image://docker.io/library/alpine:latest 2017-11-17 02:30:31.614180843 +0000 UTC 2017-11-17 02:30:31.614180843 +0000 UTC
DEBU[0000] vertex: sha256:10d8c20fbf1f31dd85c8c6a2ab3133193262ae137430e8ba6c893548813ea475 echo hello 2017-11-17 02:30:31.614180843 +0000 UTC 2017-11-17 02:30:31.614180843 +0000 UTC
DEBU[0000] vertex: sha256:10d8c20fbf1f31dd85c8c6a2ab3133193262ae137430e8ba6c893548813ea475 echo hello 2017-11-17 02:30:31.614180843 +0000 UTC 2017-11-17 02:30:31.614180843 +0000 UTC
DEBU[0000] vertex: sha256:42b3ce956d05b67053f05ca61b2abdfe59adce3e5c540e92352981105581940e ls -l /bin 2017-11-17 02:30:31.614180843 +0000 UTC 2017-11-17 02:30:31.614180843 +0000 UTC
should be shown like? ref : #70
1 2017-11-17 02:30:31.614180843 +0000 UTC new sha:0e6b31ceed docker-image://docker.io/library/alpine:latest
1 2017-11-17 02:30:31.614180843 +0000 UTC resolved
1 2017-11-17 02:30:31.614180843 +0000 UTC completed (cached)
2 2017-11-17 02:30:31.614180843 +0000 UTC new sha:10d8c20fbf1f3 echo hello
2 2017-11-17 02:30:31.614180843 +0000 UTC completed (cached)
3 2017-11-17 02:30:31.614180843 +0000 UTC new sha:42b3ce956d05b6 ls -l /bin
3 2017-11-17 02:30:31.614180843 +0000 UTC completed (cached)
@kunalkushwaha Maybe, I'm not sure. Do you have suggestions on what would be the best format? This should be a list of events and logs from every operation in time based order. For readability I suggested assigning incremental numbers to every vertex instead of showing the sha256
everywhere. Maybe that should be after the timestamp though. We can try out different versions until we get this right. You can look at the trace file for the raw version of this output, just need to find a more human readable format to that data.
For the non-tty callers
buildctl build
should show the event stream and logs. The data should already be available, just needs to be formatted properly.