Cory Bennett
516b9ec844
add exec tests with multiple mounts
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-09-13 07:23:53 +00:00
Tonis Tiigi
b18c08c4ab
fix tests after busybox update
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-09-11 23:24:55 -07:00
ktock
cf3d695cc2
Enable to run integration tests with stargz snapshotter
...
Signed-off-by: ktock <ktokunaga.mail@gmail.com>
2020-09-03 16:52:21 +09: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
ktock
76189201a8
Add integration test for containerd and stargz snapshotter
...
Signed-off-by: ktock <ktokunaga.mail@gmail.com>
2020-08-27 15:50:11 +09:00
Erik Sipsma
3b418db323
llb: Cache DefinitionOp inputs to support memoization during Marshal
...
llb.State.Marshal uses a vertexCache map (keyed by the llb.Vertex interface
value) to memoize which vertexes it has already visited while marshalling.
However, before this change, llb.DefinitionOp was constructing new pointers for
each value in the return slice of Inputs(), which meant that each input had a
different key in the vertexCache (due to being different pointer values). This
meant no memoization actually occured. I noticed this while using
llb.DefinitionOp with a fairly large graph when my program crashed after using
>16GB of RSS during a call to llb.State.Marshal.
The fix here avoids changing vertexCache as that would impact many other
vertex implementations. Instead, just DefinitionOp.Inputs() is updated to cache
the pointers it creates and pass that cache to its descendents. This fix
resulted in the program that was previously crashing out-of-memory to run
without any perceivable increase in RSS.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-08-10 17:23:04 -07:00
Tõnis Tiigi
279d686fec
Merge pull request #1567 from everpeace/fix-authority-header
...
Setting `Host` part of address url to `:authority` pseudo header
2020-08-06 15:43:00 -07: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
Akihiro Suda
8d5e9f8294
new connection helper: podman-container://<CONTAINER>
...
Similar to `docker-container://` but for Podman containers.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-08-06 15:38:16 +09:00
Tonis Tiigi
9fcd482211
client: fix connhelper context canceling
...
Dial context is canceled after connection is
established so can’t be used for a long running process.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-08-05 23:25:13 -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
Shingo Omura
804aa5d21a
setting host part of address as :authority pseudo header.
...
grpc-go uses a slightly different naming scheme(https://github.com/grpc/grpc/blob/master/doc/naming.md )
This will end up setting rfc non-complient :authority header to address string (e.g. tcp://127.0.0.1:1234).
So, this commit changes to sets right authority header via WithAuthority DialOption.
Signed-off-by: Shingo Omura <everpeace@gmail.com>
2020-07-31 21:10:45 +09:00
Paul "TBBle" Hampson
b126501d78
Provide the known default PATH to the llbtest test
...
The existing test fails because the Windows default PATH (as far as LLB
knows) is empty. See the system.DefaultPathEnv comments.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson
5e3e18a72d
Use OS-agnostic os.SameFile instead of inode comparision
...
This fixes the build of this test under Windows.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 13:50:48 +10:00
Tõnis Tiigi
a67af5b10c
Merge pull request #1581 from alexcb/tar-exporter-with-socket-copy-reproduce-error
...
fix socket handling during copy
2020-07-23 12:07:15 -07:00
Alex Couture-Beil
5382a2056e
Treat unix sockets as regular files
...
This fix is similar to the fix in #1144 ; but was hit in a different code
path.
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-07-23 11:25:48 -07: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
dc40e5708c
client: update dialer to contextDialer
...
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
Tonis Tiigi
04233f90b3
replace gometalinter with golangci linter
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-18 08:13:48 -07:00
Paul "TBBle" Hampson
156d66da02
Revert "Pin containerd runtime to v1"
...
This reverts commit 9290c15ffc
.
This was pinned during the upgrade to containerd 1.3 series, which
changed the default runtime on Linux to io.containerd.runc.v2.
No specific rationale was listed for this pinning, and clearly it's the
wrong thing to do in the presence of Windows, which does not have this
runtime.
Instead, we rely on the containerd-internal defaults, which distinguish
the runtimes for Linux and Windows.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-16 15:06:20 +10:00
Erik Sipsma
43b58b2016
client test: log skip in checkAllReleasable.
...
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-06-24 12:07:00 -07:00
Erik Sipsma
9e0870415d
Test media type after first push in TestBuildExportWithUncompressed
...
There is a bug in the way images are pushed that results in oci types being used
for layers even when docker types should be used, but only in single-layer
images.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-06-24 09:53:34 -07:00
Erik Sipsma
83af7c3c94
client test: Fix TestBuildExportWithUncompressed
...
This test had previously been accidentally not executing past the check for
whether containerd was running. A previous commit fixes that check, this commit
fixes a few bugs that had been going unnoticed in the containerd-specific part
of the test's code.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-06-21 20:42:53 -07:00
Erik Sipsma
463ec47ba0
client test: Fix check for whether sandbox has containerd
...
Before this, the check was always returning that containerd wasn't running and
thus skipping the rest of several test cases.
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-06-21 20:42:53 -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
Cory Bennett
e351bfdd01
add unit test for getmount output index
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-06-04 18:25:03 -07:00
Cory Bennett
2b462fc6ca
skip tmpfs mounts when calculating indexes for llb.GetMount
...
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-06-04 10:54:32 -07:00
Edgar Lee
fbee6cccbd
Fix source map test in client_test
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 19:04:25 -07:00
Edgar Lee
7c81e16b8a
Fix duplicate source maps and fix issue preventing multiple locations per source map
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 18:48:20 -07:00
Edgar Lee
59fa9fc9a0
Allow multiple source locations to be added as a constraint
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-05-20 16:48:44 -07: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
90c5e67496
client: add source mapping tests
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-19 17:22:14 -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
Tonis Tiigi
725f5e1207
grpc interceptors for errors
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-22 18:31:32 -07:00
Tonis Tiigi
2fc9aee26f
Revert "grpc: add error handling wrappers to client/server"
...
This reverts commit 3f77f0495b
.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-22 18:31:27 -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
37b8832d00
upgrade errors checks to Is()
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-18 22:53:38 -07:00
Tõnis Tiigi
462d7ceb41
Merge pull request #1434 from tonistiigi/dockerd-tests
...
[carry] run integration tests against dockerd
2020-04-14 09:05:36 -07:00
Edgar Lee
8ff11ce5c0
Protect defop map when marshalling concurrently
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-04-10 16:22:08 -07:00
Tonis Tiigi
d64e417b1c
hack: allow testing with dockerd
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-08 23:27:20 -07:00
Sam Whited
c62983bbde
all: run integration tests against dockerd
...
Signed-off-by: Sam Whited <sam@samwhited.com>
2020-04-08 23:27:17 -07:00
Edgar Lee
d42b8bfc10
Set single export entry outside of session initialization
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-04-08 14:07:35 -07:00
Edgar Lee
423f5f8a97
Allow sessions to hijack the connection outside of a solve
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-04-08 12:13:42 -07:00
Tõnis Tiigi
c44cb42a69
Merge pull request #1428 from tonistiigi/imagemeta-async
...
llb: update image meta resolver to async callback
2020-04-06 10:00:42 -07:00
Tonis Tiigi
0ef961eb87
llb: make generic runoptions stateoptions
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-05 22:30:58 -07:00
Tonis Tiigi
146ef63e4a
llb: update image meta resolver to async callback
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-05 22:25:02 -07:00
Tonis Tiigi
1a9d366b49
llb: asyncronous llb graph generation support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-03 14:55:10 -07:00
Xiaofan Zhang
0947ed31ea
vendor: update fsutil to c2c7d7b0e144 and symlink test
...
Signed-off-by: Xiaofan Zhang <xiaofan.zhang@clinc.com>
2020-03-31 02:59:34 +00:00
Akihiro Suda
b42528249a
Merge pull request #1295 from zabio3/bugfix/issue1242
...
support specifying a custom tag using --import-cache type=local
2020-03-11 13:10:22 +09:00
Tonis Tiigi
09e8a06c04
client: improve cache key loop test
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-02 22:35:59 -08:00
Anca Iordache
8c65b5bbd5
Tests build with local cache export
...
- to detect infinite loop caused by circular dependencies
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-02 22:35:59 -08:00
Tonis Tiigi
a60ecfa4ae
vendor: restore dependency versions
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-02-24 17:31:01 -08:00
Edgar Lee
5ec7bc7713
Change FrontendInputs in backend API definitions to *pb.Definition
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-02-24 14:38:01 -08:00
Edgar Lee
b027a8572d
Fix terminating op with non-zero output index, i.e. AddMount as final vertex
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-02-24 14:38:01 -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
zabio3
807b20346e
support specifying a non-latest tag using --import-cache type=local
...
https://github.com/moby/buildkit/issues/1242
Signed-off-by: Tomohiro Kusumoto <zabio1192@gmail.com>
2020-01-29 21:32:55 +09:00
Edgar Lee
c83e8bf2a9
Add gateway apicap for CapReferenceOutput and move reference llb.Output to method ToOutput()
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:36:30 -08:00
Edgar Lee
f937656b1a
Verify platform is stored in state directly in defop test
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -08:00
Edgar Lee
0a76749067
Add platform defop test, force renames in copy tests, and move forwarded solve test to dockerfile package
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -08:00
Edgar Lee
be7f1a36fa
Return def bytes instead of remarshalling definition from pb.Op
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -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
6e62650fac
Merge pull request #1285 from jeffreyhuang23/issue-1240
...
Fix issue #1240 (ignore non-existent local cache)
2019-12-13 14:11:55 +09:00
Nikhil Pandeti
f3dd3193b6
Only ignore errors if the src directory or index.json do not exist
...
Error out if wrong parameters were passed or no src set
Signed-off-by: Nikhil Pandeti <nikhil.pandeti@utexas.edu>
2019-12-12 13:06:14 -06:00
Nikhil Pandeti
6a9ce04908
Gofmt and goimports used on changed file
...
Signed-off-by: Nikhil Pandeti <nikhil.pandeti@utexas.edu>
2019-12-10 08:54:34 -06:00
Nikhil Pandeti
0206c71206
Fix issue #1240
...
Allow build to run even if import cache of type=local is not found
Added an additional check in solve.go to catch errors thrown when
local import caches are not found. If none are found, continues as
if no import cache was specified.
Signed-off-by: Nikhil Pandeti <nikhil.pandeti@utexas.edu>
2019-12-10 00:55:29 -06:00
Wei Fu
65388edc6c
exporter: support compression for layer blob data
...
Allow user to choose the compression type for layer data. Gzip is
default compression for layer exporter, which consume more Cpu resources
and take long time to export. With compression option, user can use
nocompressed option to export to save time. And future, zstd is one new
option for end-user.
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-12-09 23:51:38 +08: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
08194783e0
cache: update unit tests to new cache manager constructor
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-16 10:34:50 -07:00
Tonis Tiigi
fef0996045
dockerfile: skip cni tests on rootless
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-09-05 16:49:48 -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
Tibor Vass
77ca4bce2e
client: add exporter test for sockets
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-08-27 20:53:37 +00:00
Tonis Tiigi
ac8fd77049
client: update tests to new deps
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-20 17:03:05 -07:00
Michael Crosby
9290c15ffc
Pin containerd runtime to v1
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-08-20 17:03:04 -07:00
Tonis Tiigi
2cea1107d6
travis: add ci caching
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-17 09:13:06 -07:00
Tonis Tiigi
fb3f2aeb63
client: add test for output target exists
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-31 10:21:26 -07:00
Tonis Tiigi
96b6a28312
exporter: allow oci exporters visibility to response metadata
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-31 10:21:19 -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
Akihiro Suda
d750cb188a
Merge pull request #1073 from tonistiigi/cni-net
...
add cni networking support
2019-07-19 10:47:27 +09:00
Andrey Smirnov
df52fc7f9c
Skip test in rootless mode
...
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-18 22:50:53 +03:00
Andrey Smirnov
fc9781a77c
Add test for 'rw' sysfs/cgroup re-mount
...
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-18 18:53:27 +03:00
Tonis Tiigi
e7759a861b
client: add cni network tests
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-10 18:00:06 -07:00
Tonis Tiigi
1ef979a7bb
llb: fix excessive formatting
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-01 16:55:08 -07:00
Tonis Tiigi
8e47580f71
fix flaky TestBasicInlineCacheImportExport
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-06-10 14:16:42 -07:00
Tonis Tiigi
d72c19071a
imageutil: use leases on fetching config
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-05-28 14:39:05 -07:00
Akihiro Suda
8483d06bec
connhelper/dockercontainer: support Docker context
...
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-05-26 08:41:33 +09:00
Dave Chen
8e9cc2794e
cleanup: no need to mkdir when importing cache
...
Signed-off-by: Dave Chen <dave.chen@arm.com>
2019-05-11 14:11:14 +08:00
Tonis Tiigi
d106163985
llb: fix security mode cap check
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-27 08:57:36 -07:00
Tibor Vass
e2f33ce4f0
Merge pull request #934 from tonistiigi/shared-session
...
client: add shared session possibility
2019-04-22 17:39:13 -07:00
Akihiro Suda
fc044d0e6b
new connhelper: kube-pod
...
Fix #769
Relates to tonistiigi/buildx#22
Usage:
$ kubectl run --generator=run-pod/v1 --image moby/buildkit:master-rootless bk -- --oci-worker-no-process-sandbox
$ export BUILDKIT_HOST=kube-pod://bk
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-04-19 20:34:00 +09:00
Tonis Tiigi
ef58b61d83
client: add shared session possibility
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-18 08:33:57 -07:00
Akihiro Suda
90b73ff6d2
connhelper: docker -> docker-container
...
for consistency with tonistiigi/buildx#17
Close #935
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-04-14 21:14:40 +09:00
Tonis Tiigi
e189eb7721
connhelper: refactor helpers to own packages
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-02 22:17:41 -07: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
Akihiro Suda
4f4bcade64
Merge pull request #907 from tonistiigi/tarball-exporter
...
exporter: add tarball exporter
2019-03-29 12:29:00 +09:00
Tõnis Tiigi
758c61e873
Merge pull request #570 from kunalkushwaha/entirlement-revised
...
security entitlement support
2019-03-28 16:14:06 -07:00
Tonis Tiigi
c1a1d7033d
exporter: add tar exporter
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-27 09:40:24 -07:00
Tonis Tiigi
01a8de7d74
integration: secmode switch support and security testcase
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2019-03-27 13:57:03 +09:00