Skip to content

Commit

Permalink
fix(build,docker): remove quiet mode when using buildkit
Browse files Browse the repository at this point in the history
Signed-off-by: Yaroslav Pershin <62902094+iapershin@users.noreply.github.com>
  • Loading branch information
iapershin authored and alexey-igrychev committed Nov 15, 2024
1 parent bada54e commit 43d5668
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ require (
replace (
github.com/deislabs/oras => github.com/werf/3p-oras v0.9.1-0.20240115121544-03962ecbd40a // upstream not maintained
github.com/helm/helm-2to3 => github.com/werf/3p-helm-2to3 v0.0.0-20230313155428-cf9dd655c0e3 // upstream not maintained, switch back to upstream when merged: https://github.com/helm/helm-2to3/pull/224
github.com/docker/buildx => github.com/werf/3p-docker-buildx v0.13.0-rc2.0.20241024135542-5227009077a4 // upstream not maintained
github.com/jaguilar/vt100 => github.com/tonistiigi/vt100 v0.0.0-20190402012908-ad4c4a574305 // upstream not maintained
helm.sh/helm/v3 => github.com/werf/3p-helm/v3 v3.0.0-20240405163812-3dc7244388e5 // helm 3
k8s.io/helm => github.com/werf/3p-helm v0.0.0-20210202111118-81e74d46da0f // helm 2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,6 @@ github.com/djherbis/buffer v1.2.0 h1:PH5Dd2ss0C7CRRhQCZ2u7MssF+No9ide8Ye71nPHcrQ
github.com/djherbis/buffer v1.2.0/go.mod h1:fjnebbZjCUpPinBRD+TDwXSOeNQ7fPQWLfGQqiAiUyE=
github.com/djherbis/nio/v3 v3.0.1 h1:6wxhnuppteMa6RHA4L81Dq7ThkZH8SwnDzXDYy95vB4=
github.com/djherbis/nio/v3 v3.0.1/go.mod h1:Ng4h80pbZFMla1yKzm61cF0tqqilXZYrogmWgZxOcmg=
github.com/docker/buildx v0.13.0-rc2 h1:ghn4z7+OoAQfLXlNLjY3AHQyVV7nh4Qas2s9BQZ9t3s=
github.com/docker/buildx v0.13.0-rc2/go.mod h1:Q3gtkv8D3sdaa5LJXbzMooYR/A5vBiEB2yQ56wywohM=
github.com/docker/cli v25.0.5+incompatible h1:3Llw3kcE1gOScEojA247iDD+p1l9hHeC7H3vf3Zd5fk=
github.com/docker/cli v25.0.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/cli-docs-tool v0.7.0 h1:M2Da98Unz2kz3A5d4yeSGbhyOge2mfYSNjAFt01Rw0M=
Expand Down Expand Up @@ -1525,6 +1523,8 @@ github.com/weppos/publicsuffix-go v0.13.1-0.20210123135404-5fd73613514e/go.mod h
github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b/go.mod h1:HYux0V0Zi04bHNwOHy4cXJVz/TQjYonnF6aoYhj+3QE=
github.com/weppos/publicsuffix-go v0.30.2-0.20240219083929-48f3a5ae027a h1:s0Yp4S5jdEQFTJE1blGE5o+n7T0uI386YHXzocLKLR4=
github.com/weppos/publicsuffix-go v0.30.2-0.20240219083929-48f3a5ae027a/go.mod h1:v7j8MuFp1CIYgAd2n7xEUctTbsreRd1vPmOwyzmGFiE=
github.com/werf/3p-docker-buildx v0.13.0-rc2.0.20241024135542-5227009077a4 h1:J6qNuakRzaeXg5tLgUfowm2Kh2/S5XAzuEzpc3f1IuM=
github.com/werf/3p-docker-buildx v0.13.0-rc2.0.20241024135542-5227009077a4/go.mod h1:Q3gtkv8D3sdaa5LJXbzMooYR/A5vBiEB2yQ56wywohM=
github.com/werf/3p-helm v0.0.0-20210202111118-81e74d46da0f h1:3anHigsmgMJ7IlG8WCKNgiZpO3CaZFwq8l7W+6UT+pM=
github.com/werf/3p-helm v0.0.0-20210202111118-81e74d46da0f/go.mod h1:OMONwLWU9zEENgaVjWEX+M+xik2QakejzKHG1+6mnUo=
github.com/werf/3p-helm-2to3 v0.0.0-20230313155428-cf9dd655c0e3 h1:pdKLiuiUoOFswc0HV6GX1+JHgP14HqE035xl2DQJi8A=
Expand Down
8 changes: 0 additions & 8 deletions pkg/docker/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"golang.org/x/net/context"

"github.com/werf/logboek"
parallelConstant "github.com/werf/werf/pkg/util/parallel/constant"
)

type CreateImageOptions struct {
Expand Down Expand Up @@ -212,13 +211,6 @@ func CliBuild_LiveOutputWithCustomIn(ctx context.Context, rc io.ReadCloser, args

if useBuildx {
buildOpts.EnableBuildx = true

// disable buildkit output in background tasks due to https://github.com/docker/cli/issues/2889
// there is no true way to get output, because buildkit uses the standard output and error streams instead of defined ones in the cli instance
if ctx.Value(parallelConstant.CtxBackgroundTaskIDKey) != nil {
logboek.Context(ctx).Warn().LogLn("WARNING: BuildKit output in background tasks is not supported (--quiet) due to https://github.com/docker/cli/issues/2889")
args = append(args, "--quiet")
}
} else {
// ensure buildkit not enabled
if err := os.Setenv("DOCKER_BUILDKIT", "0"); err != nil {
Expand Down

0 comments on commit 43d5668

Please sign in to comment.