Draft should output Docker build results
This issue is more of a feature suggestion, but I believe that Draft should immediately output the Docker build logs, similar to how Google's skaffold does. A few reasons:
Improvements:
- Users expect "docker builds" to output their build progress (and image IDs)
- Users should not have to run
draft log xxxjust to see why their image build failed - Time saved from having to copy/paste
Drawbacks:
- Long builds will spam terminal scrollback, but they have this issue already likely
- Changes to the CLI progress would have to be made
-
draft logs?
I think the idea of having the logs stream on failure is a good idea.
I also like the output of the image Id.
I do not need to see the logs for success. It is a mess of line spam that adds nothing to most users. Only people who are used to it like it, imho. Pretty much everyone else ignores it until error or success. But my position is just one....
From my pov, two out of three ain't bad!
@squillace I would agree with that, while it is expected behavior it's probably unnecessary.
I think su one point we were thinking of making the stream a draft config setting which would also be fine...
We used to stream them a long time ago. It might be good to revisit that assumption if users still want that output on draft up.
@squillace If draft were to adopt a config setting for always enabling build log streaming (log-build?) and another setting for printing the log after the build has failed (log-build-errors?), then we can still default to not streaming any logs while giving the user an option to use whatever applies best to their use-case.
Draft newbie here :) I think the missing log output is especially awkward while developing or modifying the Dockerfile. In this specific case I would definitely prefer having the full build output so I can fail fast and try again, without having to copy/paste the draft logs command. I think a parameter to draft up would be nice (--log or --verbose or something?)
Other idea: a new draft build command that only builds the image locally (no push/deploy) and that would display the full log by default?
Hey @tomconte, that's good feedback.
a more general but advanced variant of this is described in #815
This is very much wanted for long running builds such as maven/gradle or npm based projects where to collection of dependencies is a rather long process