Commit Graph

152 Commits (2abe963e5967232b9b4fee07162b7a55f8bcea46)

Author SHA1 Message Date
Tonis Tiigi e3b05289d8 add session injection to remote loading
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-02 22:20:44 -08:00
Sebastiaan van Stijn fbe1346912
replace github.com/docker/docker/pkg/locker with moby/locker v1.0.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-30 09:25:05 +01:00
Tonis Tiigi 6a3d6e983b source: fix puller error caching on cancellation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-27 13:21:49 -07:00
ktock a9ba84fd5e Limit size of additional label for avoiding preparation failure
In containerd, there is a size limit for label size (4096 chars).
If an image has many layers (> (4096-43)/72 > 55),
`containerd.io/snapshot/remote/stargz.layers` will hit the limit of
label size and the remote snapshot preparation will fail.
This commit fixes this by limiting the size of the label.

Signed-off-by: ktock <ktokunaga.mail@gmail.com>
2020-09-11 11:40:56 +09:00
ktock c975424deb Enable to use remote snapshots for refs
Signed-off-by: ktock <ktokunaga.mail@gmail.com>
2020-08-24 08:44:00 +09:00
Tonis Tiigi f1cd79bf65 resolver: add better pooling and custom authenticator
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-08-13 17:27:11 -07:00
Erik Sipsma 1b30fd146b cache: Remove ImageRef from DescHandlers
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-08-05 17:18:43 -07:00
Erik Sipsma 926ca1804c pull: de-pointer non-optional platform field
Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-08-05 17:18:43 -07:00
Erik Sipsma 55cbd19dec Add support for lazily-pulled blobs in cache manager.
This allows the layers of images to only be pulled if/once they are actually
required.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2020-08-05 17:18:43 -07:00
Paul "TBBle" Hampson 32a080f0f3 Skip source tests on Windows that depend on read-write bind-mounts
These were previously failing due to use of sh.exe on Windows, and with
that fixed, have been revealed to depend on bind-mounts.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson 31195373cf Don't rely on sh being in the PATH on Windows for tests
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Paul "TBBle" Hampson b2d3473cba Skip tests on Windows that attempt to bind-mount read-only
Containerd's mounter doesn't yet support bind-mounts on Windows.
BuildKit short-cuts this for read-write mounts, but not read-only
mounts.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-28 18:07:20 +10:00
Tonis Tiigi c8190b1518 lint: enable golint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:24 -07:00
Tonis Tiigi 05013a663b pull: fix session updating on resolver
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-05 00:15:33 -07:00
Tonis Tiigi 214aa5dbcf pull: allow separate sessions for different parts of pull
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-05 00:15:33 -07:00
Tonis Tiigi 2e9987ad16 session: track sessions with a group construct
Avoid hidden session passing and allow one session to drop when
multiple builds share a vertex.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-05 00:15:25 -07:00
Tonis Tiigi 49de675234 git: support for token authentication
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-16 17:00:06 -07:00
Tonis Tiigi 37b8832d00 upgrade errors checks to Is()
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-18 22:53:38 -07:00
Vlad A. Ionescu cd4a80c086 Add comment about the use of --force
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2020-03-27 18:35:18 -07:00
Vlad A. Ionescu 4ce2075095 Add --force flag in git fetch command
Signed-off-by: Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
2020-03-27 18:06:49 -07:00
Tonis Tiigi 2c3cf11fde resolver: update to new registryhosts based config
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-05 19:56:43 -08:00
Edgar Lee 2edb431a0f Allow previous solve results to be used in new solves
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -08:00
Tonis Tiigi 339d4b2fef leaseutil: mark temporary leases with timestamps
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-16 10:35:50 -07:00
Tonis Tiigi 31a9aeea88 cache: add migration flow to new lease based format
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-16 10:35:49 -07:00
Tonis Tiigi 08194783e0 cache: update unit tests to new cache manager constructor
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-16 10:34:50 -07:00
Tonis Tiigi 6be136db6e cleanup unused code
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-16 10:33:01 -07:00
Tonis Tiigi a9209caa93 clean up temporary leases on startup after crash
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-16 10:32:57 -07:00
Tonis Tiigi 2d0f9d3cc0 add manifest/config to the lease
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-16 10:32:52 -07:00
Tonis Tiigi 688e2c2272 cache: update components to new lease based cache manager
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-16 10:32:04 -07:00
Robert Estelle 6ff0868457 http: Response refers to requested ETag on 304, not 200
Otherwise a 200 response without an ETag could be incorrectly associated
to previous content in the following scenario:

* The remote server had in the past responded with an ETag for this
  resource, which was cached.
  - (Otherwise, onlyETag would be empty)
* That was the only ETag cached for this resource.
  - (Otherwise, onlyETag would be empty)
* The remote server then stopped supporting ETag/If-None-Match for this
  resource at all.
  - (Otherwise, it would respond with a 304 or a 200+ETag)

Signed-off-by: Robert Estelle <robertestelle@gmail.com>
2019-09-04 20:25:53 -04:00
Robert Estelle c63c6f9683 http: Handle missing but unambiguous ETags in response
If a single ETag is requested in `If-None-Match`, some servers do not
include that (unambiguous) ETag header in the response.

For detailed description, see:
https://github.com/moby/buildkit/issues/905#issuecomment-528058142

Signed-off-by: Robert Estelle <robertestelle@gmail.com>
2019-09-04 18:10:56 -04:00
Tonis Tiigi f417bf2150 git: updates for keep git dir
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-14 13:28:42 -07:00
Tibor Vass 914d86758c
Merge pull request #1024 from tonistiigi/gcr-workaround
pull: add cache for gcr bug
2019-06-17 10:36:49 -07:00
Tibor Vass c13518e56b
Merge pull request #1013 from tonistiigi/pull-leases
pull: fix content blobs deletion on pull race
2019-05-30 13:32:15 -07:00
Tonis Tiigi ab23a1ab1b pull: add cache for gcr bug
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-05-28 18:51:55 -07:00
Tonis Tiigi d72c19071a imageutil: use leases on fetching config
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-05-28 14:39:05 -07:00
Tonis Tiigi 8e25187cc7 pull: fix content blobs deletion on pull race
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-05-28 14:39:05 -07:00
Tonis Tiigi 669e65e6fe local: handle canceled uploads
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-05-28 14:06:17 -07:00
Wei Fu ffad8ada79 exporter: support unpack opt for image exporter
It is enhancement which allows to unpack image into containerd
snapshotter storage by `--output type=image,<.>=<.>,unpack=true`.

In order to support this feature, we needs to extend the Snapshotter
witwh `Name() string` function. Because we needs to set gc label for
snapshotter which need snapshotter name.

fix: #908

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-04-24 21:24:06 +08:00
Tonis Tiigi e4cb7b17f1 http: allow uploads from session
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-15 23:20:31 -07:00
Tonis Tiigi 894da35fed fix unit tests for idmapping support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-04-02 20:35:18 -07:00
Tonis Tiigi 9b9ff6e4b5 revert userns mapping functions
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-02 18:26:06 -07:00
Tonis Tiigi 9f53ea3d78 userns support for sources and executor
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-02 18:26:04 -07:00
Akihiro Suda f81510fd80
Merge pull request #835 from tonistiigi/http-updates
http: add better support for misconfigured servers
2019-03-01 11:09:10 +09:00
Tonis Tiigi ab5d49435b http: add better support for misconfigured servers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-28 11:26:50 -08:00
Tonis Tiigi 37567fc826 pull: fix second cachekey for schema1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-25 17:16:43 -08:00
Akihiro Suda 26010a4864 decouple SessionManager from Worker
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-02-23 22:55:17 +09:00
Tonis Tiigi e1c0729349 git: avoid leaking lock files on cancellation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-22 14:04:54 -08:00
Akihiro Suda a62e7cf1e0 worker/base: allow running without `git` installed
genuinetools/img#195

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-11-28 18:43:43 +09:00
John Howard 2de2c04c8e Revendoring to move boltdb to bbolt
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-09-18 11:18:08 -07:00