Skip to content

Commit

Permalink
Rename imports
Browse files Browse the repository at this point in the history
  • Loading branch information
itaigilo committed Jan 16, 2025
1 parent 6dc4bd1 commit 6f3e08f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cmd/lakefs/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/go-co-op/gocron"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/treeverse/lakefs/modules/block/factory"
blockfactory "github.com/treeverse/lakefs/modules/block/factory"
"github.com/treeverse/lakefs/pkg/actions"
"github.com/treeverse/lakefs/pkg/api"
"github.com/treeverse/lakefs/pkg/auth"
Expand Down Expand Up @@ -201,7 +201,7 @@ var runCmd = &cobra.Command{
stats.WithLogger(logger.WithField("service", "stats_collector")))

// init block store
blockStore, err := factory.BuildBlockAdapter(ctx, bufferedCollector, cfg)
blockStore, err := blockfactory.BuildBlockAdapter(ctx, bufferedCollector, cfg)
if err != nil {
logger.WithError(err).Fatal("Failed to create block adapter")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/catalog/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"github.com/hashicorp/go-multierror"
lru "github.com/hnlq715/golang-lru"
"github.com/rs/xid"
"github.com/treeverse/lakefs/modules/block/factory"
"github.com/treeverse/lakefs/pkg/batch"
"github.com/treeverse/lakefs/pkg/block"
blockfactory "github.com/treeverse/lakefs/pkg/block/factory"
"github.com/treeverse/lakefs/pkg/config"
"github.com/treeverse/lakefs/pkg/graveler"
"github.com/treeverse/lakefs/pkg/graveler/branch"
Expand Down Expand Up @@ -307,7 +307,7 @@ func makeBranchApproximateOwnershipParams(cfg config.ApproximatelyCorrectOwnersh

func New(ctx context.Context, cfg Config) (*Catalog, error) {
ctx, cancelFn := context.WithCancel(ctx)
adapter, err := factory.BuildBlockAdapter(ctx, nil, cfg.Config)
adapter, err := blockfactory.BuildBlockAdapter(ctx, nil, cfg.Config)
if err != nil {
cancelFn()
return nil, fmt.Errorf("build block adapter: %w", err)
Expand Down
8 changes: 4 additions & 4 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
awsconfig "github.com/aws/aws-sdk-go-v2/config"
"github.com/go-test/deep"
"github.com/spf13/viper"
"github.com/treeverse/lakefs/modules/block/factory"
blockfactory "github.com/treeverse/lakefs/modules/block/factory"
"github.com/treeverse/lakefs/pkg/block"
"github.com/treeverse/lakefs/pkg/block/gs"
"github.com/treeverse/lakefs/pkg/block/local"
Expand Down Expand Up @@ -112,7 +112,7 @@ func TestConfig_BuildBlockAdapter(t *testing.T) {
t.Run("local block adapter", func(t *testing.T) {
c, err := newConfigFromFile("testdata/valid_config.yaml")
testutil.Must(t, err)
adapter, err := factory.BuildBlockAdapter(ctx, nil, c)
adapter, err := blockfactory.BuildBlockAdapter(ctx, nil, c)
testutil.Must(t, err)
metricsAdapter, ok := adapter.(*block.MetricsAdapter)
if !ok {
Expand All @@ -127,7 +127,7 @@ func TestConfig_BuildBlockAdapter(t *testing.T) {
c, err := newConfigFromFile("testdata/valid_s3_adapter_config.yaml")
testutil.Must(t, err)

_, err = factory.BuildBlockAdapter(ctx, nil, c)
_, err = blockfactory.BuildBlockAdapter(ctx, nil, c)
var errProfileNotExists awsconfig.SharedConfigProfileNotExistError
if !errors.As(err, &errProfileNotExists) {
t.Fatalf("expected a config.SharedConfigProfileNotExistError, got '%v'", err)
Expand All @@ -137,7 +137,7 @@ func TestConfig_BuildBlockAdapter(t *testing.T) {
t.Run("gs block adapter", func(t *testing.T) {
c, err := newConfigFromFile("testdata/valid_gs_adapter_config.yaml")
testutil.Must(t, err)
adapter, err := factory.BuildBlockAdapter(ctx, nil, c)
adapter, err := blockfactory.BuildBlockAdapter(ctx, nil, c)
testutil.Must(t, err)

metricsAdapter, ok := adapter.(*block.MetricsAdapter)
Expand Down

0 comments on commit 6f3e08f

Please sign in to comment.