Commit Graph

2592 Commits (32e70827f75b7208cd19fec20b7072a8aa3fe52c)

Author SHA1 Message Date
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
Akihiro Suda 4d1f260e84
Merge pull request #1578 from tonistiigi/deploy-fix
hack: unblock master deploy
2020-07-18 12:27:43 +09:00
Tõnis Tiigi 27bea0af21
Merge pull request #1579 from tonistiigi/tests-debug
integration: tests flakiness fixes
2020-07-17 20:11:41 -07:00
Tonis Tiigi 55e29c1abe integration: fix rootless worker binaries closing after tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-17 19:30:40 -07:00
Tonis Tiigi 8247b7b50b integration: increase timeouts
Set the limit high enough to ensure failure in CI
signals a bug

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-17 19:30:40 -07:00
Tonis Tiigi adb68c2764 integration: add concurrent sandbox limit
Default parallelization seems off in CI

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-17 19:30:33 -07:00
Tonis Tiigi f825fea268 buildkitd: ensure stack traces on logging errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-17 19:18:49 -07:00
Tõnis Tiigi 97ca82f4c4
Merge pull request #1576 from coryb/frontendllbbridge-exec-refactor
add Run/Exec to FrontendLLBBridge interface
2020-07-16 20:45:30 -07:00
Tonis Tiigi 0089fbc454 hack: unblock master deploy
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-16 20:42:14 -07:00
Tõnis Tiigi e65986cbe8
Merge pull request #1577 from sipsma/faster-remotecache
remotecache: Only visit each item once when walking results.
2020-07-16 20:11:24 -07:00
Cory Bennett a23754fca1 Release needs context.TODO() so if ctx is cancelled the refs can be cleaned up
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-07-17 02:08:03 +00:00
Cory Bennett 441b76947b update FrontendLLBBridge to be composed of Executor
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2020-07-17 01:05:22 +00: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
Erik Sipsma 806fddd7f7 remotecache: Only visit each item once when walking results.
Before this change, walkAllResults did not skip an item if it had already been
visited, so walking the graph of results actually followed every single possible
path in the graph instead of just visiting each item once.

On small graphs this wasn't noticeable, but on sufficiently large remote cache
imports this rapidly scaled out of control. For example, I first encountered
this when importing a max-cache from a build of a full linux rootfs from source
(which takes about 30 minutes to build w/out cache on an 18-core machine) and
after 30 minutes the cache import was still running with all CPUs pegged at 100%

To fix this, walkAllResults now keeps a map of already visited items (keyed by
their pointer) and skips visiting an item if it's already been visited, making
it usable on large remote cache imports.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-07-16 17:49:36 -07: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
Tõnis Tiigi 919ee62a78
Merge pull request #1574 from sipsma/fix-containerd-test
Use new containerd shim in integ tests; don't skip on requirement error.
2020-07-16 11:26:45 -07:00
Tõnis Tiigi 62d1fff289
Merge pull request #1573 from TBBle/small_fixes
Make Travis usable for forks
2020-07-16 11:23:47 -07:00
Erik Sipsma f828f65516 Use new containerd shim in integ tests; don't skip on require error.
A recent change updated the containerd shim built for integ tests to the newer
v2, but the integ test code itself was still hardcoded to look for the older
shim binary and, when that binary wasn't found, skip running the test. This
caused all containerd tests to be skipped.

The fix here updates the binary name to v2 and also removes the branch that
will skip a test when the requirements check fails.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-07-16 10:21:21 -07:00
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