Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -133,6 +133,8 @@ linters-settings: |
| 133 | 133 |
alias: c8dimages |
| 134 | 134 |
- pkg: github.com/opencontainers/image-spec/specs-go/v1 |
| 135 | 135 |
alias: ocispec |
| 136 |
+ - pkg: go.etcd.io/bbolt |
|
| 137 |
+ alias: bolt |
|
| 136 | 138 |
# Enforce that gotest.tools/v3/assert/cmp is always aliased as "is" |
| 137 | 139 |
- pkg: gotest.tools/v3/assert/cmp |
| 138 | 140 |
alias: is |
| ... | ... |
@@ -57,7 +57,6 @@ import ( |
| 57 | 57 |
"github.com/moby/buildkit/worker/containerd" |
| 58 | 58 |
"github.com/moby/buildkit/worker/label" |
| 59 | 59 |
"github.com/pkg/errors" |
| 60 |
- "go.etcd.io/bbolt" |
|
| 61 | 60 |
bolt "go.etcd.io/bbolt" |
| 62 | 61 |
"go.opentelemetry.io/otel/sdk/trace" |
| 63 | 62 |
"tags.cncf.io/container-device-interface/pkg/cdi" |
| ... | ... |
@@ -208,7 +207,7 @@ func newSnapshotterController(ctx context.Context, rt http.RoundTripper, opt Opt |
| 208 | 208 |
} |
| 209 | 209 |
|
| 210 | 210 |
func openHistoryDB(root string, fn string, cfg *config.BuilderHistoryConfig) (*bolt.DB, *bkconfig.HistoryConfig, error) {
|
| 211 |
- db, err := bbolt.Open(filepath.Join(root, fn), 0o600, nil) |
|
| 211 |
+ db, err := bolt.Open(filepath.Join(root, fn), 0o600, nil) |
|
| 212 | 212 |
if err != nil {
|
| 213 | 213 |
return nil, nil, err |
| 214 | 214 |
} |
| ... | ... |
@@ -17,7 +17,7 @@ import ( |
| 17 | 17 |
"github.com/opencontainers/go-digest" |
| 18 | 18 |
ocispec "github.com/opencontainers/image-spec/specs-go/v1" |
| 19 | 19 |
|
| 20 |
- "go.etcd.io/bbolt" |
|
| 20 |
+ bolt "go.etcd.io/bbolt" |
|
| 21 | 21 |
|
| 22 | 22 |
"gotest.tools/v3/assert" |
| 23 | 23 |
is "gotest.tools/v3/assert/cmp" |
| ... | ... |
@@ -282,7 +282,7 @@ func newTestDB(ctx context.Context, t testing.TB) *metadata.DB {
|
| 282 | 282 |
t.Helper() |
| 283 | 283 |
|
| 284 | 284 |
p := filepath.Join(t.TempDir(), "metadata") |
| 285 |
- bdb, err := bbolt.Open(p, 0o600, &bbolt.Options{})
|
|
| 285 |
+ bdb, err := bolt.Open(p, 0o600, &bolt.Options{})
|
|
| 286 | 286 |
if err != nil {
|
| 287 | 287 |
t.Fatal(err) |
| 288 | 288 |
} |
| ... | ... |
@@ -13,14 +13,14 @@ import ( |
| 13 | 13 |
"github.com/opencontainers/go-digest" |
| 14 | 14 |
ocispec "github.com/opencontainers/image-spec/specs-go/v1" |
| 15 | 15 |
"github.com/pkg/errors" |
| 16 |
- "go.etcd.io/bbolt" |
|
| 16 |
+ bolt "go.etcd.io/bbolt" |
|
| 17 | 17 |
) |
| 18 | 18 |
|
| 19 | 19 |
func (daemon *Daemon) configureLocalContentStore(ns string) (*namespacedContent, *namespacedLeases, error) {
|
| 20 | 20 |
if err := os.MkdirAll(filepath.Join(daemon.root, "content"), 0o700); err != nil {
|
| 21 | 21 |
return nil, nil, errors.Wrap(err, "error creating dir for content store") |
| 22 | 22 |
} |
| 23 |
- db, err := bbolt.Open(filepath.Join(daemon.root, "content", "metadata.db"), 0o600, nil) |
|
| 23 |
+ db, err := bolt.Open(filepath.Join(daemon.root, "content", "metadata.db"), 0o600, nil) |
|
| 24 | 24 |
if err != nil {
|
| 25 | 25 |
return nil, nil, errors.Wrap(err, "error opening bolt db for content metadata store") |
| 26 | 26 |
} |
| ... | ... |
@@ -78,7 +78,7 @@ import ( |
| 78 | 78 |
"github.com/moby/sys/user" |
| 79 | 79 |
"github.com/moby/sys/userns" |
| 80 | 80 |
"github.com/pkg/errors" |
| 81 |
- "go.etcd.io/bbolt" |
|
| 81 |
+ bolt "go.etcd.io/bbolt" |
|
| 82 | 82 |
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" |
| 83 | 83 |
"go.opentelemetry.io/otel" |
| 84 | 84 |
"golang.org/x/sync/semaphore" |
| ... | ... |
@@ -146,7 +146,7 @@ type Daemon struct {
|
| 146 | 146 |
// This is used for Windows which doesn't currently support running on containerd |
| 147 | 147 |
// It stores metadata for the content store (used for manifest caching) |
| 148 | 148 |
// This needs to be closed on daemon exit |
| 149 |
- mdDB *bbolt.DB |
|
| 149 |
+ mdDB *bolt.DB |
|
| 150 | 150 |
|
| 151 | 151 |
usesSnapshotter bool |
| 152 | 152 |
} |
| ... | ... |
@@ -15,7 +15,7 @@ import ( |
| 15 | 15 |
"github.com/docker/docker/image" |
| 16 | 16 |
"github.com/opencontainers/go-digest" |
| 17 | 17 |
ocispec "github.com/opencontainers/image-spec/specs-go/v1" |
| 18 |
- "go.etcd.io/bbolt" |
|
| 18 |
+ bolt "go.etcd.io/bbolt" |
|
| 19 | 19 |
"gotest.tools/v3/assert" |
| 20 | 20 |
is "gotest.tools/v3/assert/cmp" |
| 21 | 21 |
) |
| ... | ... |
@@ -26,10 +26,10 @@ func setupTestStores(t *testing.T) (context.Context, content.Store, *imageStoreW |
| 26 | 26 |
|
| 27 | 27 |
backend, err := image.NewFSStoreBackend(filepath.Join(dir, "images")) |
| 28 | 28 |
assert.NilError(t, err) |
| 29 |
- is, err := image.NewImageStore(backend, nil) |
|
| 29 |
+ imgStore, err := image.NewImageStore(backend, nil) |
|
| 30 | 30 |
assert.NilError(t, err) |
| 31 | 31 |
|
| 32 |
- db, err := bbolt.Open(filepath.Join(dir, "metadata.db"), 0o600, nil) |
|
| 32 |
+ db, err := bolt.Open(filepath.Join(dir, "metadata.db"), 0o600, nil) |
|
| 33 | 33 |
assert.NilError(t, err) |
| 34 | 34 |
|
| 35 | 35 |
cs, err := local.NewStore(filepath.Join(dir, "content")) |
| ... | ... |
@@ -41,7 +41,7 @@ func setupTestStores(t *testing.T) (context.Context, content.Store, *imageStoreW |
| 41 | 41 |
assert.Check(t, os.RemoveAll(dir)) |
| 42 | 42 |
} |
| 43 | 43 |
ctx := namespaces.WithNamespace(context.Background(), t.Name()) |
| 44 |
- images := &imageStoreWithLease{Store: is, ns: t.Name(), leases: metadata.NewLeaseManager(mdb)}
|
|
| 44 |
+ images := &imageStoreWithLease{Store: imgStore, ns: t.Name(), leases: metadata.NewLeaseManager(mdb)}
|
|
| 45 | 45 |
|
| 46 | 46 |
return ctx, cs, images, cleanup |
| 47 | 47 |
} |