Commit Graph

535 Commits (dependabot/go_modules/github.com/containerd/containerd-1.6.1)

Author SHA1 Message Date
Tõnis Tiigi d1a8f137c1
Merge pull request #2662 from ktock/overlayfs-differ-cancel
overlay differ: cancel diff calculation cleanly
2022-03-02 21:53:42 -08:00
Tõnis Tiigi 2dfbe317c9
Merge pull request #2689 from tonistiigi/active-status
progressui: handle active statuses for completed vertex
2022-03-01 18:36:03 -08:00
Tonis Tiigi d75a79eacc progressui: handle case where active statuses appear completed vertex
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-28 23:40:45 -08:00
Tonis Tiigi 379ac1b1f7 progressui: fix possible out of order indexing on plain mode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-28 23:37:51 -08:00
Erik Sipsma cc1499e6d9 Add support for weak ProgressGroup membership.
A ProgressGroup will now only be displayed if a vertex member marked as
non-weak has started.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-25 10:24:15 -08:00
Erik Sipsma 77e383d156 progress: fix check for whether terminal is in use
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-25 10:22:56 -08:00
Kohei Tokunaga 35f658525b test: Ensure testPullZstdImage pulls zstd image
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2022-02-25 17:11:58 +09:00
Erik Sipsma a96f9a9f1f progress: use unique id for vertex start/stop
This commit fixes more issues where vertex progress updates were using
the same ID and incorrectly deduplicating with each other. A previous
commit addressed this in solver/jobs.go but the same problem existed
elsewhere.

The update results in a random ID being used for vertex start/stop
events as it is the simplest approach that works everywhere in a
consistent pattern.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-24 12:30:41 -08:00
Tõnis Tiigi b0e56cd563
Merge pull request #2654 from crazy-max/buildinfo-contexts
buildinfo: named input contexts support
2022-02-23 12:13:14 -08:00
Tõnis Tiigi 9bc409d26b
Merge pull request #2661 from ktock/bklog
Do not drop logger set by containerd
2022-02-23 08:05:22 -08:00
CrazyMax 2661917e8d
buildinfo: handle deps
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-23 10:40:33 +01:00
Tõnis Tiigi 02217d0b71
Merge pull request #2660 from ktock/rootless-containerd-worker
Support rootless containerd worker
2022-02-22 12:18:13 -08:00
Tõnis Tiigi 0154dfcfaf
Merge pull request #2648 from ktock/cache-stargz-snapshotter
Enable estargz-based lazy pulling on registry cache importer
2022-02-22 09:24:17 -08:00
Kohei Tokunaga 2e58406dbe Do not drop logger set by containerd
Currently, bklog overwrites `(github.com/containerd/containerd/log).G` and
doesn't preserve the logger set by
`(github.com/containerd/containerd/log).WithLogger`.

This causes log fields set by
`(github.com/containerd/containerd/log).WithLogger` are dropped.

This commit fixes this issue by allowing `bklog.GetLogger` to get logger set by
`(github.com/containerd/containerd/log).WithLogger`.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2022-02-22 13:32:51 +09:00
Kohei Tokunaga 63c939adbd overlay differ: cancel diff calculation cleanly
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2022-02-22 10:56:42 +09:00
Kohei Tokunaga 21aeba6fd6 Support rootless containerd worker
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2022-02-21 15:39:14 +09:00
CrazyMax 292c0bf6f4
buildinfo: filter attrs while merging metadata in bridge result
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-19 22:48:20 +01:00
CrazyMax 3ed526759f
buildinfo: named input contexts support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-19 22:48:20 +01:00
Kohei Tokunaga bed5a44d52 Enalbe estargz-based lazy pulling on registry cache importer
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2022-02-17 10:44:14 +09:00
CrazyMax bb746566db
buildinfo: change buildinfo attr export key to bool
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-16 21:22:54 +01:00
Erik Sipsma 6ac4a81486 progress: fix sync issue in controller.
A panic was encountered where writes to progress status hit a nil
writer. While not easy to reproduce, this commit fixes a likely culprit.
The use of atomics in the controller was not safe against a race such as
the following:
1. One goroutine calls Start, incrementing count but not yet setting
   writer.
2. A second goroutine calls Start, increments count again but sees that
   count >1 and thus doesn't try to set writer.
3. The second goroutine then calls Status, assuming the writer has been
   set, but the first goroutine still hasn't set the writer yet, causing
   a nil pointer exception.

This commit fixes that issue by just using a mutex instead of atomics.
It also adds a nil check for the writer just to be safe against panics
due to unknown issues in the future as missing a status update is much
better than buildkitd crashing.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-15 09:57:44 -08:00
Tõnis Tiigi 0b9cd24a74
Merge pull request #2630 from tonistiigi/cross-repo-fix
Fix cross-repo push fallback when access to the source repo is not granted
2022-02-14 14:23:38 -08:00
CrazyMax 9cd97fb726
buildinfo: check nil attrs
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 22:55:37 +01:00
CrazyMax b42e54726c
docs: update metadata output example with buildinfo
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:21 +01:00
CrazyMax cdaafb9303
buildinfo: use metadata to set frontend build sources
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:20 +01:00
CrazyMax b2e5d1938d
buildinfo: set frontend attrs to bridge result
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:20 +01:00
CrazyMax 7d0f8e4408
buildinfo: filter out control args
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:19 +01:00
CrazyMax 83a483a9fe
buildinfo: opt-in inline build attributes
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:19 +01:00
CrazyMax c29411b41a
buildinfo: add build attributes and frontend
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:19 +01:00
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
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
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
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 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
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
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
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
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 9598fa243b archutil: amd64 variants support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-31 11:28:02 -08:00
Tonis Tiigi e38f34c7d4 archutil: refactor to return structs
Working with strings is error-prone because a platform
can be in multiple string forms and less flexible.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-31 11:28:02 -08:00
CrazyMax 07dea88ee0
otel: update semconv
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-01-28 10:19:00 +01:00
Tonis Tiigi ffce8218e3 keep buffer of logs to show on failure when regular logs are clipped
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-24 21:30:46 -08:00
Tõnis Tiigi c18af390ef
Merge pull request #2572 from tonistiigi/tracing-env-update
tracing: move to newer env names
2022-01-20 12:58:05 -08:00