Skip to content
Merged
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
3 changes: 1 addition & 2 deletions bundle/direct/bundle_apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"

"github.com/databricks/cli/bundle/config"
"github.com/databricks/cli/bundle/deployplan"
"github.com/databricks/cli/libs/logdiag"
"github.com/databricks/cli/libs/structs/structaccess"
Expand All @@ -16,7 +15,7 @@ import (

type MigrateMode bool

func (b *DeploymentBundle) Apply(ctx context.Context, client *databricks.WorkspaceClient, configRoot *config.Root, plan *deployplan.Plan, migrateMode MigrateMode) {
func (b *DeploymentBundle) Apply(ctx context.Context, client *databricks.WorkspaceClient, plan *deployplan.Plan, migrateMode MigrateMode) {
if plan == nil {
panic("Planning is not done")
}
Expand Down
2 changes: 1 addition & 1 deletion bundle/phases/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func deployCore(ctx context.Context, b *bundle.Bundle, plan *deployplan.Plan, ta
cmdio.LogString(ctx, "Deploying resources...")

if targetEngine.IsDirect() {
b.DeploymentBundle.Apply(ctx, b.WorkspaceClient(), &b.Config, plan, direct.MigrateMode(false))
b.DeploymentBundle.Apply(ctx, b.WorkspaceClient(), plan, direct.MigrateMode(false))
} else {
bundle.ApplyContext(ctx, b, terraform.Apply())
}
Expand Down
2 changes: 1 addition & 1 deletion bundle/phases/destroy.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func approvalForDestroy(ctx context.Context, b *bundle.Bundle, plan *deployplan.

func destroyCore(ctx context.Context, b *bundle.Bundle, plan *deployplan.Plan, engine engine.EngineType) {
if engine.IsDirect() {
b.DeploymentBundle.Apply(ctx, b.WorkspaceClient(), &b.Config, plan, direct.MigrateMode(false))
b.DeploymentBundle.Apply(ctx, b.WorkspaceClient(), plan, direct.MigrateMode(false))
} else {
// Core destructive mutators for destroy. These require informed user consent.
bundle.ApplyContext(ctx, b, terraform.Apply())
Expand Down
2 changes: 1 addition & 1 deletion bundle/statemgmt/upload_state_for_yaml_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (m *uploadStateForYamlSync) convertState(ctx context.Context, b *bundle.Bun
}
}

deploymentBundle.Apply(ctx, b.WorkspaceClient(), &uninterpolatedConfig, plan, direct.MigrateMode(true))
deploymentBundle.Apply(ctx, b.WorkspaceClient(), plan, direct.MigrateMode(true))

return diags
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/bundle/deployment/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ To start using direct engine, deploy with DATABRICKS_BUNDLE_ENGINE=direct env va
}
}

deploymentBundle.Apply(ctx, b.WorkspaceClient(), &b.Config, plan, direct.MigrateMode(true))
deploymentBundle.Apply(ctx, b.WorkspaceClient(), plan, direct.MigrateMode(true))
if logdiag.HasError(ctx) {
logdiag.LogError(ctx, errors.New("migration failed; ensure you have done full deploy before the migration"))
return root.ErrAlreadyPrinted
Expand Down