Tonis Tiigi
89fb005922
Revert "build: rework node resolution"
...
This reverts commit 616fb3e55cbc85647026f6e409af17e1011a85c4.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 3c709640e118019864dff3a2da9b872a82c1bc41)
2023-11-16 13:29:13 -08:00
Justin Chadwell
616fb3e55c
build: rework node resolution
...
This patch reworks and updates the node resolution logic for selecting a
node from a builder.
The new implementation reworks the logic to make use of containerd's
platforms.Matcher interface instead of manually associated strings, and
additionally provides a few behavioural changes over the original
implementation, namely platforms can be matched with non-strict
semantics. e.g. i386 builds can be scheduled on an amd64 node, arm/v6
builds can be scheduled on an arm/v7 node.
We also add a new collection of tests for tracking regressions and
making the intended behaviour clearer.
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-11-14 15:08:30 +01:00
Tonis Tiigi
7683ef9137
build: wait from child targets to complete before session release
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-11-07 14:41:33 -08:00
CrazyMax
de9d253f45
bake: local dockerfile support for remote definition
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-19 17:41:05 +02:00
CrazyMax
503d483731
fix lint issues after update
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-10-19 12:31:24 +02:00
Kohei Tokunaga
8da8ee2aea
controller: return original error to preserve stacktrace
...
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-13 12:09:35 +09:00
Silvin Lubecki
22e9e3342b
Revert "Introduce a client interface, to abstract from buildkit client."
...
This reverts commit 2aa6d52b065d0cb30b5a6b9d24d948e3f32defce.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2023-10-11 22:13:23 +02:00
Silvin Lubecki
2aa6d52b06
Introduce a client interface, to abstract from buildkit client.
...
This will allow further enhancement like caching remote driver responses.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2023-10-06 14:24:04 +02:00
CrazyMax
6c77b76b7b
Merge pull request #2038 from crazy-max/localstate-group
...
build: support local state group
2023-09-30 06:01:14 +02:00
CrazyMax
3dcb03452c
build: support local state group
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-09-30 01:08:06 +02:00
CrazyMax
9b7d30c9a0
build: opt to set build ref
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-09-30 01:03:00 +02:00
CrazyMax
2134a1e104
build: set target to local state
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-09-30 01:03:00 +02:00
CrazyMax
cc6957d1cc
build: move localstate logic
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-09-30 01:02:45 +02:00
CrazyMax
e018f8b6fb
Merge pull request #1994 from crazy-max/load-progress
...
build: sublogger to show docker load progress output
2023-09-13 08:21:44 +02:00
CrazyMax
03bedfb3c3
build: sublogger to show docker load progress output
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-09-12 22:24:29 +02:00
David Karlsson
bf5a70023c
build: improve error messages for docker driver
...
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-09-12 09:39:51 +02:00
Sebastiaan van Stijn
bafdc63b8c
migrate to github.com/distribution/reference v0.5.0
...
The "reference" package was moved to a separate module, which was extracted
from b9b19409cf
Also update compose-go, which also switched to distribution/reference;
full diff: https://github.com/compose-spec/compose-go/compare/v1.18.3...v1.18.4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-06 17:41:35 +02:00
Justin Chadwell
a43d9a67c7
git: fix error wrapping to ensure internal errors are propogated
...
Also, tidy up the error printing, so that now we always print out the
"current commit information was not captured by the build" message,
instead of just for not locating the git binary.
Before:
WARNING: buildx: git was not found in the system. Current commit information was not captured by the build
After:
WARNING: current commit information was not captured by the build: git was not found in the system: <error message>
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-08-22 12:17:17 +01:00
Justin Chadwell
e5cee892ed
Merge pull request #1965 from mqasimsarfraz/qasim/oci-annotations
2023-08-08 14:36:26 +01:00
Justin Chadwell
e206c585bb
build: error on attests on non-multiplatform driver
...
On drivers that do not support multi-platform builds (the default
`docker` driver), we do not support building attestations (unless using
the containerd store).
We need to check this feature before attempting to build using
attestations.
Also adds a test to ensure that attestations can be pushed to registries
at all, and that it adequately fails on the docker driver.
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-08-04 15:28:32 +01:00
Qasim Sarfraz
18894a8e3a
allow annotations for OCI image index
...
Signed-off-by: Qasim Sarfraz <qasimsarfraz@microsoft.com>
2023-08-03 12:08:04 +02:00
Kohei Tokunaga
3eb490153d
remote controller: Fix entrypoint interaction bugs
...
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-07-27 09:12:52 +09:00
Justin Chadwell
1d177f00d2
chore: tidy splitToDriverPairs to avoid unneccessary int
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-07-19 14:43:50 +01:00
CrazyMax
05ef20b434
build: set remote bake def and remote dockerfile as internal solve
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-07-19 04:18:28 +02:00
CrazyMax
418ea82d3a
build: mark result handle build as internal
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-07-17 16:53:12 +02:00
CrazyMax
8cbb7a9319
build: fix host-gateway handling
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-06-24 17:47:48 +02:00
CrazyMax
c2500ea2d8
build: prefer local image resolution for docker driver
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-06-21 11:05:06 +02:00
Tonis Tiigi
1138789f20
avoid extra client for history API detection
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-06-12 17:39:09 -07:00
Justin Chadwell
47e34f2684
Merge pull request #1813 from jedevc/oci-export-on-containerd
2023-06-07 15:19:54 +02:00
CrazyMax
0a2f35970c
build: display build details link
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-06-06 18:54:31 +02:00
Justin Chadwell
7cef021a8a
Merge pull request #1804 from jedevc/fixup-solve
2023-06-06 09:12:10 +02:00
Justin Chadwell
c6db4cf342
build: clarify NewResultHandle comment
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-06-06 09:08:30 +02:00
Justin Chadwell
183a73abae
build: docker exporter should instead use oci with containerd
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-31 15:59:55 +01:00
Justin Chadwell
b7f0b3d763
build: clear exports for secondary solve request
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-31 15:13:56 +01:00
Justin Chadwell
cd1648192e
build: rename ResultContext to ResultHandle
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-31 09:50:46 +01:00
Justin Chadwell
8d822fb06c
build: move main solve request into main gateway call
...
Now, we always perform the full solve request in the main gateway call.
This ensures that progress works properly, and makes the lifetime
semantics much clearer.
NewResultContext abstracts the details of a successful/failed build, to
always return a single ResultContext, even though the details of how a
gateway is created is different:
- For a failed build, we can just keep the gateway open.
- For a successful build, we immediately open another gateway and
re-evaluate the build definition in that gateway. This should give an
instant cache hit (since the build was just successful).
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-31 09:46:46 +01:00
CrazyMax
8c65e4fc1d
driver: add context to Features interface
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-05-30 20:13:18 +02:00
Justin Chadwell
2dae553d18
build: update outline fallback image
...
Subrequests have been included in docker/dockerfile:1.5 labs, so we can
update the fallback to point to this release.
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-26 10:38:38 +01:00
Justin Chadwell
91c17f25fb
build: tidy up print func
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-26 10:38:38 +01:00
Justin Chadwell
45fccef3f3
debug: evaluate all refs to allow multi-platform debugging
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-11 09:44:50 +01:00
Kohei Tokunaga
8fd81f5cfd
controller: avoid "context canceled" error on cleanup
...
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-05-10 12:56:33 +01:00
Justin Chadwell
e5a0ed1149
debug: secondary client build should not reuse solve opt ref
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-09 14:23:41 +01:00
Brian Goff
98efe7af10
Support for passing through raw buildkit policies
...
This adds an env var which can be used to pass in a path to a file to
read a buildkit source poliy from.
This is applied to any build is executed with the env set.
It is also applied to bakes (which are calling build behind the scenes).
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2023-05-03 23:07:44 +00:00
Justin Chadwell
75ed3e296b
Merge pull request #1737 from jedevc/improved-controller-progress
...
controller: refactor progress api
2023-04-26 10:17:00 +01:00
Tõnis Tiigi
28e6995f7c
Merge pull request #1735 from tonistiigi/localstate
...
build: support for saving local state by build ref
2023-04-25 15:17:08 -07:00
Justin Chadwell
2402607846
build: use gateway's solve context to allow cancelling getResultAt
...
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-04-21 10:52:03 +01:00
Kohei Tokunaga
fd5d90c699
remove unused fields from ResultContext
...
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-04-15 15:38:18 +09:00
Kohei Tokunaga
ce48b1ae84
Enable to restore build options from the server
...
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-04-15 15:38:05 +09:00
Kohei Tokunaga
b3340cc7ba
Enable to create container from error
...
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-04-15 15:36:33 +09:00
CrazyMax
200058b505
build: support for saving local state by build ref
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-04-12 21:37:03 -07:00