moby / moby/buildkit

Problems with build output

Open
#564 7 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement
Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 23h
Merged PRs (30d)
48

Description

Some CI tools do not support updating rows in logs. This feature makes the output very nice and dynamic in most terminals, but terrible in CI tools. For example:

#2 [internal] load Dockerfile
#2       digest: sha256:2c6f8b4480264b5726c0d71b15eabc3fcc89c57ff9726fcb7423900978eb2011
#2         name: "[internal] load Dockerfile"
#2      started: 2018-08-08 20:20:55.499773549 +0000 UTC
#2    completed: 2018-08-08 20:20:55.508116402 +0000 UTC
#2     duration: 8.342853ms
#2      started: 2018-08-08 20:20:55.55401781 +0000 UTC
#2 transferring dockerfile:
#2 transferring dockerfile: 8.36kB 0.1s done
#2    completed: 2018-08-08 20:20:56.02282162 +0000 UTC
#2     duration: 468.80381ms


#1 [internal] load .dockerignore
#1       digest: sha256:cd79e09d00ab98ba8a18ffae0192aae97f5141509285d80a1e57f853d3219db7
#1         name: "[internal] load .dockerignore"
#1      started: 2018-08-08 20:20:55.499686297 +0000 UTC
#1    completed: 2018-08-08 20:20:55.50802369 +0000 UTC
#1     duration: 8.337393ms
#1      started: 2018-08-08 20:20:55.553973005 +0000 UTC
#1 transferring context: 182B 0.1s done
#1    completed: 2018-08-08 20:20:56.222713362 +0000 UTC
#1     duration: 668.740357ms


#3 [internal] load metadata for docker.io/library/buildpack-deps:stretch-sc...
#3       digest: sha256:041cad18349bb3a69a06b0e8e8309e12a1c508911575a32a13ab199c6d7ecad8
#3         name: "[internal] load metadata for docker.io/library/buildpack-deps:stretch-scm"
#3      started: 2018-08-08 20:20:56.403116254 +0000 UTC
#3    completed: 2018-08-08 20:20:57.870701656 +0000 UTC
#3     duration: 1.467585402s

The same issue sometimes happens if you are ssh-ed through multiple layers of servers. Would it be possible to add a flag that disables outputting all the metadata for dynamic log updates?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing BuildKit's dynamic log output and CLI flag handling, then reproduce the behavior in a CI tool or through multiple SSH layers. Add a way to disable metadata intended for dynamic terminal updates while preserving a readable build log, and verify the resulting output in both interactive and non-interactive environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system, ci-cd, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.