Commit Graph

3058 Commits (58c359bc5ebf50a00f6d7d0a0eab277bbfb99867)

Author SHA1 Message Date
Akihiro Suda 58c359bc5e
go.mod: containerd v1.5.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-05-04 17:43:51 +09:00
Akihiro Suda 703e803bdd
Merge pull request #2100 from tonistiigi/update-golangci 2021-05-04 13:35:59 +09:00
Tonis Tiigi cc12bc820e lint: update golangci
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-05-03 18:32:34 -07:00
Tõnis Tiigi 1baea153f4
Merge pull request #2095 from rittneje/add-option-to-output-metadata
Add --metadata-file flag to output build metadata
2021-04-30 23:17:04 -07:00
Jesse Rittner 0406194498 Add --metadata-file flag to output build metadata
Signed-off-by: Jesse Rittner <rittneje@gmail.com>
2021-05-01 00:46:55 -04:00
Tõnis Tiigi 3e808950fc
Merge pull request #2091 from alexcb/redact-credentials-from-remote-url-errors
Redact credentials from URLs before returning errors
2021-04-28 12:15:38 -07:00
Alex Couture-Beil 5d2fd7eb45 Redact credentials from URLs before returning errors
this is to prevent errors such as

    failed to fetch remote https://user:password@github.com/user/private-repo-failure.git: exit status 128

from leaking the password; now it will be displayed like:

    failed to fetch remote https://user:xxxxx@non-existant-host/user/private-repo.git: exit status 128

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2021-04-28 10:39:15 -07:00
Tõnis Tiigi 75f3315583
Merge pull request #2017 from AkihiroSuda/containerd-15
Dockerfile: update containerd to v1.5.0-rc.2 / v1.4.4
2021-04-26 16:31:08 -07:00
Tõnis Tiigi aa8c1baeec
Merge pull request #2062 from earthly/corey/fix-stale-tokens
Remove potentially expired tokens
2021-04-26 09:10:46 -07:00
Tõnis Tiigi f113b49307
Merge pull request #2086 from thaJeztah/add_all_proxy
Add "ALL_PROXY" to list of default args / proxy env-vars
2021-04-26 09:09:44 -07:00
Sebastiaan van Stijn a743d4ba02
Add "ALL_PROXY" to list of default args / proxy env-vars
Relates to a82fff6377/docs/packages.md (proxies)

> (..) the first four of these are the standard built-in build-arg options
> available for `docker build`
> (..) The last, `all_proxy`, is a standard var used for socks proxying. Since
> it is not built into `docker build`, if you want to use it, you will need to
> add the following line to the dockerfile:
>
>     ARG all_proxy

Given the we support all other commonly known proxy env-vars by default, it makes
sense to add this one as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-24 18:19:02 +02:00
Corey Larson 9b7a5fc618 Remove potentially expired tokens.
Some registries (notably Quay) issue tokens that expire without providing an `expires in` value in the authorization payload. Therefore, if a token produces a 401, we should remove it and re-fetch.

Signed-off-by: Corey Larson <corey@earthly.dev>
2021-04-21 14:13:58 -06:00
Tõnis Tiigi 8e71ac40c5
Merge pull request #2076 from aaronlehmann/missing-mounts-in-cachemap
Fix missing mounts in execOp cache map
2021-04-20 16:18:32 -07:00
Akihiro Suda 19fd8ca54f
go.mod: containerd v1.5.0-rc.2
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-21 03:43:35 +09:00
Akihiro Suda e0c0b9b132
Dockerfile: update containerd to v1.5.0-rc.2 / v1.4.4
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-21 03:33:13 +09:00
Tõnis Tiigi 9fa286c08b
Merge pull request #2077 from fenollp/pssbl-nllptr
Fix potential crash on nil value
2021-04-15 09:09:49 -07:00
Pierre Fenoll a471427331 Fix potential crash on nil value
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
2021-04-15 15:01:02 +02:00
Aaron Lehmann 61bb15a47f Add hack to preserve Dockerfile RUN cache compatibility after mount cache bugfix
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-04-14 08:53:08 -07:00
Aaron Lehmann 6ab9eeac79 Add regression test for run cache not considering mounts
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-04-14 08:53:00 -07:00
Akihiro Suda c47972dc5a
Merge pull request #2018 from tonistiigi/wildcard-copy
contenthash: include basename in content checksum for wildcards
2021-04-14 15:58:43 +09:00
Aaron Lehmann 0e106e6967 Fix missing mounts in execOp cache map
A bug in cloneExecOp prevented mounts from being included in the digest
computed for the execOp cache map. This could lead to an exec being
wrongly cached when a different mount was used for a subsequent
execution.

Repro case:
https://gist.github.com/aaronlehmann/cfeaefc028df8127fb85b9b5f9125f2d

In this example, pass2 should generate an empty diff because the /from
and /to mounts are the same busybox image. But before the fix, it uses
the cached result from pass1 (with different mounts) instead.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-04-13 22:04:28 -07:00
Tõnis Tiigi d3e0a6f2d8
Merge pull request #2071 from AkihiroSuda/sort-worker
buildctl debug workers: make the ordering deterministic
2021-04-12 13:09:04 -07:00
Tõnis Tiigi 0e9b50874c
Merge pull request #2070 from AkihiroSuda/expose-containerd-labels
worker/containerd: expose namespace and UUID as labels
2021-04-09 15:01:42 -07:00
Tõnis Tiigi 33b56587e9
Merge pull request #2069 from AkihiroSuda/carry-2001
[Carry 2001] Dockerfile: update containerd to 1.4.3  + fix testutil
2021-04-09 10:42:42 -07:00
Tõnis Tiigi 97f7fff35a
Merge pull request #2072 from AkihiroSuda/move-control-api-out-of-experimental
api/services/control: move out of experimental
2021-04-09 10:40:54 -07:00
Akihiro Suda 35949ab569
worker/containerd: expose namespace and UUID as labels
e.g.,
```
Labels:
        org.mobyproject.buildkit.worker.containerd.namespace:   buildkit
        org.mobyproject.buildkit.worker.containerd.uuid:        343cfb49-cce9-453f-b21c-e5d22ca2cb47
        org.mobyproject.buildkit.worker.executor:               containerd
        org.mobyproject.buildkit.worker.hostname:               suda-ws01
        org.mobyproject.buildkit.worker.snapshotter:            overlayfs
```

Planned to be used by nerdctl to detect whether containerd exporter can be used

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-09 19:49:21 +09:00
CrazyMax f09774d589
Merge pull request #2073 from crazy-max/disable-patch-check
Disable codecov patch check
2021-04-09 12:45:36 +02:00
CrazyMax d2aa9f0302
Disable codecov patch check
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-04-09 12:09:18 +02:00
Akihiro Suda 1f87811b37
api/services/control: move out of experimental
Lots of client implementations have been already depending on the
current controller API, so the API should not be considered experimental.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-09 16:17:57 +09:00
Akihiro Suda 8c9ff86970
buildctl debug workers: make the ordering deterministic
Now the default worker is always printed first.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-09 16:03:46 +09:00
Akihiro Suda b77f42c611
testutil: fix specifying shim binary
The `plugins.linux.shim` section in the `config.toml` in the previous code
is meaningless for runtime v2.

For runtime v2, we need to just override `$PATH` to ensure the shim
binary path.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-09 15:39:51 +09:00
Akihiro Suda c4aefe8d5e
Merge pull request #2067 from tonistiigi/getstate-error
solver: check for input index existence
2021-04-09 15:24:17 +09:00
Tonis Tiigi 86154daec1 solver: check for input index existence
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-04-07 22:02:42 -07:00
Tõnis Tiigi df49b648c8
Merge pull request #2056 from alexcb/extend-ssh-util-checker
Move git protocol detection into seperate util
2021-03-31 18:55:49 -07:00
Akihiro Suda 1ff1d00c42
Merge pull request #2052 from tonistiigi/data-clone 2021-04-01 10:54:23 +09:00
Alex Couture-Beil ca151bceaf Move git protocol detection into seperate util
- the git protocol detection is required by buildx, and should reside in
a seperate exported gitutil package.

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2021-03-31 12:42:57 -07:00
Tonis Tiigi b62f436771 metadata: clone external data
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-03-30 13:30:29 -07:00
Akihiro Suda 3b49f992ca
Merge pull request #2051 from tonistiigi/backlink-locks
remotecache: lock backlinks cache
2021-03-30 14:33:48 +09:00
Akihiro Suda fa5d295a06
Merge pull request #2050 from tonistiigi/token-seed
authprovider: allow errors on seed unmarshal
2021-03-30 14:33:18 +09:00
Tonis Tiigi 6157418c76 authprovider: allow errors on seed unmarshal
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-03-29 22:14:41 -07:00
Tonis Tiigi ba90a9ee33 remotecache: lock backlinks cache
Items may be reused by the cache resulting concurrent writes.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-03-29 22:13:40 -07:00
Tõnis Tiigi 90f2402f62
Merge pull request #2042 from thaJeztah/bump_moby
go.mod: update docker/docker and docker/cli to v20.10.5
2021-03-29 13:03:37 -07:00
Tõnis Tiigi 216f9bdb66
Merge pull request #2043 from aaronlehmann/retry-on-5xx
Add retry on image push 5xx errors
2021-03-29 13:03:16 -07:00
Tõnis Tiigi 4ace3fe93a
Merge pull request #2048 from thaJeztah/double_path_join
solve: remove duplicate filepath.Join
2021-03-29 12:59:35 -07:00
Sebastiaan van Stijn 292685db37
solve: remove duplicate filepath.Join
I saw these, and there was no comment in the code explaining if there was a reason
for this; these were added in 2be999ba52, but couldn't
find a mention about these particular lines in the review comments, and I couldn't
think of a special reason for it ':-)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-29 13:24:55 +02:00
Aaron Lehmann d3b96f4e31 Add retry on image push 5xx errors
Some registries can be flaky and return intermittent 5xx errors. This
change allows those errors to be retried, similarly to network-level
errors.

Note that this needs the upstream containerd fix
https://github.com/containerd/containerd/pull/5276 to work reliably.

This was tested with a registry that was modified to return 504 on every
other manifest PUT. Without the change, exports to the registry fail
every other attempt.  With the change and the related containerd change,
exports to the registry always succeed.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2021-03-26 18:13:45 -07:00
Sebastiaan van Stijn d23b1bbf2c
go.mod: update docker/docker and docker/cli to v20.10.5
includes updated seccomp profile

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-26 23:48:49 +01:00
Tõnis Tiigi 4e69662758
Merge pull request #2035 from AkihiroSuda/containerd-fuse-overlayfs-snapshotter
AkihiroSuda/containerd-fuse-overlayfs -> containerd/fuse-overlayfs-snapshotter
2021-03-23 23:51:53 -07:00
Akihiro Suda ba2ddc71a0
Merge pull request #2037 from tonistiigi/xxv2
update to new cross toolchain
2021-03-24 13:23:56 +09:00
Akihiro Suda 2219e6bf42
Merge pull request #2036 from earthly/vlad/retry
Retry on temporary network failures
2021-03-24 12:52:29 +09:00