Commit Graph

3362 Commits (f314c4bd0375b97d711d9cfe3898463238f9fff9)

Author SHA1 Message Date
Akihiro Suda be8ab28a0a
Merge pull request #2081 from tonistiigi/local-differ-none
Allow none differ on local source to avoid false Dockerfile matches
2021-07-01 09:42:24 +09:00
Tõnis Tiigi 921b0de92e
Merge pull request #2209 from jedevc/dockerfile-heredocs-onbuild
Add support for heredocs in the ONBUILD command
2021-06-29 21:33:03 -07:00
Tonis Tiigi ee39f5dd68 dockerfile: use none differ for dockerfile/dockerignore
This avoids wrong metadata matches on small files

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-29 16:17:08 -07:00
Justin Chadwell 5ad1ff3e23 Add support for heredocs with ONBUILD
Signed-off-by: Justin Chadwell <me@jedevc.com>
2021-06-29 11:30:09 +01:00
Akihiro Suda bb6f11c28d
Merge pull request #2208 from tonistiigi/dockerfile-version
dockerfile: fix git version detection
2021-06-29 17:55:00 +09:00
Tonis Tiigi dc86c52cc0 dockerfile: fix git version detection
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-28 22:05:55 -07:00
Tonis Tiigi b9f8a58256 contenthash: use SeekLowerBound to seek radix tree
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-28 16:19:12 -07:00
coryb f4fcba5883
Merge pull request #2203 from coryb/issue-2112
[#2112] progress.Controller should own the progress.Writer to prevent leaks
2021-06-28 13:56:39 -07:00
Cory Bennett b1d441b175 [#2112] progress.FromContext returns a writer factory
this allows progress.Controller to manage the writer lifecycle

Signed-off-by: Cory Bennett <cbennett@netflix.com>
2021-06-28 18:58:29 +00:00
Cory Bennett 1da8b671c4 [#2112] progress.Controller should own the progress.Writer to prevent leaks
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2021-06-28 18:56:45 +00:00
Tõnis Tiigi 8d33bbdeb5
Merge pull request #2195 from tonistiigi/flightcontrol-contention
flightcontrol: reduce contention between goroutines
2021-06-28 11:42:13 -07:00
Tõnis Tiigi 63b1249c3f
Merge pull request #2205 from coryb/flakey-tests
ensure containerd io is complete and closed before returning
2021-06-28 11:41:45 -07:00
Cory Bennett 13c842bab7 ensure containerd io is complete and closed before returning
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2021-06-28 15:39:36 +00:00
Tõnis Tiigi 6eab36ddca
Merge pull request #2197 from aaronlehmann/hash-empty
Avoid nil pointer dereference when copying from image with no layers
2021-06-27 20:25:59 -07:00
Aaron Lehmann a018bf5cd9 Test with tonistiigi/test:nolayers as well
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-06-27 16:09:42 -07:00
Aaron Lehmann c1a48b79f8 Make error message consistent when layer is empty
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-06-26 14:08:36 -07:00
Akihiro Suda 103ad93439
Merge pull request #2196 from tonistiigi/llb-resolve-constraints
llb: ensure meta resolver uses platform form constraints
2021-06-24 14:33:27 +09:00
Aaron Lehmann 8f2fd48a6d Check that scratch is mounted as empty dir
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-06-23 14:15:06 -07:00
Aaron Lehmann e70f8556e5 Add test for copying from scratch
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-06-23 13:36:36 -07:00
Aaron Lehmann 799175fc83 Avoid nil pointer dereference when copying from image with no layers
Fix this panic when copying from an image with no layers:

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0xdd8c17]

goroutine 326 [running]:
github.com/moby/buildkit/cache/contenthash.(*cacheManager).Checksum(0xc0005ec030, 0x1682c00, 0xc000842140, 0x0, 0x0, 0xc0005d4023, 0x1, 0x0, 0x0, 0x0, ...)
	/src/cache/contenthash/checksum.go:95 +0x37
github.com/moby/buildkit/cache/contenthash.Checksum(0x1682c00, 0xc000842140, 0x0, 0x0, 0xc0005d4023, 0x1, 0x0, 0x0, 0x0, 0x0, ...)
	/src/cache/contenthash/checksum.go:59 +0xd5
github.com/moby/buildkit/solver/llbsolver.NewContentHashFunc.func1.1(0x0, 0x4425d6)
	/src/solver/llbsolver/result.go:59 +0x20a
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc00056a360, 0xc000594510)
	/src/vendor/golang.org/x/sync/errgroup/errgroup.go:57 +0x59
created by golang.org/x/sync/errgroup.(*Group).Go
	/src/vendor/golang.org/x/sync/errgroup/errgroup.go:54 +0x66
```

When the path is "/", we allow it because it's a noop.

Based on https://github.com/moby/buildkit/pull/2185

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-06-23 12:28:18 -07:00
Tonis Tiigi 3eec4287f6 flightcontrol: reduce contention between goroutines
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-22 22:10:47 -07:00
Tonis Tiigi 01b50a3df1 llb: ensure meta resolver uses platform form constraints
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-22 21:49:07 -07:00
Tõnis Tiigi 4e0a5733a3
Merge pull request #2179 from AkihiroSuda/apk-fuse-overlayfs
Dockerfile: install fuse-overlayfs from apk
2021-06-22 21:45:17 -07:00
Tonis Tiigi e0124e192c llb: add constraints to async llb
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-22 21:34:43 -07:00
Tonis Tiigi b4935eb79a llb: add constraints to vertex and validate
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-22 18:47:32 -07:00
Tõnis Tiigi 215e151d8f
Merge pull request #2143 from AkihiroSuda/runc-v1.0.0
update runc binary to v1.0.0 GA
2021-06-22 10:56:49 -07:00
Tonis Tiigi 1d0597e85a handle unconfigured spans without errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-22 08:27:35 -07:00
Akihiro Suda 9655dfe732
update runc binary to v1.0.0 GA
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-06-22 15:10:20 +09:00
Tonis Tiigi 14d606c289 client: pass delegated exporter as parameter
Avoid client package having dependency on global detect package.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-20 21:57:41 -07:00
Tonis Tiigi d512920c24 support collecting traces from llb.Exec
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-20 21:57:35 -07:00
Tonis Tiigi d8fc4e15f9 enable collecting traces via control api
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-20 21:57:35 -07:00
Tonis Tiigi 750f9af97c otlgrpc: provide a way to get otlp client from grpc conn
Hopefully this can be removed with a future upstream change
that could make this configurable. The package also needs
internal dependency that is copied in.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-20 21:57:35 -07:00
Tonis Tiigi b873f0b5f1 tracing: add delegated exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-20 21:57:35 -07:00
Tonis Tiigi 723ea5795c add transform package to convert from otlp
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-20 21:57:35 -07:00
Tonis Tiigi 69a8caa3be add current tracing context detection and exec propagation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit bc9a83144c83e9fd78007b7bfe92e8082c59d40e)
2021-06-20 21:57:35 -07:00
Akihiro Suda 1c037fd52f
Merge pull request #2192 from tonistiigi/otel-update 2021-06-20 16:26:29 +09:00
Tonis Tiigi 7489cc8be0 vendor: update opentelemetry to 1.0.0-rc
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-19 10:02:26 -07:00
Tõnis Tiigi 6409a07898
Merge pull request #2191 from tonistiigi/integration-ctx
integration: add common context base to all integration tests
2021-06-19 10:02:09 -07:00
Tonis Tiigi c773a215c1 integration: add common context base to all integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-18 20:49:49 -07:00
Tõnis Tiigi 573f1b1255
Merge pull request #2189 from thaJeztah/replace_deprecated_userns
replace uses of deprecated containerd/sys.RunningInUserNS()
2021-06-18 10:09:28 -07:00
Sebastiaan van Stijn c325f89fa1
replace uses of deprecated containerd/sys.RunningInUserNS()
This utility was moved to a separate package, which has no dependencies.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-18 11:14:26 +02:00
Akihiro Suda 1e623f94f5
Merge pull request #2188 from tonistiigi/go1.16-updates
Dockerfile: remove nsswitch as default in go1.16
2021-06-18 14:01:52 +09:00
Akihiro Suda 87c757fe93
Merge pull request #2187 from tonistiigi/unfork-win-arm64
remove go fork for building windows/arm64
2021-06-18 14:01:46 +09:00
Tonis Tiigi 7849ab58eb retryhandler: use net.ErrClosed for error check
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-17 16:55:37 -07:00
Tonis Tiigi 74807a1ec3 Dockerfile: remove nsswitch as default in go1.16
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-17 16:53:33 -07:00
Tonis Tiigi 9e274c79c9 remove go fork for building windows/arm64
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-17 15:41:14 -07:00
Akihiro Suda b6b07d167b
Merge pull request #2183 from tonistiigi/dockerfile-config-error
dockerfile: ensure config resolve errors keep source location
2021-06-18 00:36:50 +09:00
Tonis Tiigi 111153eafb dockerfile: ensure config resolve errors keep source location
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-16 22:16:16 -07:00
Akihiro Suda 0164c0691d
Merge pull request #2152 from tonistiigi/otel
Add opentelemetry support
2021-06-16 13:56:32 +09:00
Tonis Tiigi b10f25944b correctly validate span from context
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-15 21:11:27 -07:00