Commit Graph

3786 Commits (master)

Author SHA1 Message Date
CrazyMax b4e37a867f
buildinfo: refactor
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:18 +01:00
Tõnis Tiigi 58bac77c86
Merge pull request #2588 from tonistiigi/amd64-variants-support
amd64 variants support
2022-02-14 11:45:56 -08:00
Akihiro Suda 4286ee1840
Merge pull request #2634 from tonistiigi/binfmt-v6.2.0
Dockerfile: update qemu binfmt to v6.2.0
2022-02-15 04:28:55 +09:00
Tonis Tiigi 28d6aec189 Dockerfile: update qemu binfmt to v6.2.0
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-14 10:38:09 -08:00
Tõnis Tiigi 08bbd66658
Merge pull request #2629 from tonistiigi/etag-weak
http: handle weak etags on comparisons
2022-02-14 09:52:08 -08:00
Tõnis Tiigi 560e97728c
Merge pull request #2632 from crazy-max/bump-go-cni
Bump github.com/containerd/go-cni to v1.1.2
2022-02-14 08:37:03 -08:00
CrazyMax 6ec3990319
Bump github.com/containerd/go-cni to v1.1.2
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 16:18:34 +01:00
CrazyMax 6db8ec03e9
Merge pull request #2622 from moby/dependabot/go_modules/github.com/docker/distribution-2.8.0incompatible
build(deps): bump github.com/docker/distribution from 2.7.1+incompatible to 2.8.0+incompatible
2022-02-14 11:49:10 +01:00
Tonis Tiigi ed0408ac52 authorizer: default token expiration to 60s
When server does not return expiration time for token
default to 60s. This replaces previous solution
in error handling that broke cross-repo push.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-13 21:51:15 -08:00
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
Tonis Tiigi 4d0a3f9ff3 http: handle weak etags on comparisons
When server returns a weak etag, the prefix can
cause a mismatch on direct comparison with old value.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-13 21:21:38 -08:00
dependabot[bot] f231fa0a8b
build(deps): bump github.com/docker/distribution
Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.7.1+incompatible to 2.8.0+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.7.1...v2.8.0)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-12 12:08:21 +00: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
Tonis Tiigi 8441d0a45d dockerfile: use progressgroup for copy link
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-10 22:09:44 -08:00
Tonis Tiigi 6f64543249 dockerfile: add support for COPY/ADD —link
Enables smarter file copy logic using the mergeop
implementation.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-10 22:09:37 -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