Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bundle/deploy/files/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ import (
"github.com/databricks/cli/libs/sync"
)

// GetSync returns a new sync instance for the given bundle.
// The sync instance will be in no validate remote path mode because it's only used to validate files to sync.
// It does not check or create the remote path.
func GetSync(ctx context.Context, b *bundle.Bundle) (*sync.Sync, error) {
opts, err := GetSyncOptions(ctx, b)
if err != nil {
return nil, fmt.Errorf("cannot get sync options: %w", err)
}
opts.NoValidateRemotePath = true
return sync.New(ctx, *opts)
}

Expand Down
2 changes: 2 additions & 0 deletions libs/sync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ type SyncOptions struct {
OutputHandler OutputHandler

DryRun bool

NoValidateRemotePath bool
}

type Sync struct {
Expand Down
Loading