mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-24 18:59:02 -06:00
fix env bootstrapping for clone
This commit is contained in:
@@ -19,6 +19,8 @@ import (
|
||||
"encoding/json"
|
||||
"strings"
|
||||
|
||||
"github.com/dolthub/dolt/go/store/types"
|
||||
|
||||
"github.com/dolthub/dolt/go/cmd/dolt/cli"
|
||||
"github.com/dolthub/dolt/go/cmd/dolt/errhand"
|
||||
eventsapi "github.com/dolthub/dolt/go/gen/proto/dolt/services/eventsapi/v1alpha1"
|
||||
@@ -309,7 +311,7 @@ func restoreBackup(ctx context.Context, dEnv *env.DoltEnv, apr *argparser.ArgPar
|
||||
}
|
||||
|
||||
r := env.NewRemote("", remoteUrl, params)
|
||||
srcDb, err := r.GetRemoteDB(ctx, dEnv.DoltDB.Format(), dEnv)
|
||||
srcDb, err := r.GetRemoteDB(ctx, types.Format_Default, dEnv)
|
||||
if err != nil {
|
||||
return errhand.VerboseErrorFromError(err)
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/dolthub/dolt/go/store/types"
|
||||
|
||||
"github.com/dolthub/dolt/go/cmd/dolt/cli"
|
||||
"github.com/dolthub/dolt/go/cmd/dolt/errhand"
|
||||
eventsapi "github.com/dolthub/dolt/go/gen/proto/dolt/services/eventsapi/v1alpha1"
|
||||
@@ -200,7 +202,7 @@ func createRemote(ctx context.Context, remoteName, remoteUrl string, params map[
|
||||
cli.Printf("cloning %s\n", remoteUrl)
|
||||
|
||||
r := env.NewRemote(remoteName, remoteUrl, params)
|
||||
ddb, err := r.GetRemoteDB(ctx, dEnv.DoltDB.Format(), dEnv)
|
||||
ddb, err := r.GetRemoteDB(ctx, types.Format_Default, dEnv)
|
||||
if err != nil {
|
||||
bdr := errhand.BuildDError("error: failed to get remote db").AddCause(err)
|
||||
return env.NoRemote, nil, bdr.Build()
|
||||
|
||||
@@ -27,6 +27,7 @@ import (
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/table/editor"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/filesys"
|
||||
"github.com/dolthub/dolt/go/store/types"
|
||||
)
|
||||
|
||||
// CollectDBs takes a MultiRepoEnv and creates Database objects from each environment and returns a slice of these
|
||||
@@ -162,7 +163,7 @@ func getPushOnWriteHook(ctx context.Context, dEnv *env.DoltEnv) (*doltdb.PushOnW
|
||||
return nil, fmt.Errorf("%w: '%s'", env.ErrRemoteNotFound, remoteName)
|
||||
}
|
||||
|
||||
ddb, err := rem.GetRemoteDB(ctx, dEnv.DoltDB.Format(), dEnv)
|
||||
ddb, err := rem.GetRemoteDB(ctx, types.Format_Default, dEnv)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import (
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/env/actions"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/ref"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
|
||||
"github.com/dolthub/dolt/go/store/types"
|
||||
)
|
||||
|
||||
type ReadReplicaDatabase struct {
|
||||
@@ -66,7 +67,7 @@ func NewReadReplicaDatabase(ctx context.Context, db Database, remoteName string,
|
||||
return EmptyReadReplica, fmt.Errorf("%w: '%s'", env.ErrRemoteNotFound, remoteName)
|
||||
}
|
||||
|
||||
srcDB, err := remote.GetRemoteDB(ctx, dEnv.DoltDB.Format(), dEnv)
|
||||
srcDB, err := remote.GetRemoteDB(ctx, types.Format_Default, dEnv)
|
||||
if err != nil {
|
||||
return EmptyReadReplica, err
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import (
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/env"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/table/editor"
|
||||
"github.com/dolthub/dolt/go/store/types"
|
||||
)
|
||||
|
||||
func getPushOnWriteHook(ctx context.Context, bThreads *sql.BackgroundThreads, dEnv *env.DoltEnv, logger io.Writer) (doltdb.CommitHook, error) {
|
||||
@@ -51,7 +52,7 @@ func getPushOnWriteHook(ctx context.Context, bThreads *sql.BackgroundThreads, dE
|
||||
return nil, fmt.Errorf("%w: '%s'", env.ErrRemoteNotFound, remoteName)
|
||||
}
|
||||
|
||||
ddb, err := rem.GetRemoteDB(ctx, dEnv.DoltDB.Format(), dEnv)
|
||||
ddb, err := rem.GetRemoteDB(ctx, types.Format_Default, dEnv)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ package sysbench_runner
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/dolthub/dolt/go/store/types"
|
||||
"os"
|
||||
"os/exec"
|
||||
"os/signal"
|
||||
@@ -26,6 +25,8 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/dolthub/dolt/go/store/types"
|
||||
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user