Commit Graph

2422 Commits (7369864344fa5a42702bfa14a4b7bab179ee098c)

Author SHA1 Message Date
Paul "TBBle" Hampson 7369864344 Move printLogs from oci.go to sandbox.go
It's not OCI-specific, so it makes more sense in the file that exports
it to the world.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-17 02:35:16 +10:00
Paul "TBBle" Hampson 25f50eb711 Wrap original error when failing to read download context
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-17 02:35:16 +10:00
Paul "TBBle" Hampson bbd372d00e Correctly build forks in Travis
The CI script goes looking for the branch to which a commit was pushed,
but was applying the branch name to moby/buildkit even if being built on
a different fork.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-17 02:35:16 +10:00
Tõnis Tiigi 94696710fa
Merge pull request #1571 from TBBle/windows_layer_mount_support
Split LocalMounter.Mount into Windows and Unix
2020-07-16 08:59:49 -07:00
Tõnis Tiigi cc8097127b
Merge pull request #1570 from TBBle/use-containerd-default-shim
Use containerd's default runtime shim instead of hard-coded runtime v1
2020-07-16 08:58:20 -07:00
Akihiro Suda b2336d60bf
Merge pull request #1568 from tonistiigi/inline-fix
inline cache: fix handling of duplicate blobs
2020-07-16 18:20:02 +09:00
Paul "TBBle" Hampson cd47186783 Split LocalMounter.Mount into Windows and Unix
Due to current deficiencies in the Windows implementation of
containerd's Mount.Mount, we need different behaviour for mounting on
Windows and Unix platforms.

Specifically:
* Windows mounts can only mount in-place, and hence only one mount
  should be in the list.
* BuildKit doesn't own the mount directory, so should not try and remove
  it on unmount.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-16 17:13:46 +10:00
Paul "TBBle" Hampson 97314e8567 Don't build the containerd-shim shim for tests
This is the shim used by the containerd Runtime V1 on Linux,
which was the default under containerd 1.2 and earlier.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-16 15:06:20 +10: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
Paul "TBBle" Hampson 2de8df3268 Build the containerd-shim-runc-v2 shim for tests
This is the shim used by the containerd Runtime V2 on Linux, per the
default setting of `io.containerd.runc.v2`.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-16 15:06:09 +10:00
Tonis Tiigi be1a6aaa7a inline cache: fix handling of duplicate blobs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-15 15:45:32 -07:00
Edgar Lee 721eb7e3c3
Merge pull request #1563 from coryb/executor-exec-interface
Update Executor interface for Run and Exec
2020-07-13 15:10:26 -07:00
Cory Bennett caac945788 update godoc for Executor interface
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-07-13 20:16:21 +00:00
Cory Bennett 5909d1642e simplify done channel handling, fix other pr comments.
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-07-11 01:14:37 +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
Akihiro Suda 6220b8a4fc
Merge pull request #1557 from tonistiigi/mark-cached
solver: fix marking already cached vertex as cancelled
2020-07-07 12:49:49 +09:00
Tõnis Tiigi d3f295c5a9
Merge pull request #1534 from tonistiigi/secrets-env
secrets: allow providing secrets with env
2020-07-06 17:42:42 -07:00
Tonis Tiigi a8c2137598 resolver: add credentials cache
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-05 12:07:21 -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 05013a663b pull: fix session updating on resolver
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-05 00:15:33 -07:00
Tonis Tiigi 214aa5dbcf pull: allow separate sessions for different parts of pull
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-05 00:15:33 -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
Tõnis Tiigi ddfd87ec1f
Merge pull request #1553 from AkihiroSuda/runc-rc91
update runc binary to v1.0.0-rc91
2020-07-01 21:56:55 -07:00
Akihiro Suda d954b77f60
update runc binary to v1.0.0-rc91
release note: https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc91

vendored library isn't updated in this commit (waiting for containerd to vendor runc rc91)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-02 12:54:18 +09:00
Tõnis Tiigi 7b723809ce
Merge pull request #1552 from AkihiroSuda/update-20200701
Dockerfile: update binaries
2020-06-30 22:05:53 -07:00
Akihiro Suda ceb41d4350
Dockerfile: update binaries
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-01 13:32:22 +09:00
Akihiro Suda c25f2217dc
Merge pull request #1548 from tonistiigi/push-fix
push: dedupe push handlers
2020-06-30 12:49:37 +09:00
Tibor Vass 22d69507d3
Merge pull request #1549 from tonistiigi/time-formatting
progressui: fix logs time formatting
2020-06-29 15:12:08 -07:00
Tonis Tiigi bd29ad98cd progressui: fix logs time formatting
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-29 14:39:41 -07:00
Tonis Tiigi 375bfa60a2 contentutil: synchronize writers backed by pusher
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-29 12:40:05 -07:00
Tonis Tiigi d8e8fda57c push: dedupe push handlers
This allows to work around the containerd issue on
tracking push status on pushing manifest lists.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-29 12:08:18 -07:00
Tõnis Tiigi 17c11d9a97
Merge pull request #1541 from sipsma/fix-media-type
image export: Use correct media type when creating new layer blobs.
2020-06-24 14:56:26 -07: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 61bd44337b image export: Use correct media type when creating new layer blobs.
There are a few bugs in the image export related code being fixed here.
GetMediaTypeForLayers was iterating over diffPairs in the wrong order, resulting
in it always returning nil for images with more than one layer. This actually
worked most of the time because it accidentally triggered a separate codepath
meant to handle v0.6 migrations where mediatypes left empty get filled in.
However, fixing that bug revealed another existing bug where the "oci" parameter
in the image exporter was not being honored except when the v0.6 codepath got
followed, resulting in images to always have oci layer media types even when
docker types are used for the rest of the image descriptors.

Due to the interaction between these various bugs, the only practical end effect
previously was that single-layer images could use the wrong layer media type. An
existing test has been expanded to cover that case in a previous commit.

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
Tõnis Tiigi 95010be66d
Merge pull request #1538 from sipsma/integ-fix
client test: Fix check for whether sandbox has containerd
2020-06-23 16:17:44 -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
Tõnis Tiigi b0c5648786
Merge pull request #1533 from tonistiigi/git-token-auth
git: support for token authentication
2020-06-19 13:24:30 -07:00
Tonis Tiigi fdebe4c6b2 secrets: reuse constant on error message
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-18 09:19:23 -07:00
Tonis Tiigi 0ab180019d secrets: remove file specifics from variable names
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-17 12:33:15 -07:00
Tonis Tiigi 64e64e424d secrets: allow providing secrets with env
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-16 17:12:39 -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
Tõnis Tiigi 7c9d706a2a
Merge pull request #1530 from thaJeztah/containerd_userns
use containerd/sys to detect UserNamespaces
2020-06-15 11:36:55 -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
Tõnis Tiigi df35e9818d
Merge pull request #1529 from tonistiigi/migrate-fix
cache: avoid snapshot migration on shallow refs
2020-06-14 21:53:06 -07:00
Tibor Vass 929fff05fb
Merge pull request #1492 from heychenbin/chmod_dev
dockerfile: add --chmod support for COPY/ADD command
2020-06-13 15:35:56 -07:00
Tonis Tiigi 99e77a889e cache: avoid snapshot migration on shallow refs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-12 17:59:30 -07:00