Commit Graph

2936 Commits (edd0a756a31a6a87764285d66ef06b963d454694)

Author SHA1 Message Date
Tõnis Tiigi edd0a756a3
Merge pull request #1991 from thaJeztah/0.8_backport_git_token_scope
[v0.8 backport] git: set token only for main remote access
2021-02-22 09:12:07 -08:00
Tonis Tiigi 99bc88e139
git: set token only for main remote access
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 5bf64293f8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-22 10:19:24 +01:00
Tõnis Tiigi 3da6befd7f
Merge pull request #1990 from thaJeztah/0.8_backports
[v0.8 backport] Fix reference count issues on typed errors, docs: fix frontend image tags
2021-02-21 19:32:27 -08:00
Tonis Tiigi de7435ac1a
avoid double release of same ref released multiple times
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 42fb2a8771)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-21 20:25:08 +01:00
Tonis Tiigi 7c7c7e4f6e
make sure result refs returned in errors are clone
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit b4b0ece384)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-21 20:25:07 +01:00
Tonis Tiigi ce6dc4bd0d
don't commit cache mounts on error
Cache mount instances are shared between multiple vertextes/builds
so if one of the cloned instance gets committed reference count
will get corrupted as other parts of the code still see reference as
mountable.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 3660e5f9c8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-21 20:25:04 +01:00
Tibor Vass c7267e12cf
dockerfile/docs: fix frontend image tags
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 1218e37c23)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-21 20:19:44 +01:00
Tõnis Tiigi 2f4d8ba7a0
Merge pull request #1968 from thaJeztah/0.8_backport_binfmt_update
[v0.8 backport] update qemu emulators
2021-02-10 08:44:52 -08:00
Tõnis Tiigi 32279d3d93
Merge pull request #1971 from thaJeztah/0.8_backport_dockerfile_export_flags_used
[v0.8 backport] frontend/dockerfile: add RunCommand.FlagsUsed field
2021-02-05 09:28:04 -08:00
Tõnis Tiigi 67d5066403
Merge pull request #1970 from thaJeztah/0.8_backport_fileop_cache_fix
[v0.8 backport] fileop: fix checksum to contain indexes of inputs
2021-02-05 09:27:44 -08:00
Tõnis Tiigi c66c9f30cb
Merge pull request #1969 from thaJeztah/0.8_backport_resolver_err_sync
[v0.8 backport] resolver: avoid error caching on token fetch
2021-02-05 09:27:23 -08:00
Tõnis Tiigi db665a1b7c
Merge pull request #1967 from thaJeztah/0.8_backport_armhf_seccomp_fix
[v0.8 backport] fix seccomp compatibility in 32bit arm
2021-02-05 09:25:50 -08:00
Sebastiaan van Stijn 5e11c07cc7
frontend/dockerfile: add RunCommand.FlagsUsed field
The FlagsUsed contains a list of flags that were used, which allows the classic
(non-buildkit) builder in dockerd to produce an error when non-supported options
are used in a Dockerfile.

This is a short-term solution; a more permanent solution will be to keep track
of which version of the Dockerfile syntax is supported, and to have the classic
builder pass the maximum supported version of the syntax.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ebed917e43)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-04 22:23:25 +01:00
Tonis Tiigi 7a4ca33994
fileop: fix checksum to contain indexes of inputs
Cache mismatch can happen if fileop switches input indexes
between different actions.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 8d70777537)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-04 22:20:54 +01:00
Tonis Tiigi 76ba5ad9b8
resolver: avoid error caching on token fetch
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 3a2c03052f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-04 22:19:16 +01:00
Tonis Tiigi c3789b226b
update qemu emulators
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit dae8f156da)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-04 22:17:19 +01:00
Tonis Tiigi 862bd25bc7
fix seccomp compatibility in 32bit arm
Seccomp 2.4.2 is needed for new time64 syscalls not to error in
applications

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 1fd4c49605)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-04 22:14:20 +01:00
Brian Goff 68bb095353 Add support for apparmor/selinux
Set's an apparmor profile on the OCI spec if one is configred on the
worker.
Adds selinux labels to containers (only added if selinux is enabled on
the system).

This assumes that the specified apparmor profile is already loaded on
the system and does not try to load it or even check if it is loaded.

SELinux support requires the `selinux` build tag to be added.
Likewise, `runc` would require both the `apparmor` and `selinux` build
tags.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Vendored go-selinux to v1.8.0
Fixed tests

Signed-off-by: Tibor Vass <tibor@docker.com>
2021-01-27 23:40:43 +00:00
Tõnis Tiigi 8142d66b5e
Merge pull request #1898 from tonistiigi/nil-frontend-result
allow nil return from frontend
2020-12-14 17:55:07 -08:00
Tonis Tiigi 3889ef509c allow nil return from frontend
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-14 17:19:41 -08:00
Tibor Vass 05fb3ac3ad
Merge pull request #1897 from tonistiigi/export-config
exporter: return config digest when exporting single-arch image
2020-12-14 16:08:11 -08:00
Tonis Tiigi 1098f8ee82 exporter: return config digest when exporting single-arch image
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-14 13:26:16 -08:00
Akihiro Suda b41b9c9e1b
Merge pull request #1895 from tonistiigi/runcworker-test-debug
add debug for runcworker test
2020-12-14 14:42:54 +09:00
Tõnis Tiigi 50f6e618fb
Merge pull request #1883 from tonistiigi/images-readme
docs: add readme used for registry images
2020-12-13 21:05:55 -08:00
Tonis Tiigi 970e630f1b add debug for runcworker test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-13 18:44:54 -08:00
Tonis Tiigi 128b98642a docs: add readme used for registry images
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-12 01:01:51 -08:00
Tibor Vass 07029de618
Merge pull request #1879 from tonistiigi/foreign-mediatype
handle foreign mediatypes on push
2020-12-11 11:48:55 -08:00
Tibor Vass bea286f94c
Merge pull request #1871 from tonistiigi/scheduler-fix-for-testing
solver: fix slow-cache status tracking with preprocess
2020-12-11 11:47:45 -08:00
Tibor Vass 38696bdf1d
Merge pull request #1891 from tonistiigi/flightcontrol-cancel
flightcontrol: fix possible invalid cancellation
2020-12-11 02:56:01 -08:00
Tonis Tiigi e56e7ba46b flightcontrol: fix possible invalid cancellation
There was a race with context getting cancelled and new request
arriving that could resulted new request to receive cancelled result
as well. This happened because lock was held when getting the Done()
channel but it could have been already released by the time returned
channel was closed.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-11 00:57:12 -08:00
Tõnis Tiigi bf5e780c5e
Merge pull request #1886 from tonistiigi/git-proto-fix
fix building from git url without a protocol
2020-12-10 23:04:15 -08:00
Tonis Tiigi 2f247f0340 solver: fix slow-cache status tracking with preprocess
Preprocess should not be taken into account when calculating
cache-slow state. But it should be used to detect if dep is complete
so preprocess runs before parent's exec function.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-10 22:57:30 -08:00
Tõnis Tiigi 275dd408ea
Merge pull request #1887 from tonistiigi/discard-delay
solver: delay before discarding job
2020-12-10 22:08:10 -08:00
Tibor Vass fbf8ed15a8 sshutil: allow uppercase usernames (thinking of you thaJeztah)
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-12-11 05:19:39 +00:00
Tõnis Tiigi a3b40362ef
Merge pull request #1889 from tonistiigi/llb-fileop-fix
llb: make sure fileop uses the platform for current state
2020-12-10 20:40:27 -08:00
Alex Couture-Beil 201482bba9 Allow for usersnames with hyphens or underscores
- usernames could have - or _
- expand testing cases

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-12-10 17:10:38 -08:00
Alex Couture-Beil 3fa063dcf3 move ssh regexp test to common location
- include testing
- improve hostname checking

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-12-10 17:10:38 -08:00
Alex Couture-Beil 23af9dcb86 require a username for git over ssh
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-12-10 17:10:38 -08:00
Alex Couture-Beil b64f992917 Allow any ssh-user while cloning from git
- this allows one to use a non-standard ssh username like repo@host
rather than assuming it must be git@host

Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2020-12-10 17:10:38 -08:00
Tonis Tiigi 0e441bedca llb: make sure fileop uses the platform for current state
If source root sets the platform for a state, vertexes should
keep that instead of using the global value passed on marshal.
Already worked properly for exec, but not for file.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-10 12:24:15 -08:00
Akihiro Suda df9a515214
Merge pull request #1881 from tonistiigi/dockerfile-1.2
update Dockerfiles to 1.2
2020-12-10 15:08:03 +09:00
Tonis Tiigi 1b271e0014 solver: delay before discarding job
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-09 20:53:03 -08:00
Tonis Tiigi a6baa678ea fix building from git url without a protocol
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-09 18:40:34 -08:00
Tõnis Tiigi 8c7c5269df
Merge pull request #1884 from tonistiigi/dockerfile-docs-update
docs: update external dockerfile docs
2020-12-08 22:18:54 -08:00
Tonis Tiigi 9f6172c8bd docs: update external dockerfile docs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-08 21:26:18 -08:00
Tonis Tiigi 245e71fd8b update Dockerfiles to 1.2
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-08 15:00:30 -08:00
Tonis Tiigi aabdec1778 handle foreign mediatypes on push
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-05 23:16:44 -08:00
Tõnis Tiigi 0af7b1b9c6
Merge pull request #1873 from crazy-max/fix-tagging
Fix image tagging
2020-12-05 00:37:53 -08:00
CrazyMax 8098b43022
Merge remote-tracking branch 'upstream/master' into fix-tagging
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-12-05 04:48:49 +01:00
CrazyMax 94899e5c91
Merge pull request #1878 from crazy-max/codecov-diff
Tweak codecov delta
2020-12-05 03:44:46 +01:00