Commit Graph

506 Commits (0aa688233438a4c75896cee6bd2ca1bf28d1dcbc)

Author SHA1 Message Date
Aaron Lehmann 7660af2f1d Add IncludePatterns and ExcludePatterns options for Copy
Allow include and exclude patterns to be specified for the "copy" op,
similarly to "local".

Depends on https://github.com/tonistiigi/fsutil/pull/101

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-05-26 13:48:03 -07:00
Edgar Lee 9aeed7b193 Transform relative mountpoints for exec mounts in the executor
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2021-05-20 15:17:27 -07:00
Tonis Tiigi 3bdb6b5159 git: support subdir component
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-05-19 22:13:04 -07:00
Vlad A. Ionescu 60d38f972c Move config under worker config. Add new integration test to GHA matrix.
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2021-05-13 14:55:36 +03:00
Vlad A. Ionescu b3cf7c43cf Switch to Acquire API.
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2021-05-12 13:41:33 +03:00
Vlad A. Ionescu 489e17aea9 Add a configuration item to limit parallelism.
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2021-05-10 15:47:59 +03:00
Tõnis Tiigi f113b49307
Merge pull request #2086 from thaJeztah/add_all_proxy
Add "ALL_PROXY" to list of default args / proxy env-vars
2021-04-26 09:09:44 -07:00
Sebastiaan van Stijn a743d4ba02
Add "ALL_PROXY" to list of default args / proxy env-vars
Relates to a82fff6377/docs/packages.md (proxies)

> (..) the first four of these are the standard built-in build-arg options
> available for `docker build`
> (..) The last, `all_proxy`, is a standard var used for socks proxying. Since
> it is not built into `docker build`, if you want to use it, you will need to
> add the following line to the dockerfile:
>
>     ARG all_proxy

Given the we support all other commonly known proxy env-vars by default, it makes
sense to add this one as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-24 18:19:02 +02:00
Aaron Lehmann 61bb15a47f Add hack to preserve Dockerfile RUN cache compatibility after mount cache bugfix
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-04-14 08:53:08 -07:00
Aaron Lehmann 0e106e6967 Fix missing mounts in execOp cache map
A bug in cloneExecOp prevented mounts from being included in the digest
computed for the execOp cache map. This could lead to an exec being
wrongly cached when a different mount was used for a subsequent
execution.

Repro case:
https://gist.github.com/aaronlehmann/cfeaefc028df8127fb85b9b5f9125f2d

In this example, pass2 should generate an empty diff because the /from
and /to mounts are the same busybox image. But before the fix, it uses
the cached result from pass1 (with different mounts) instead.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-04-13 22:04:28 -07:00
Tonis Tiigi 86154daec1 solver: check for input index existence
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-04-07 22:02:42 -07:00
Sebastiaan van Stijn 292685db37
solve: remove duplicate filepath.Join
I saw these, and there was no comment in the code explaining if there was a reason
for this; these were added in 2be999ba52, but couldn't
find a mention about these particular lines in the review comments, and I couldn't
think of a special reason for it ':-)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-29 13:24:55 +02:00
Tonis Tiigi bee77d81b9 solver: check for edge dependency before merging
In some cases edges that depend on each other
can have identical cache keys. This happens for
example when empty layers are optimized out by
the differ between identical commands. We need to
detect this case and avoid merge.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-03-18 19:55:35 -07:00
Akihiro Suda 13ea18ad08
vendor containerd (requred for rootless overlayfs on kernel 5.11)
Required for rootless overlayfs on kernel 5.11
https://github.com/containerd/containerd/pull/5076

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-03-10 13:51:27 +09:00
Akihiro Suda 19d31737fb
Merge pull request #1963 from tonistiigi/release-count-fixes 2021-02-19 08:22:54 +09:00
Tonis Tiigi 8d70777537 fileop: fix checksum to contain indexes of inputs
Cache mismatch can happen if fileop switches input indexes
between different actions.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-02-03 22:17:57 -08:00
Tonis Tiigi 42fb2a8771 avoid double release of same ref released multiple times
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-02-03 10:53:19 -08:00
Tonis Tiigi b4b0ece384 make sure result refs returned in errors are clone
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-02-03 10:49:38 -08:00
Tonis Tiigi 3660e5f9c8 don't commit cache mounts on error
Cache mount instances are shared between multiple vertextes/builds
so if one of the cloned instance gets committed reference count
will get corrupted as other parts of the code still see reference as
mountable.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-02-02 23:20:44 -08:00
Tonis Tiigi dae8f156da update qemu emulators
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-01-21 18:33:00 -08:00
Tõnis Tiigi dd7fe19951
Merge pull request #1830 from coryb/unknown-exit-status
move UnknownExitStatus to executor package from errdefs
2020-12-28 16:35:14 -08:00
Tonis Tiigi 3889ef509c allow nil return from frontend
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-14 17:19:41 -08:00
Tibor Vass bea286f94c
Merge pull request #1871 from tonistiigi/scheduler-fix-for-testing
solver: fix slow-cache status tracking with preprocess
2020-12-11 11:47:45 -08:00
Tonis Tiigi 2f247f0340 solver: fix slow-cache status tracking with preprocess
Preprocess should not be taken into account when calculating
cache-slow state. But it should be used to detect if dep is complete
so preprocess runs before parent's exec function.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-10 22:57:30 -08:00
Tonis Tiigi 1b271e0014 solver: delay before discarding job
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-09 20:53:03 -08:00
Cory Bennett 9d3f55c400 move ExitError from solver/errdefs to frontend/gateway/errdefs
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-12-07 01:09:59 +00:00
Tõnis Tiigi d5f179bb79
Merge pull request #1863 from tonistiigi/solver-slowcache
solver: improve slow cache detection logging
2020-12-02 16:47:35 -08:00
Tonis Tiigi 706129170d solver: remove scheduler fix
Asked in review.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-02 16:07:13 -08:00
Tonis Tiigi f38972a8ec mounts: handle optional ssh mount
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-02 14:28:51 -08:00
Tonis Tiigi 6a321dc574 solver: improve slow cache detection and add logging
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-01 22:38:15 -08:00
Tonis Tiigi e46cfab9fb fix invalid cancellation errors on pull
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-01 00:27:31 -08:00
Tonis Tiigi df3a9cad23 make sure execerror is released on cancellation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-25 15:50:10 -08:00
Edgar Lee 372df78cc8 Guarantee err results are released when result proxy is released
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-25 11:26:53 -08:00
Sebastiaan van Stijn 67bcfe699a
copy containerd.UnknownExitStatus to local const
Copy this const to a local constant to prevent importing the containerd
client in the front-end.

For consistency, I also updated the executor code to use the same const,
although not strictly needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-18 00:11:09 +01:00
Tõnis Tiigi 5e5f527e06
Merge pull request #1732 from hinshun/exec-error
Allow gateway exec-ing into a failed solve with an exec op
2020-11-16 19:13:11 -08:00
Edgar Lee fa8a02c861 Fix optional cast for WithOp when unit testing
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-16 13:37:30 -08:00
Edgar Lee 1240dd7795 Return committed readonly inputs and actives in exec error in MountIDs
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-16 13:21:23 -08:00
Tõnis Tiigi 8dc3a54a78
Merge pull request #1782 from alexcb/acb-other-git-user
SSH-based auth for llb.Git operations
2020-11-16 10:53:44 -08:00
Edgar Lee 3ba6cd7bc2 Fix ExecError.EachRef invoking callback with possibly nil solver.Results
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 23:20:41 -08:00
Edgar Lee c33bcd61a2 Rename OutputIDs to MountIDs
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Edgar Lee bcff7baf60 Allow scratch mounts with gateway.RunContainer
- Plumb default worker by adding GetDefault() to frontend.WorkerInfos
- To avoid cyclic dependency, refactor frontend.WorkerInfos to worker.Infos
- Refactor gateway.NewContainer to share code with llbsolver/ops/exec.go

Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Edgar Lee a459eb4927 Return exec error for errors returned before executor
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Edgar Lee 7e1dc9bec1 Refactor to file action indexed outputs
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Edgar Lee 2d23d0cc43 Fix lint and unit tests for fileopsolver
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Edgar Lee 7ce58c31ba Plumb op metadata to recreate failed ops with gateway exec
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-11-13 22:05:13 -08:00
Tibor Vass fad612e748 Allow worker to override GetRemote(), needed in moby integration
This fixes panics in the moby integration of buildkit when using cache.
Panics come from nil Differ in computeBlobChain which is called in GetRemote().

GetRemote() got moved from Worker to ImmutableRef during the lazy-pull refactor.
However, the ability to easily override GetRemote() got lost with that refactor.

This patch attempts to allow for the override while keeping changes minimal.

Signed-off-by: Tibor Vass <tibor@docker.com>
2020-11-13 21:30:35 +00:00
Alex Couture-Beil f2c8eb177c Support cloning from non-standard git repos
- fixes assumption that ssh git clones must be via the `git` user.
- allows passing the SSH_AUTH_SOCK from the client to GitSource
- allows passing a known_host entry for ssh

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-11-10 15:55:17 -08:00
Tonis Tiigi e86356ddf8 solver: add input preprocess capability
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-03 14:49:44 -08:00
Tonis Tiigi bdcee17437 executor: change mount to struct
Allows readonly passed cleanly.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-02 22:20:51 -08:00
Tonis Tiigi e3b05289d8 add session injection to remote loading
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-02 22:20:44 -08:00
Sebastiaan van Stijn fbe1346912
replace github.com/docker/docker/pkg/locker with moby/locker v1.0.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-30 09:25:05 +01:00
Akihiro Suda 1b1d9e88dc
Merge pull request #1747 from tonistiigi/default-shell-path
dockerfile: set correct default path and shell based on OS
2020-10-26 16:37:12 +09:00
Tonis Tiigi cac0b68f9e solver: make sure job id cleared after build
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-25 21:50:40 -07:00
Tonis Tiigi ecf070a027 exec: use platform specific default path
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-23 15:30:23 -07:00
Edgar Lee cd42b669c9 Enable parallelization of NewContentHashFunc
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-10-21 11:17:34 -07:00
Lu Jingxiao 5e7ae230b2 Add hostname specifying for building
Fix: #1301

Signed-off-by: Lu Jingxiao <lujingxiao@huawei.com>
2020-10-14 14:45:36 +08:00
Tonis Tiigi b4fad847ac frontend: support for subrequests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-07 13:36:51 -07:00
Tonis Tiigi 44f27708b3 frontend: make sure inputs support for frontends is detectable from client
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-04 10:44:16 -07:00
Cory Bennett 095a919c95 remove unnecessary MountManager interface
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 06:24:34 +00:00
Cory Bennett 03e1c199a3 remove SessonManager from FrontendLLBBridge, adding as arg to Frontend.Solve
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-10-02 01:59:05 +00:00
Cory Bennett 3cc8aa0649 move ExecOps mounting logic into new package so logic can be reused from gateway exec
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-09-15 07:01:42 +00:00
Cory Bennett 355e937e15 update gateway to add ability to run and exec into containers
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-08-31 21:13:59 +00:00
Tõnis Tiigi 545532ab0e
Merge pull request #1475 from sipsma/lazy-ref
Add support for lazily-pulled blobs in cache manager.
2020-08-06 12:54:45 -07:00
Tonis Tiigi 862387445e grpcerrors: use full typeurl registration
Also switches current types to json.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-08-06 12:28:48 -07:00
Erik Sipsma 55cbd19dec Add support for lazily-pulled blobs in cache manager.
This allows the layers of images to only be pulled if/once they are actually
required.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-08-05 17:18:43 -07:00
Paul "TBBle" Hampson f4393eaa31 Ensure that time has passed between foo0 and foo1
On Windows, the resolution of time.Now() can be surprisingly low: 15ms
according to the comments in the source of time.Now().

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-30 03:21:30 +10:00
Tonis Tiigi dc95525191 vendor: update fsutil to c3ed55f3b4
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-26 23:25:00 -07:00
Paul "TBBle" Hampson 3c96d0b863 Support not chowning files on all platforms
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-23 03:18:30 +10:00
Tonis Tiigi 5da4a40ae8 lint: enable more linters
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi 06c4197c05 rename binfmt_misc to archutil
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:36 -07:00
Tonis Tiigi c8190b1518 lint: enable golint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:24 -07:00
Tonis Tiigi 57a88b0afb lint: add misspell and unused
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-18 08:13:57 -07:00
Cory Bennett 6a56695d3a remove `Get` prefix from Executor/CacheManager funcs and update to avoid naming conflicts
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-07-17 00:54:15 +00:00
Cory Bennett 453c76d29e add Run/Exec to FrontendLLBBridge interface
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-07-16 23:20:14 +00:00
Cory Bennett 5e91dff4ed fix error handling for exec when container fails to start
update run/exec tests for stdin and expected failures
move common tests for runc and container to shared tests package

Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-07-10 22:06:42 +00:00
Cory Bennett 6d58121c11 Update Executor interface for Run and Exec
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-07-09 23:40:36 +00:00
Edgar Lee 488130002a
Merge pull request #1551 from tonistiigi/session-group
session: track sessions with a group construct
2020-07-08 16:37:07 -07:00
Tonis Tiigi dd304ede33 solver: fix marking already cached vertex as cancelled
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-05 12:03:59 -07:00
Tonis Tiigi 2e9987ad16 session: track sessions with a group construct
Avoid hidden session passing and allow one session to drop when
multiple builds share a vertex.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-05 00:15:25 -07:00
Tonis Tiigi 49de675234 git: support for token authentication
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-16 17:00:06 -07:00
Sebastiaan van Stijn 932c39505b
use containerd/sys to detect UserNamespaces
The implementation in libcontainer/system is quite complicated,
and we only use it to detect if user-namespaces are enabled.

In addition, the implementation in containerd uses a sync.Once,
so that detection (and reading/parsing `/proc/self/uid_map`) is
only performed once.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-15 12:51:20 +02:00
Chenbin b7fd382230 add chmod in COPY and ADD command
Signed-off-by: Chenbin <chen.bin11@zte.com.cn>
2020-06-10 21:37:46 +08:00
Tonis Tiigi f9e26128c0 exec: use qemu emulator automatically
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-07 22:08:52 -07:00
Akihiro Suda d6f5e972de
Merge pull request #1494 from tonistiigi/errdefs2
llb: add source tracking support
2020-05-25 23:15:20 +09:00
Edgar Lee 7a90a36b46 Support multiple source maps and locations for source-level stacktraces
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 16:17:35 -07:00
Tonis Tiigi d173e3dca8 pb: add more comments
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-19 17:23:03 -07:00
Tonis Tiigi dd765674fb solver: gracefully handle cache loading errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 18:21:34 -07:00
Tonis Tiigi 75d64ffb4a fix proto indentions
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:50:08 -07:00
Tonis Tiigi 6073e6cff3 llb: enable source tracking
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:50:03 -07:00
Tonis Tiigi 1f9599aba3 llb: move source mapping to llb metadata
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:49:41 -07:00
Sebastiaan van Stijn 3ddd1fc23c
Fix goimports linting
```
[5/5] RUN --mount=target=/go/src/github.com/moby/buildkit 	gometalinter ...
0.435 util/rootless/specconv/specconv_linux.go:1:⚠️ file is not goimported (goimports)
1.320 cache/manager.go:1:⚠️ file is not goimported (goimports)
1.335 cache/manager_test.go:1:⚠️ file is not goimported (goimports)
1.337 cache/migrate_v2.go:1:⚠️ file is not goimported (goimports)
1.342 cache/refs.go:1:⚠️ file is not goimported (goimports)
1.454 cache/remotecache/registry/registry.go:1:⚠️ file is not goimported (goimports)
2.285 cmd/buildctl/build.go:1:⚠️ file is not goimported (goimports)
3.082 executor/oci/user.go:1:⚠️ file is not goimported (goimports)
4.333 session/content/content_test.go:1:⚠️ file is not goimported (goimports)
4.614 snapshot/containerd/content.go:1:⚠️ file is not goimported (goimports)
4.721 solver/errdefs/vertex.go:1:⚠️ file is not goimported (goimports)
6.066 util/network/cniprovider/cni.go:1:⚠️ file is not goimported (goimports)
ERROR: executor failed running [/bin/sh -c gometalinter --config=gometalinter.json ./...]: buildkit-runc did not terminate successfully
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-13 17:38:56 +02:00
Tonis Tiigi 625f6ecc82 file: fix double-remap of old uid value
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-08 11:33:01 -07:00
Tibor Vass da4e440dbd buidlctl: upon error add line number in addition to filename
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-04-29 20:41:26 +00:00
Tonis Tiigi 365a58177e buildctl: cleaner typed error printing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-27 21:25:47 -07:00
Tonis Tiigi c78e875977 remove last instances of errors cause
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-24 11:25:53 -07:00
Tonis Tiigi 90288ab716 errdefs: update to new packages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-24 11:25:44 -07:00
Tonis Tiigi 4b2636acca dockerfile: add more source information to errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:17 -07:00
Tonis Tiigi abbda4e941 errdefs: attach source to an error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:17 -07:00
Tonis Tiigi cce301badd solver: attach causing vertex in an error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:17 -07:00
Tonis Tiigi ae3b75d56d errdefs: report component version in stack
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:17 -07:00
Tonis Tiigi e4cc0866f5 gateway: fix error details passing through gateway
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:17 -07:00
Tonis Tiigi 3f77f0495b grpc: add error handling wrappers to client/server
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:11 -07:00
Tonis Tiigi 02fff48cbd errdefs: add support for typed errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 22:57:23 -07:00
Tonis Tiigi 37b8832d00 upgrade errors checks to Is()
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-18 22:53:38 -07:00
Tonis Tiigi cfabf3009b solver: avoid looping over same keys in loadwithparents
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-18 17:07:57 -07:00
Tonis Tiigi 0010996598 solver: avoid recursive loop on cache-export
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-02 22:35:59 -08:00
Akihiro Suda 7b579cdb98 vendor: update containerd (and various packages)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-02-28 10:24:10 +09:00
Tonis Tiigi d1458a6587 update supported platforms without restart
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-02-26 08:15:42 -08:00
Edgar Lee 7e0f923181 Implement CapFrontendInput to pass llb.States to frontends
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-02-24 14:38:01 -08:00
Tõnis Tiigi 332cdb5e25
Merge pull request #1355 from tonistiigi/mounts-deadlock
ops: fix deadlock on releasing shared mounts
2020-02-21 10:34:57 -08:00
Akihiro Suda 2f5ad30ae5
Merge pull request #1351 from tonistiigi/security-devices
mount whitelist of devices on insecure security mode
2020-02-14 16:52:26 +09:00
Tonis Tiigi b0e76973ee solver: use correct context for getting cache managers lazily
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-02-06 15:11:49 -08:00
Tonis Tiigi 8cfe2de889 solver: evaluate solve results lazily
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-02-05 15:29:43 -08:00
Tonis Tiigi b2fffc20d3 ops: add tests for shared and locked cache mounts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-02-03 18:48:02 -08:00
Tonis Tiigi 6d907b6893 ops: fix deadlock on releasing shared mounts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-02-03 18:47:42 -08:00
Tonis Tiigi bf2dc85f80 ops: refactor cache mounts to have unit tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-02-03 15:00:22 -08:00
Tonis Tiigi e0e29722e2 file: fix compilation on windows
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-01-30 20:21:40 -08:00
Tonis Tiigi fc186a8b89 oci: mount whitelist of devices on insecure security mode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-01-30 13:07:29 -08:00
Tonis Tiigi 469e7552d0 fileop: keep correct user for parent dir on userns
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-01-28 11:36:42 -08:00
Edgar Lee 2edb431a0f Allow previous solve results to be used in new solves
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -08:00
Akihiro Suda aa4311b7fa
Merge pull request #1328 from tonistiigi/combinedcache-panic
solver: avoid panic on combined cache load
2020-01-15 12:30:45 +09:00
Edgar Lee d81832cf6c Detect support for protobuf array ref on server on frontend return call
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-14 17:16:21 -08:00
Tonis Tiigi 7fc7f6dbf6 solver: avoid panic on combined cache load
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-01-14 11:19:18 -08:00
Edgar Lee e8326b213b Fixup doc strings for solver types
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2019-11-07 10:00:20 -08:00
Edgar Lee 7846d924ff Improve solver type godocs
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2019-11-06 14:45:26 -08:00
Akihiro Suda e759bd1294
Merge pull request #1231 from tonistiigi/userns-secret-mount
exec: fix mount options on userns remapping
2019-11-01 12:33:12 +09:00
Edgar Lee c122adacb5 Implement file action remove for wildcards
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2019-10-30 14:25:00 -07:00
Tonis Tiigi 307bdc3c3d exec: fix mount options on userns remapping
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-29 14:20:40 -07:00
Tonis Tiigi eede0facb7 solver: fix pipe signaling on incoming updates
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-09-10 16:59:56 -07:00
Tonis Tiigi 1d7e7a6b51 llbsolver: fix error on multiple cache importers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-29 15:21:17 -07:00
Tonis Tiigi a0dead0809 fix possible double release on mountable
Refactor the interface to avoid such issues in the future.

BuildKit own mounts are stateless and not affected but
a different mountable implementation could get confused.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-16 08:03:16 -07:00
Tonis Tiigi c114e438f5 remotecache: fix inline cache in manifest lists
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-13 16:25:08 -07:00
Tonis Tiigi 872bf0b8c8 dockerfile: add cap for detecting correct nooutput support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-08 22:07:34 -07:00
Tonis Tiigi 360a856527 ops: fix readwrite mounts it no output
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-08 22:07:30 -07:00
Tonis Tiigi 8ad218804e correct int64 alignment
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-05 17:20:23 -07:00
Tonis Tiigi 92c3fd477b worker: remove unreferenced cache mount after release
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-29 15:41:49 -07:00
Tonis Tiigi 7b1bae7a42 solver: support no-cache for exec cache mounts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-26 14:42:32 -07:00
Tibor Vass fe8289063b
Merge pull request #1049 from tonistiigi/llb-validation
llbsolver: add more llb validation
2019-07-02 10:13:25 -07:00
Tonis Tiigi 5fc18fda78 llbsolver: add more llb validation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-01 23:52:20 -07:00
Tibor Vass b7ea8f13b8
Merge pull request #1036 from tonistiigi/error-tracing
add more error tracing
2019-06-17 10:25:23 -07:00
Tonis Tiigi 17300c1046 file: avoid setting implicit root on idmap
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-06-10 16:34:43 -07:00
Tonis Tiigi e2dcafa5ca Removing wrapf for review
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-06-07 12:04:47 -07:00
Tonis Tiigi 0f1c7d0412 session: use errors cause
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-06-06 21:15:21 -07:00
Tonis Tiigi 61f1bc138b solver: add error tracing to edge connections
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-06-06 21:15:21 -07:00
msg 78a8e643f6 Add missing locks around broadcasts
Signed-off-by: Mark Gordon <msg555@gmail.com>
2019-05-10 18:27:37 -04:00
Tonis Tiigi 84bbb344fa llbsolver: make remote cache errors not fatal
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-22 16:50:18 -07:00
Tonis Tiigi 4ffda7fc86 llbsolver: use deterministic digest for one-off progress
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-09 18:14:41 -07:00
Akihiro Suda a2dcdf4277
Merge pull request #897 from tonistiigi/userns
userns remapping support base
2019-04-03 13:33:47 +09:00
Tonis Tiigi 15ef4e2b8a dockerfile: allow content cache for rw mounts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-02 19:40:30 -07:00
Tonis Tiigi 9b9ff6e4b5 revert userns mapping functions
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-02 18:26:06 -07:00