Skip to content

Deploying an app immediately after it is deleted fails #4006

@fjakobs

Description

@fjakobs

Describe the issue

I have a DAB that defines an app. When I deploy the DAB, destroy it and immediately deploy it again then deployment fails because the app still exists in DELETING state.

DAB does not wait for the deleting app to be gone and instead returns a hard to parse error.

This also happens when I change the resource name of the app, which will trigger re-creation of the app.

Configuration

bundle:
  name: nyc-taxi-analyzer

resources:
  apps:
    nyc-taxi-analyzer:
      name: ${bundle.target}-nyc-taxi-analyzer-2
      description: A minimal Databricks App powered by the Databricks Apps SDK
      source_code_path: ./

targets:
  dev:
    mode: development
    default: true
    workspace:
      host: ...

Steps to reproduce the behavior

Please list the steps required to reproduce the issue, for example:

  1. Run databricks bundle deploy
  2. Run databricks bundle destroy
  3. Run databricks bundle deploy
  4. See error

Expected Behavior

Deploy should wait for the resource to be deleted and then create a new one.

Actual Behavior

Error: terraform apply: exit status 1

Error: failed to create app

  with databricks_app.nyc-taxi-analyzer-2,
  on bundle.tf.json line 28, in resource.databricks_app.nyc-taxi-analyzer-2:
  28:       }

Failed to create app dev-nyc-taxi-analyzer-2. An app with the same name
already exists.


Updating deployment state...

OS and CLI version

OSX
Databricks CLI v0.275.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingDABsDABs related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions