Skip to content
Open
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
2 changes: 2 additions & 0 deletions bundle/appdeploy/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func BuildDeployment(sourcePath string, config *resources.AppConfig, gitSource *
// WaitForDeploymentToComplete waits for active and pending deployments on an app to finish.
func WaitForDeploymentToComplete(ctx context.Context, w *databricks.WorkspaceClient, app *sdkapps.App) error {
if app.ActiveDeployment != nil &&
app.ActiveDeployment.Status != nil &&
app.ActiveDeployment.Status.State == sdkapps.AppDeploymentStateInProgress {
logProgress(ctx, "Waiting for the active deployment to complete...")
_, err := w.Apps.WaitGetDeploymentAppSucceeded(ctx, app.Name, app.ActiveDeployment.DeploymentId, 20*time.Minute, nil)
Expand All @@ -59,6 +60,7 @@ func WaitForDeploymentToComplete(ctx context.Context, w *databricks.WorkspaceCli
}

if app.PendingDeployment != nil &&
app.PendingDeployment.Status != nil &&
app.PendingDeployment.Status.State == sdkapps.AppDeploymentStateInProgress {
logProgress(ctx, "Waiting for the pending deployment to complete...")
_, err := w.Apps.WaitGetDeploymentAppSucceeded(ctx, app.Name, app.PendingDeployment.DeploymentId, 20*time.Minute, nil)
Expand Down
Loading