draft-classic icon indicating copy to clipboard operation
draft-classic copied to clipboard

Draft should output Docker build results

Open EvanDarwin opened this issue 7 years ago • 9 comments

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 xxx just 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?

EvanDarwin avatar Jun 02 '18 03:06 EvanDarwin

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 avatar Jun 02 '18 04:06 squillace

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

EvanDarwin avatar Jun 02 '18 04:06 EvanDarwin

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

squillace avatar Jun 02 '18 04:06 squillace

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.

bacongobbler avatar Jun 02 '18 06:06 bacongobbler

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

EvanDarwin avatar Jun 04 '18 22:06 EvanDarwin

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?

tomconte avatar Jun 05 '18 06:06 tomconte

Hey @tomconte, that's good feedback.

squillace avatar Jun 05 '18 07:06 squillace

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

omnilinguist avatar Jun 07 '18 19:06 omnilinguist

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

bjornmagnusson avatar Jul 03 '18 12:07 bjornmagnusson