Commit Graph

443 Commits (4997b57f1d92eeff54849eadba39a3136bbdfdf4)

Author SHA1 Message Date
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
Tonis Tiigi 4a12fe526a fileop: userns support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-02 18:26:06 -07:00
Tonis Tiigi 6921dbe0f6 snapshot: base for userns remapping
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-02 18:23:46 -07:00
Kunal Kushwaha a2bbb5ff39 security entitlement support
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2019-03-27 13:57:03 +09:00
Kunal Kushwaha 86c7933ac3 proto defination for security entitlements support
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2019-03-27 12:24:31 +09:00
Tibor Vass dc387eda7f solver: separate linux-only files
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-03-21 03:53:50 +00:00
Akihiro Suda 92f1fb55d5
Merge pull request #888 from tonistiigi/fileop-cap
client: set cap if fileop used
2019-03-20 13:47:45 +09:00
Tonis Tiigi 12a55d6f19 ops: mark tests parallel
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-19 17:07:24 -07:00
Tonis Tiigi 17d78abc12 ops: fix concurrent map writes in test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-19 17:07:15 -07:00
Tonis Tiigi 210679d35f client: set cap if fileop used
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-18 16:35:30 -07:00
Tonis Tiigi c6149da2eb fileop: review fixes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi 0d17ac323e fileop: updates with new fsutil copy pkg
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi 8a4674bab4 fileop: add dockerfile support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:50 -07:00
Tonis Tiigi 7210bf6806 fileop: add chown support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:50 -07:00
Tonis Tiigi 4ffd79735b fileop: connect with contenthash
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:31:00 -07:00
Tonis Tiigi 81a5fa5a2e llbsolver: fileop implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:35 -07:00
Tonis Tiigi 2be999ba52 fileop: llbsolver implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:35 -07:00
Tonis Tiigi b2b0e3dbfa fileop: add release support and tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:35 -07:00
Tonis Tiigi 9fb1f09a1e llbsolver: fileop base
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:35 -07:00
Tonis Tiigi a443cfff05 fileop: resolve review comments
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:35 -07:00
Tonis Tiigi 89e6614b38 solver: change uid to uint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:35 -07:00
Tonis Tiigi 431d11dda3 llb: add timestamp override to fileop
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:35 -07:00
Tonis Tiigi 5b4841f308 llb: initial fileop implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 16:22:01 -07:00
Tibor Vass 0515c76243
Merge pull request #868 from tonistiigi/solver-cache-fix
solver: change early input resolve strategy
2019-03-13 19:09:05 -07:00
Tonis Tiigi fbb71123a7 solver: optimize early input resolve
Detect the cases where open input keys are not possible even
when computed keys are calculated to skip to cache lookup early.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-13 15:34:18 -07:00
Dave Chen 550fd00160 Don't miss the Variant for arm2 platform
The `defaultPlatform` got on the build system include the variant for arm v6, v7 etc.
This is an important information for us to find the matched platform, but this information
is missed since the code doesn't include variant when assemble the platform information.

And since "V8" variant for arm64 is normalized to an empty string, so we need to take care
of this as well.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2019-03-12 22:32:45 -07:00
Tonis Tiigi b988403262 solver: fix early input resolve
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-12 17:49:54 -07:00
Tibor Vass 457482ef67
Merge pull request #858 from tonistiigi/dedupe-fix
llbsolver: fix selectors dedupe
2019-03-05 18:31:46 -08:00
Tonis Tiigi 6d859fc9b0 llbsolver: fix selectors dedupe
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-05 17:59:13 -08:00
Tonis Tiigi 632797cef0 vendor: udpate fsutil to b4281fa
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-05 17:34:01 -08:00
Tonis Tiigi 8bcd59a546 contenthash: add nofollow support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-01 23:41:05 -08:00
Tonis Tiigi f472cb193f exec: fix platform value in cache key
Use vertex platform instead of the current system one. This shouldn't break any cache unless qemu was used. Even when qemu was used the issue would not cause any cache collisions because the base images for run were scoped by platform, but better to stop using invalid data for cache key calculation.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-28 11:17:10 -08:00
Akihiro Suda 26010a4864 decouple SessionManager from Worker
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-02-23 22:55:17 +09:00
Tonis Tiigi 07810f0aae llbsolver: validate digest on load
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-04 17:06:34 -08:00
Tonis Tiigi a7df7e2c49 solver: deadlock fix
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-01 17:44:26 -08:00
Tonis Tiigi 5be7870549 load parent results on combined cachemanager
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-21 19:39:15 -08:00
Tonis Tiigi 97eff70c5e inline remote cache support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-21 19:39:15 -08:00
Tonis Tiigi ac4037a1d9 solver: keep original cache creation date when copying between stores
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-18 11:19:34 -08:00
Tonis Tiigi 1ec543e384 solver: exclude randomized cache keys from exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-18 11:19:25 -08:00
Akihiro Suda 6e7617e889 support local cache exporter and importer
Export:

  $ buildctl build ... --export-cache type=local,store=/path/to/output-dir

Import:

  $ buildctl build ... --import-cache type=local,store=/path/to/input-dir

Impact on CLI:
* Old (deprecated but still effective): `--export-cache localhost:5000/myrepo:buildcache --export-cache-opt mode=max`
* New: `--export-cache type=registry,ref=localhost:5000/myrepo:buildcache,mode=max`

Impact on API:
* New fields are added to control.proto and gateway.proto. The daemon
internally translates old API calls to the new ones.
* While new API can be used for `registry` caches, the client continues
to use the legacy API for `registry` caches to ensure compatibility with
old daemons.
* To import `local` caches with a frontend, the frontend needs to support
a new frontend opt `cache-imports`.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-01-19 02:38:26 +09:00
Tonis Tiigi b521aae3ea dockerfile: allow setting file mode/uid for secrets
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-03 11:13:40 -08:00
Tonis Tiigi 2529762ae7 dockerfile: allow setting file mode/uid for ssh socket
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-03 11:13:34 -08:00
Wei Fu 2a7287a189 dockerfile2llb/pipe: remove the useless assignment
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2018-11-28 19:44:53 +08:00
Tonis Tiigi f6a896157b llbsolver: keep session for context calls
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-11-19 15:24:35 -08:00
Tonis Tiigi 14b1afa3d0 solver: fix possible nil dereference
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-08 23:14:04 -07:00
Tibor Vass c9b01072d0 solver: specify SSH key ID in error message when required key was not forwarded
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-10-05 22:50:07 +00:00
Tibor Vass a0c740485c
Merge pull request #663 from tonistiigi/opentracing-fix
solver: fix opentracing providers
2018-10-03 11:39:29 -07:00
Tonis Tiigi ec0e352aae executor: mount cgroups in default spec
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-02 23:22:07 -07:00
Tonis Tiigi b26e666db9 solver: fix opentracing providers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-02 23:11:17 -07:00
Akihiro Suda 758a267235 s/CapMount/CapExecMount/g
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-03 15:03:36 +09:00
Akihiro Suda 900a1b96c4 define CapMountSSH
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-03 15:00:10 +09:00
Tõnis Tiigi f14886ac1d
Merge pull request #650 from tonistiigi/solver-test
solver: add TestSlowCacheAvoidLoadOnCache test
2018-10-01 10:57:11 -07:00
Tõnis Tiigi 3bc8b24fe0
Merge pull request #637 from ijc/llb-image-default-path
Push setting of default PATH down into the executor(s)
2018-09-28 08:37:19 -07:00
Ian Campbell 720d8327e2 Push setting of default PATH down into the executor(s)
Setting the default `PATH` in the `llb.State` on the client side means it
depends on the `GOOS` of the buildkit client, rather than of the environment
where it will actually execute.

Instead defer this to execution time and insert the default PATH at that point
if one is not present. Doing this in solver/llbsolver/ops/exec covers all
executors and also avoids breaking the cache.

Client compatibility is handled via a new capability.

Fixes #604

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-09-28 14:16:47 +01:00
Tonis Tiigi 3a1f59f85f solver: add TestSlowCacheAvoidLoadOnCache test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-27 15:03:56 -07:00
Tibor Vass 8f4dff0d16
Merge pull request #648 from tonistiigi/solver-early
solver: fix early resolution of cache-fast deps
2018-09-27 14:07:21 -07:00
Tonis Tiigi a711fbb8f3 solver: fix early resolution of cache-fast deps
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-26 18:25:33 -07:00
Tonis Tiigi f99352fee1 solver: make sure to return proper canceled errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-26 17:38:16 -07:00
Tibor Vass cb0d51cca3
Merge pull request #630 from tonistiigi/cleanup
golint and misspell cleanup
2018-09-19 12:01:45 -07:00
Tonis Tiigi 0940cdc6fe update golint comments
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-18 22:06:47 -07:00
Tonis Tiigi 301da72ce3 misspell fixes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-18 22:06:38 -07:00
Akihiro Suda aa73951164
Merge pull request #631 from jhowardmsft/boltdb
Revendoring to move boltdb to bbolt
2018-09-19 13:59:08 +09:00
John Howard 2de2c04c8e Revendoring to move boltdb to bbolt
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-09-18 11:18:08 -07:00
Tonis Tiigi 3938aebdfc llb: make sure to use stable marshaler
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-17 15:19:04 -07:00