Commit Graph

3669 Commits (9004de880471f193b927c5aeb2e87a8f12d1efd7)

Author SHA1 Message Date
Tonis Tiigi 9004de8804 Revert "Remove potentially expired tokens."
This reverts commit 9b7a5fc618.

This patch casues issues for cross-repo mounts
when user doesn't have credentials for source repo
and fallback needs to happen.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-13 21:24:23 -08:00
CrazyMax 63eff24da0
Merge pull request #2624 from tonistiigi/update-docker-0211
vendor: update docker and fsutil
2022-02-12 13:07:18 +01:00
Tonis Tiigi 76870ee06f vendor: update docker and fsutil
Brings in fixes for the pattern matcher.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-11 22:17:22 -08:00
Tõnis Tiigi d50b4d4e5c
Merge pull request #2603 from ktock/blobgc
cache: Allow sharing compression variants among refs
2022-02-11 11:23:05 -08:00
Akihiro Suda b4617dce7c
Merge pull request #2621 from crazy-max/metadata-indent
buildctl: indent metadata json output
2022-02-11 18:14:02 +09:00
Tõnis Tiigi c50d70e852
Merge pull request #2620 from lugeng/fix_close_readclosers
Close readclosers returned by DecompressStream
2022-02-11 01:05:47 -08:00
CrazyMax 1d17f97a0b
buildctl: indent metadata json output
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-11 09:38:41 +01:00
Kohei Tokunaga 4280dfd489 cache: Allow sharing compression variants among refs
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2022-02-11 16:43:33 +09:00
genglu.gl 13665367df Close readclosers returned by DecompressStream
Signed-off-by: genglu.gl <luzigeng32@163.com>
2022-02-11 14:53:14 +08:00
Tõnis Tiigi 45fc3ed510
Merge pull request #2561 from cpuguy83/keep-non-distributable
Do not re-tag non-distributable blob descriptors
2022-02-10 18:19:43 -08:00
Tõnis Tiigi 196efb911a
Merge pull request #2593 from tonistiigi/user-agent
resolver: set buildkit own user-agent
2022-02-10 17:42:32 -08:00
Brian Goff c332148dd5 push: always skip foreign layers
Foreign layers are only kept as foreign at this point if the user
requested it to be.
Since foreign layers are not meant to be pushed, automatically skip
those layers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-02-11 00:59:53 +00:00
Erik Sipsma a6fc85f163
Merge pull request #2614 from sipsma/fix-opaque-diffapply
diffApply: set dir opaque when overwriting whiteout
2022-02-10 09:14:31 -08:00
Tõnis Tiigi a9c6a48ad0
Merge pull request #2589 from jedevc/heredoc-stabilize
Stabilize heredocs 🎉
2022-02-10 08:50:05 -08:00
CrazyMax e991111127
Merge pull request #2615 from shykes/patch-1
Add dagger.io to the list of buildkit users
2022-02-10 16:28:54 +01:00
Justin Chadwell e1c334b74a Update syntax docs for stabilized heredocs
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-02-10 11:29:21 +00:00
Justin Chadwell e3fd4a6450 Stabilize dockerfile heredoc support
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-02-10 11:29:21 +00:00
Solomon Hykes 88a95e9c84
Add dagger.io to the list of buildkit users
Signed-off-by: Solomon Hykes <solomon@dagger.io>
2022-02-10 01:10:18 -08:00
Erik Sipsma 0a2a4fe066 diffApply: set dir opaque when overwriting whiteout
Before this, there was a bug triggered under the following conditions:
1. An overlay snapshotter was being used, which caused the optimization
   of preparing a new snapshot off of the base layers to be triggered
2. The base layers contained a directory that had contents
3. One subsequent layer deleted that directory w/out recreating it
4. A later layer recreated the directory

In this case, what happened was a whiteout device would be created as
part of 3 above but then in step 4 the whiteout device would be removed
and replaced with a plain directory. The problem is that such a
directory doesn't block out the files from step 2 and it doesn't know
about them because they are in a lowerdir (not the upperdir being
applied to).

The simplest fix, which this commit implements, is to just set the
directory created in step 4 as opaque, which enables the correct
behavior of blocking out files below it.

This was missed in test coverage before because tests for opaque
handling always combined 3+4 into one layer, whereas the bug requires
they be separate layers. A new integration test has been added to cover
this case.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-09 20:15:11 -08:00
Akihiro Suda 9fb13f77c3
Merge pull request #2613 from crazy-max/fix-cni
hack: update cni config
2022-02-10 12:16:17 +09:00
Tõnis Tiigi 43cdda25a7
Merge pull request #2610 from crazy-max/descriptor-metadata
image exporter: return image descriptor in response
2022-02-09 18:21:07 -08:00
CrazyMax 3532f5c0cf
image exporter: return image descriptor in response
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-10 02:39:58 +01:00
Brian Goff 758410d74a Cleanup foreign-layers implementation
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-02-10 01:12:42 +00:00
Brian Goff 3a2a031ed5 Add foreign-layer integration tests
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-02-10 01:12:42 +00:00
Brian Goff 893bfddbc9 Move non-dist layer conversion to GetRemotes
This just makes sure the logic for the layer conversion is all in one
place and settable by a common option.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-02-10 01:12:42 +00:00
Brian Goff 78bb7137ee Do not re-tag non-distributable blob descriptors
Before this change buildkit was changing the media type for
non-distributable layers to normal layers.
It was also clearing out the urls to get those blobs.

Now the layer mediatype and URL's are preserved.
If a layer blob is seen more than once, if it has extra URL's they will
be appended to the stored value.

On export there is now a new exporter option to preserve the
non-distributable data values.
All URL's seen by buildkit will be added to the exported content.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-02-10 01:12:42 +00:00
CrazyMax 8be5521a0c
hack: update cni config
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-09 23:50:10 +01:00
Erik Sipsma 2f996517bc
Merge pull request #2611 from sipsma/source-map-panic
Work around concurrent map write issue in tests.
2022-02-08 17:59:36 -08:00
Erik Sipsma 21d6b1258f Work around concurrent map write issue in tests.
The merge diff tests were using some common LLB state objects across
multiple test cases, which each have their own buildkit client and ran
in parallel. The LLB client library does not appear to currently work
with such use cases where LLB states are shared, with errors about
concurrent map writes to marshal state constraints occasionally being
hit during test runs.

Until that issue is addressed (or it's made explicit that the LLB client
library is not expected to work in such a way), this works around the
problem by not sharing states and instead using common funcs that return
distinct state instances.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-08 17:19:00 -08:00
Tõnis Tiigi a813906e85
Merge pull request #2600 from ktock/fixconversionfailure
Resolver: ensure `WithSession` to pass the session to the resolver
2022-02-08 16:33:53 -08:00
Tõnis Tiigi 81c4d7423f
Merge pull request #2513 from sipsma/lazy-progress
Lazy progress + Progress Groups
2022-02-08 16:24:15 -08:00
Erik Sipsma ae245ff349 solver: use unique vertex progress IDs.
This fixes an issue where if a vertex rapidly had progress updates (such
as the case where CacheMap runs in succession for multiple indexes),
then progress updates were all using the same ID and could incorrectly
override one another, resulting in missing vertex updates.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-08 12:00:21 -08:00
Erik Sipsma 2dfec01fed progress: support vertex start/stop intervals.
Previously, vertexes sent to progress might have multiple intervals in
which they started+stopped, but the output only knew about the most
recent interval. Now, all the intervals are tracked and the total time
spent on each (after accounting for overlaps) is displayed. This is
implemented both for normal vertexes and progress group vertexes.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-08 11:27:51 -08:00
Erik Sipsma 0566b9a345 Add support for progress groups.
This allows clients to specify that LLB states should be grouped in
progress output under a custom name. Status updates for all vertexes in
the group will show up under a single vertex in the output.

The intended use cases are for Dockerfile COPY's that use MergeOp as a
backend and for grouping some other internal vertexes during frontend
builds.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-08 11:27:49 -08:00
Erik Sipsma bb09f3c032 Improve progress output for merge+diff ops.
Now, when a merge or diff ref is unlazied, the progress will show up
under the vertex for the merge/diff ref. Additionally, any ancestors of
the op that also need to be unlazied as part of unlazying the merge/diff
will show status updates under its vertex in the progress.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-08 11:26:05 -08:00
Erik Sipsma 553d3eafda Use parentheses for merge+diff vertex names.
This is easier to read than quotes, which result in lots of escaping in
progress output.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-08 11:26:05 -08:00
Tõnis Tiigi e8f5f523aa
Merge pull request #2602 from tonistiigi/env-matches
shell: add function to detect what env were used
2022-02-08 10:10:42 -08:00
Tõnis Tiigi 17e01bac9a
Merge pull request #2579 from tonistiigi/secret-env
exec: allow mounting secret environment variables
2022-02-08 10:09:55 -08:00
Tõnis Tiigi fb38dd3714
Merge pull request #2601 from ktock/conversion-bufio
cache: write blob to the content store via bufio during conversion
2022-02-07 21:36:53 -08:00
Tõnis Tiigi dc32a321a0
Merge pull request #2606 from aaronlehmann/patterns-cap-fix
Fix missing capabilities in FileOp
2022-02-07 13:01:55 -08:00
Aaron Lehmann b92a6170cf Fix missing capabilities in FileOp
Marshal the constraints after the capabilities are added, not before.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2022-02-07 12:31:25 -08:00
Kohei Tokunaga 2d00773bd5 cache: write blob to the content store via bufio during conversion
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2022-02-07 20:24:07 +09:00
Tonis Tiigi 3bb514f923 shell: add function to detect what env were used
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-06 23:23:06 -08:00
Kohei Tokunaga 6b97f25d6f Resolver: ensure `WithSession` to pass the session to the resolver
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2022-02-07 13:02:07 +09:00
Tonis Tiigi dd992414a3 resolver: set buildkit own user-agent
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-05 19:40:50 -08:00
coryb a640b47cb1
Merge pull request #2590 from coryb/gateway-exec-signal
Allow signals to be sent to gateway exec containers
2022-02-03 08:39:59 -08:00
Tõnis Tiigi 2ea7bed1b2
Merge pull request #2591 from tonistiigi/compression-level-2
exporter: support for compression-level
2022-02-02 20:40:07 -08:00
Cory Bennett 559d079902 Allow signals to be sent to gateway exec containers
Signed-off-by: Cory Bennett <cbennett@netflix.com>
2022-02-02 16:57:10 +00:00
Tonis Tiigi cab33b1e31 exporter: support for compression-level
compression-level option can be set on export to
define the preferred speed vs compression ratio. The
value is a number dependent on the compression algorithm.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-01 15:21:46 -08:00
Tonis Tiigi 30a0b02479 exec: allow mounting secret environment variables
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-31 11:22:57 -08:00