diff --git a/cmd/sync/watchdog.go b/cmd/sync/watchdog.go index defe5c2c..321bb322 100644 --- a/cmd/sync/watchdog.go +++ b/cmd/sync/watchdog.go @@ -44,7 +44,7 @@ func getRemoteSyncCallback(ctx context.Context, root, remoteDir string, wsc *wor return func(d diff) error { for _, filePath := range d.delete { err := wsc.Workspace.Delete(ctx, - workspace.DeleteRequest{ + workspace.Delete{ Path: path.Join(remoteDir, filePath), Recursive: true, }, diff --git a/ext/databricks-sdk-go b/ext/databricks-sdk-go index 521bddb1..71789bb5 160000 --- a/ext/databricks-sdk-go +++ b/ext/databricks-sdk-go @@ -1 +1 @@ -Subproject commit 521bddb126b490fcf7fac4dcff7774d749871b0f +Subproject commit 71789bb56a381e3c14f8136c69d00a98d8536a70 diff --git a/internal/sync_test.go b/internal/sync_test.go index 7eec9f74..139308c6 100644 --- a/internal/sync_test.go +++ b/internal/sync_test.go @@ -33,7 +33,7 @@ func TestAccSync(t *testing.T) { assert.NoError(t, err) t.Cleanup(func() { - err := wsc.Repos.DeleteByRepoId(ctx, fmt.Sprint(repoInfo.Id)) + err := wsc.Repos.DeleteByRepoId(ctx, repoInfo.Id) assert.NoError(t, err) }) diff --git a/project/project.go b/project/project.go index 4cd7304b..d2502774 100644 --- a/project/project.go +++ b/project/project.go @@ -217,17 +217,17 @@ func (p *project) GetDevelopmentClusterId(ctx context.Context) (clusterId string } } -func runCommandOnDev(ctx context.Context, language, command string) commands.CommandResults { +func runCommandOnDev(ctx context.Context, language, command string) commands.Results { clusterId, err := Get(ctx).GetDevelopmentClusterId(ctx) if err != nil { - return commands.CommandResults{ + return commands.Results{ ResultType: "error", Summary: err.Error(), } } - return Get(ctx).wsc.Commands.Execute(ctx, clusterId, language, command) + return Get(ctx).wsc.CommandExecutor.Execute(ctx, clusterId, language, command) } -func RunPythonOnDev(ctx context.Context, command string) commands.CommandResults { +func RunPythonOnDev(ctx context.Context, command string) commands.Results { return runCommandOnDev(ctx, "python", command) } diff --git a/utilities/dbfs.go b/utilities/dbfs.go index 78d12d89..985fac5a 100644 --- a/utilities/dbfs.go +++ b/utilities/dbfs.go @@ -22,7 +22,7 @@ func CreateDbfsFile(ctx context.Context, // see https://docs.databricks.com/dev-tools/api/latest/dbfs.html#add-block const WRITE_BYTE_CHUNK_SIZE = 1e6 createResponse, err := wsc.Dbfs.Create(ctx, - dbfs.CreateRequest{ + dbfs.Create{ Overwrite: overwrite, Path: path, }, @@ -39,7 +39,7 @@ func CreateDbfsFile(ctx context.Context, } b64Data := base64.StdEncoding.EncodeToString(byteChunk) err := wsc.Dbfs.AddBlock(ctx, - dbfs.AddBlockRequest{ + dbfs.AddBlock{ Data: b64Data, Handle: handle, }, @@ -49,7 +49,7 @@ func CreateDbfsFile(ctx context.Context, } } err = wsc.Dbfs.Close(ctx, - dbfs.CloseRequest{ + dbfs.Close{ Handle: handle, }, )