Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 397 forks source link

Draft should output Docker build results #806

Open EvanDarwin opened 6 years ago

EvanDarwin commented 6 years ago

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:

Drawbacks:

squillace commented 6 years ago

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!

EvanDarwin commented 6 years ago

@squillace I would agree with that, while it is expected behavior it's probably unnecessary.

squillace commented 6 years ago

I think su one point we were thinking of making the stream a draft config setting which would also be fine...

bacongobbler commented 6 years ago

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.

EvanDarwin commented 6 years ago

@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.

tomconte commented 6 years ago

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?

squillace commented 6 years ago

Hey @tomconte, that's good feedback.

omnilinguist commented 6 years ago

a more general but advanced variant of this is described in #815

bjornmagnusson commented 6 years ago

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