Commit Graph

3402 Commits (4997b57f1d92eeff54849eadba39a3136bbdfdf4)

Author SHA1 Message Date
Tõnis Tiigi 4997b57f1d
Merge pull request #2373 from crazy-max/buildarg-hostname
Add BUILDKIT_SANDBOX_HOSTNAME build-arg
2021-09-21 15:47:16 -07:00
CrazyMax e5ecbf9722
Add BUILDKIT_SANDBOX_HOSTNAME build-arg
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-09-22 00:17:20 +02:00
Akihiro Suda 44891f4cb9
Merge pull request #2369 from tonistiigi/resolver-timeout-fixes
resolver timeout fixes
2021-09-21 14:29:01 +09:00
Tõnis Tiigi e878d4d823
Merge pull request #2348 from zchee/gomod-resort
go.mod: sort and move self managed indirect dependencies to first block
2021-09-20 12:34:29 -07:00
Tõnis Tiigi 7fb8e74422
Merge pull request #2361 from crazy-max/move-config
Move config parsing to a dedicated pkg
2021-09-20 10:24:02 -07:00
Tõnis Tiigi a0afb6902a
Merge pull request #2311 from crazy-max/buildsources
Generate and embed build sources
2021-09-20 09:15:53 -07:00
Koichi Shiraishi d211b5a505
go.mod: sort and move self-managed indirect dependencies to first block
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
2021-09-20 18:29:01 +09:00
Tonis Tiigi 161b581e71 solver: increase timeout for job registration
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-18 21:28:45 -07:00
Tonis Tiigi f62bb55245 resolver: make sure authorizer is not overwritten on other resolvers
Authorizer stores the current session.Group so if it is
overwritten for another resolver it means that session might
have been dropped and authentication will fail.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-18 21:22:32 -07:00
Tonis Tiigi 6bd2eb5046 resolver: use different mutext for handlers and hosts
hosts mutex is called on initialization, meaning `GetResolver` might
block if it is in the middle of auth exchange. This is currently bad
in the case where Job initialization needs to register a name before
timeout is reached.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-18 21:04:16 -07:00
CrazyMax 5fcc94454f
Generate and embed build sources
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-09-18 01:39:35 +02:00
CrazyMax 3fd43386d0
Move config parsing to a dedicated pkg
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-09-17 12:13:35 +02:00
Akihiro Suda 8f2e691b19
Merge pull request #2364 from tonistiigi/todo-clean
Clean up old TODOs
2021-09-15 15:53:17 +09:00
Tonis Tiigi 35fcb28a00 Clean up old TODOs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-14 22:28:08 -07:00
Tõnis Tiigi 252d7cac94
Merge pull request #2363 from crazy-max/urlutil
Refactor url redacting util
2021-09-14 10:12:24 -07:00
CrazyMax 8bb242e7ac
Refactor url redacting util
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-09-14 17:39:07 +02:00
Tõnis Tiigi e07f3883e3
Merge pull request #2351 from morlay/log-fix
bklog: only log tracing ids when span exporter not nil
2021-09-08 19:03:02 -07:00
Morlay 0f52917bf3 bklog: only log tracing ids when span exporter not nil
Signed-off-by: Morlay <morlay.null@gmail.com>
2021-09-09 09:32:39 +08:00
Tõnis Tiigi f5eb400a85
Merge pull request #2318 from aaronlehmann/follow-links-includedpaths
Follow links in includedPaths to resolve incorrect caching when source path is behind symlink
2021-09-08 10:43:26 -07:00
Aaron Lehmann e9e6cec838 Use getFollowLinksWalked
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-09-08 09:14:48 -07:00
Akihiro Suda 91d2f2dc17
Merge pull request #2349 from tonistiigi/shell-workdir
hack: allow mounting in workdir in shell
2021-09-08 22:41:14 +09:00
Aaron Lehmann 98f54ff22c Handle the case of multiple path component symlinks (including last component) in wildcard prefix
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-09-07 16:46:00 -07:00
Tonis Tiigi 9c672574e5 hack: allow mounting in workdir in shell
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-07 15:47:54 -07:00
Aaron Lehmann ddd18de18e Add test case for symlink which is not final path component before wildcard
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-09-07 13:41:19 -07:00
Akihiro Suda ea773f6a9b
Merge pull request #2344 from tonistiigi/zstd
exporter: support creating blobs with zstd compression
2021-09-08 02:24:13 +09:00
Tonis Tiigi a5e0b865f8 update getremote test for zstd
Estargz support has been removed from this test as
implementation does not guarantee digest stability
and only reason it passed were the exceptions in the
test via variant map that ignored cases where timing
resulted the digest to go wrong. This needs to be
addressed in the follow up if we want to keep estargz
support.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-06 17:58:47 -07:00
Tonis Tiigi 8b5c4d74ef exporter: support creating blobs with zstd compression
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-05 22:43:15 -07:00
Tõnis Tiigi 9b010e774d
Merge pull request #2331 from zchee/gomod-fmt-117 2021-09-03 10:39:56 -07:00
Koichi Shiraishi 8f2bd90b59
go.mod: split the indirect packages
After go1.17, all indirect packages are listed in the go.mod file.

In addition, has been introduced the ability to list indirect packages separately.
Split the indirect packages to make the dependency packages clearer.

Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
2021-09-03 21:52:16 +09:00
Tõnis Tiigi cf80727e5c
Merge pull request #2181 from ktock/overlaydiff
Compute diff from the upper directory of overlayfs-based snapshotter
2021-09-02 16:04:52 -07:00
Tõnis Tiigi ebd5157fe5
Merge pull request #2342 from thaJeztah/bump_moby_term
go.mod: github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6
2021-09-02 14:20:02 -07:00
Sebastiaan van Stijn f59c759353
go.mod: github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6
full diff: bea5bbe245...3f7ff695ad

updates Azure/go-ansiterm to fix integer overflow on arm

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-09-02 16:31:16 +02:00
Kohei Tokunaga d586efd5db Compute diff from the upper dir of overlayfs-based snapshotter
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-09-02 17:58:12 +09:00
Tõnis Tiigi 9462a2399b
Merge pull request #2338 from thaJeztah/containerd_seccomp_check
Use containerd/pkg/seccomp.IsEnabled()
2021-08-29 23:41:54 -07:00
Sebastiaan van Stijn d782dd8d78
Use containerd/pkg/seccomp.IsEnabled()
This replaces the local SeccompSupported() utility for the implementation
in containerd, which performs the same check.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-28 12:56:18 +02:00
Tõnis Tiigi 89ebbe5d34
Merge pull request #2316 from sipsma/rm-info
Refactor cache metadata interface.
2021-08-25 13:43:17 -07:00
Erik Sipsma a9f1980ebb Refactor cache metadata interface.
There are a few goals with this refactor:
1. Remove external access to fields that no longer make sense and/or
   won't make sense soon due to other potential changes. For example,
   there can now be multiple blobs associated with a ref (for different
   compression types), so the fact that you could access the "Blob"
   field from the Info method on Ref incorrectly implied there was just
   a single blob for the ref. This is on top of the fact that there is
   no need for external access to blob digests.
2. Centralize use of cache metadata inside the cache package.
   Previously, many parts of the code outside the cache package could
   obtain the bolt storage item for any ref and read/write it directly.
   This made it hard to understand what fields are used and when. Now,
   the Metadata method has been removed from the Ref interface and
   replaced with getters+setters for metadata fields we want to expose
   outside the package, which makes it much easier to track and
   understand. Similar changes have been made to the metadata search
   interface.
3. Use a consistent getter+setter interface for metadata, replacing
   the mix of interfaces like Metadata(), Size(), Info() and other
   inconsistencies.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2021-08-25 19:15:09 +00:00
Akihiro Suda 94e9d1535a
Merge pull request #2246 from ktock/esgzcompression
Support `estargz` compression type
2021-08-25 18:19:40 +09:00
Kohei Tokunaga f8d30d567e Add `estargz` compression type
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-08-24 14:10:09 +09:00
Tõnis Tiigi f314c4bd03
Merge pull request #2319 from aaronlehmann/use-fixed-matching-functions
Use fixed fileutils matching functions
2021-08-23 14:39:51 -07:00
Akihiro Suda d71e905ad1
Merge pull request #2322 from thaJeztah/replace_toml
cmd/buildkitd: replace BurntSushi/toml with pelletier/go-toml
2021-08-24 01:15:32 +09:00
Aaron Lehmann 8021a3e667 Use fixed fileutils matching functions
This is important for two reasons:

1) Keeps caching logic consistent with recent fsutil changes to use
   these functions (also vendored here).

2) Allows us to move forward with removal of the original buggy Matches
   implementation in moby/moby.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-08-21 11:17:09 -07:00
Tõnis Tiigi 99368b8ecc
Merge pull request #2324 from tonistiigi/64bit-align-buildcount
control: fix 64bit alignment for buildcount
2021-08-20 12:16:44 -07:00
Tonis Tiigi 5cfe388b88 control: fix 64bit alignment for buildcount
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-08-20 10:39:19 -07:00
Sebastiaan van Stijn 0e6251510e
cmd/buildkitd: replace BurntSushi/toml with pelletier/go-toml
The BurntSushi/toml project has been deprecated, and the ecosystem
is converging on using pelletier/go-toml as the "canonical" replacement.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-20 18:57:04 +02:00
Aaron Lehmann 56c0981f1e Follow links in includedPaths to resolve incorrect caching when source path is behind symlink
As discussed in #2300, includedPaths does not resolve symlinks when
looking up the source path in the prefix tree. If the user requests a
path that involves symlinks (for example, /a/foo when a symlink /a -> /b
exists), includedPaths will not find it, and will expect nothing to be
copied. This does not match the actual copy behavior implemented in
fsutil, which will follow symlinks in prefix components of a given path,
so it can end up caching an empty result even though the copy will
produce a non-empty result, which is quite bad.

To fix this, use getFollowLinks to resolve the path before walking it.
In the wildcard case, this is done to the non-wildcard prefix of the
path (if any), which matches the behavior in fsutil.

Fixes the repro case here:
https://gist.github.com/aaronlehmann/64054c9a2cff0d27e200cc107bba3d69

Fixes #2300

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-08-18 11:54:48 -07:00
Akihiro Suda 7fa9e5778c
Merge pull request #2312 from tonistiigi/go1.17
update go to 1.17
2021-08-18 03:36:21 +09:00
Tonis Tiigi 2d18f3a923 gomod: update to go1.17
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-08-16 20:00:00 -07:00
Tonis Tiigi ac61da5890 update go to 1.17
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-08-16 19:56:45 -07:00
Tõnis Tiigi 124126e751
Merge pull request #2273 from sipsma/fix-2270
Fix flightcontrol test and usage bugs
2021-08-16 16:07:42 -07:00