Commit Graph

3353 Commits (124126e7517d5dfdf5695a7eb8e357b9743d1e61)

Author SHA1 Message Date
Tõnis Tiigi b9d5a8f09a
Merge pull request #2177 from tonistiigi/fix-prune-lock
cache: avoid concurrent maps write on prune
2021-06-15 09:24:52 -07:00
Tonis Tiigi 976b7e9a97 metadata: hold lock on storageitem update
The locks usage is mixed up because two locks separate locks
are actually needed. With a specific lock, calls to SetValue
can be protected.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-14 20:27:01 -07:00
Tonis Tiigi 5429fe1b63 cache: avoid concurrent maps write on prune
remove() needs to be called while holding the manager lock

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-14 19:26:14 -07:00
Tõnis Tiigi 6a4a14b594
Merge pull request #2171 from jedevc/remote-source-chmod
Fix file modes with remote ADD commands
2021-06-14 16:14:07 -07:00
Justin Chadwell e49dc642cf Fix file modes with remote ADD commands
Signed-off-by: Justin Chadwell <me@jedevc.com>
2021-06-14 18:52:13 +01:00
Tonis Tiigi a7b155e30c llb: don't allow content diff for now
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-11 21:15:10 -07:00
Tonis Tiigi baa4fcdb0f add differ support for local source
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-11 21:15:07 -07:00
Akihiro Suda 59d2f76e5e
Merge pull request #2161 from tonistiigi/auth-context
session: make sure all token request keep correct context
2021-06-11 14:38:40 +09:00
Akihiro Suda 5648df8bcc
Merge pull request #2162 from tonistiigi/filesync-sendclose
filesync: ensure sendclose is always called
2021-06-11 14:38:13 +09:00
Tõnis Tiigi b0c769b97e
Merge pull request #2150 from thaJeztah/update_docker_master
Update docker/docker to master / v21.xx-dev (post libnetwork integration)
2021-06-10 09:27:13 -07:00
Tõnis Tiigi 4518627f4f
Merge pull request #2132 from jedevc/dockerfile-heredocs
Dockerfile heredocs
2021-06-10 09:23:04 -07:00
Tonis Tiigi fa632c5b21 dockerfile: add documentation for here-docs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-10 08:08:17 -07:00
Tõnis Tiigi 0f9f55ff7c
Merge pull request #2165 from ktock/fixdoc
Fix doc about Stargz Snapshotter and registry authentication
2021-06-09 19:16:17 -07:00
ktock 941e1b726e Fix doc about Stargz Snapshotter and registry authentication
Signed-off-by: ktock <ktokunaga.mail@gmail.com>
2021-06-10 10:39:46 +09:00
Sebastiaan van Stijn c98d24b054
Update docker/docker to master / v21.xx-dev (post libnetwork integration)
full diff: https://github.com/docker/docker/compare/v20.10.7..0ad2293d0e5b

This applies the same / similar local changes to buildkit as were made in
the branch that moby is currently vendoring:
https://github.com/moby/buildkit/compare/244e8cde...cpuguy83:update_libnetwork_import

Unfortunately, this (again) requires a "replace" rule (probably until we tagged
a release with this change). Go mod refuses to pick a version from master, and
(without the replace rule), does weird, reverting docker to a very old version,
predating the sirupsen rename:

    > [vendored 4/4] RUN --mount=target=/src,rw   --mount=target=/go/pkg/mod,type=cache   go mod tidy && go mod vendor &&   mkdir /out && cp -r go.mod go.sum vendor /out:
    #10 0.500 go: finding github.com/docker/docker 8dbd90ec00daa26dc45d7da2431c965dec99e8b4
    #10 0.599 warning: ignoring symlink /src/examples/kube-consistent-hash
    #10 1.027 go: github.com/moby/buildkit/util/testutil/integration imports
    #10 1.027       github.com/docker/docker/testutil/daemon imports
    #10 1.027 	github.com/docker/docker/opts imports
    #10 1.027 	github.com/docker/libnetwork/ipamutils imports
    #10 1.027 	github.com/docker/libnetwork/osl imports
    #10 1.027 	github.com/Sirupsen/logrus: github.com/Sirupsen/logrus@v1.8.1: parsing go.mod:
    #10 1.027 	module declares its path as: github.com/sirupsen/logrus
    #10 1.027 	        but was required as: github.com/Sirupsen/logrus
    ------
    error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c go mod tidy && go mod vendor &&   mkdir /out && cp -r go.mod go.sum vendor /out]: exit code: 1
    make: *** [vendor] Error 1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-09 19:31:25 +02:00
Tõnis Tiigi 0de03b421a
Merge pull request #1733 from ktock/reghost
Enable to apply registry configuration to stargz snapshotter
2021-06-09 09:21:45 -07:00
Justin Chadwell 2d35001217 Add integration tests for dockerfile heredocs
Signed-off-by: Justin Chadwell <me@jedevc.com>
2021-06-09 10:53:25 +01:00
Justin Chadwell de7fcce614 Integrate heredoc support into ADD/COPY and RUN
This modifies the command structures to support inline files, as well as
provides the logic to compile them down into appropriate LLB
definitions.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2021-06-09 10:53:25 +01:00
Justin Chadwell c362e15715 Add support for parsing heredocs in ADD/COPY and RUN
Signed-off-by: Justin Chadwell <me@jedevc.com>
2021-06-09 10:53:20 +01:00
Justin Chadwell aed6932b31 Implement low-level parser primitives for heredocs
This provides the basic functionality for the parser to recognize and
parse provided heredocs in supported commands.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2021-06-09 10:45:48 +01:00
ktock 1764b3b249 Enable stargz snapshotter to use session for snapshot auth
Signed-off-by: ktock <ktokunaga.mail@gmail.com>
2021-06-09 16:10:08 +09:00
Akihiro Suda 8993c69266
Merge pull request #2159 from tonistiigi/hack-shell
add hack/shell helper for dev shell environment
2021-06-09 13:31:20 +09:00
Tonis Tiigi ce27b7e638 filesync: ensure sendclose is always called
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-08 21:19:10 -07:00
Tonis Tiigi 53e7116197 session: make sure all token request keep correct context
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-08 21:17:35 -07:00
Tonis Tiigi d44a406213 add hack/shell helper for dev shell environment
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-08 14:30:40 -07:00
Sebastiaan van Stijn 7e4e6768f3
Merge pull request #2160 from tonistiigi/fix-gosum
vendor: fix broken gosum
2021-06-08 22:11:16 +02:00
Tonis Tiigi a53e054cb6 vendor: fix broken gosum
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-08 11:31:48 -07:00
Tõnis Tiigi 03af083def
Merge pull request #2144 from thaJeztah/bump_golang
update to go 1.16
2021-06-08 10:30:33 -07:00
Tõnis Tiigi 884578f479
Merge pull request #2151 from thaJeztah/move_config_opt
move RegistryConfig to resolver package
2021-06-08 10:27:38 -07:00
Sebastiaan van Stijn 12c9920fb5
move RegistryConfig to resolver package
This allows using the resolver package without having to import
the buildkit daemon configuration.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-08 12:59:46 +02:00
Akihiro Suda 67953d67c0
Merge pull request #2155 from tonistiigi/mirror-fix
test: fix mirror cache handling
2021-06-08 14:45:37 +09:00
Akihiro Suda 04be2c3eaf
Merge pull request #2154 from tonistiigi/arm64-proto
hack: update proto generators for arm64
2021-06-08 14:28:29 +09:00
Akihiro Suda 817955dc8d
Merge pull request #2116 from tonistiigi/git-subdir
git: support subdir component
2021-06-08 14:27:50 +09:00
Akihiro Suda d458fb3043
Merge pull request #2156 from tonistiigi/nil-deref-fix
cache: fix possible nil dereferences
2021-06-08 14:26:32 +09:00
Tonis Tiigi 167e0dc74a cache: fix possible nil dereferences
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-07 20:26:05 -07:00
Tonis Tiigi 19453d5acc test: fix mirror cache handling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-07 18:59:32 -07:00
Tonis Tiigi 33af267b9a hack: update proto generators for arm64
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-07 11:58:10 -07:00
Tõnis Tiigi 8e88c5d270
Merge pull request #2149 from thaJeztah/update_docker
go.mod: update docker and docker cli to v20.10.7
2021-06-05 10:31:57 -07:00
Sebastiaan van Stijn 89f23a84f6
go.mod: update docker and docker cli to v20.10.7
- pkg/signal: ignore SIGURG on all platforms
- pkg/archive: use v2 capabilities in layer archives
- update ishidawataru/sctp to fix possible socket leak when bind fails

docker/cli:

- config: print deprecation warning when falling back to ~/.dockercfg

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-05 13:58:11 +02:00
Tõnis Tiigi 0c13337040
Merge pull request #2127 from sschaap/feature/windows-openssh
Support for Windows OpenSSH agent forwarding
2021-06-04 22:02:19 -07:00
Sebastiaan van Stijn 22dd74ae93
update to go 1.16
This updates all occurrences of Go 1.13 to Go 1.16; also updated
the code that's used to redact credentials in URLs to use the Go
implementation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-02 00:31:57 +02:00
Tõnis Tiigi 12cfc87450
Merge pull request #2146 from thaJeztah/fix_protobuf_install
generated files: update google/protobuf v1.3.5, protoc v3.14.0 and fix install for go modules
2021-06-01 15:17:42 -07:00
Sebastiaan van Stijn acbe79f936
generated-files: update protoc to v3.11.4 to match google/protobuf
see https://github.com/golang/protobuf/blob/v1.3.5/.travis.yml#L15

Note that gogo/protobuf v1.3.2 updated protoc to v3.14.0; https://github.com/gogo/protobuf/releases/tag/v1.3.2
however, regenerating protobufs with this switched an import to use
google.golang.org/protobuf/types/known/timestamppb instead of
github.com/golang/protobuf/ptypes/timestamp, so using the older
version for now

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-01 23:23:58 +02:00
Sebastiaan van Stijn 056afec140
generated files: update google/protobuf v1.3.5, and fix install for go modules
This patch updates the script and Dockerfile to prevent issues when using go
modules.

The first change is to use a plain `git clone` instead of `go get -d` to download
the source. While (like "pre go-modules") `go get -d` won't *build* the binaries
when go modules are used, it *will* use go modules to download the package
(and dependencies); as a result:

- no git repository will be cloned in gopath
- go modules will be downloaded for "master" (not the version that we specify
  to build)

Note: Once we update to Go 1.16, this script could be updated to use `go install <repo>@version`

The second change is an update to the `update-generated-files` script to detect
the correct version of google/protobuf to use from the `go.mod`'s  `replace` rule,
to make sure we generate (and verify) using the correct version.

The Dockerfile was also updated to update the default versions specified in the
PROTOBUF_VERSION and GOGO_VERSION build-args (although not strictly necessary).

Regenerating the files with this version resulted in a minor formatting change.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-01 23:23:53 +02:00
Tõnis Tiigi 8df5671844
Merge pull request #2082 from aaronlehmann/copy-include-exclude
Add IncludePatterns and ExcludePatterns options for Copy
2021-06-01 12:47:13 -07:00
Tõnis Tiigi d919be2275
Merge pull request #2145 from thaJeztah/bump_containerd_runc
Dockerfile: update containerd and runc to the latest patch releases
2021-06-01 11:06:47 -07:00
Sebastiaan van Stijn 750a9a5ce6
Dockerfile: update containerd and runc to the latest patch releases
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-01 16:51:33 +02:00
Siebe Schaap c9a5f8893f Fix regular expression to test for Windows named pipe in SSH agent path; allowed backslashes in host.
Signed-off-by: Siebe Schaap <siebe@digibites.nl>
2021-05-27 20:40:43 +02:00
Siebe Schaap f3bdb4a784 Rename SSH agent forwarding helper parsePlatformSocketPath() to getWindowsPipeDialer().
Signed-off-by: Siebe Schaap <siebe@digibites.nl>
2021-05-27 20:40:43 +02:00
Siebe Schaap 146ea468c9 Update Windows named pipe handling for SSH forwarding to use x/sys/windows rather than syscall.
Signed-off-by: Siebe Schaap <siebe@digibites.nl>
2021-05-27 20:40:43 +02:00