Skip to content

Duplicate workflows being created with databricks bundle deploy #986

@NodeJSmith

Description

@NodeJSmith

Describe the issue

Databricks bundle deploy sometimes generates a new workflow instead of updating the existing workflow. This seems to be inconsistent, so unfortunately I can't provide much more detail. I know that this happens if the person/service principal running the deploy command is different, which we account for, but sometimes it happens when the same service principal is running the same command.

This may be user error, but it is hard to determine since I don't know what method the Databricks CLI uses to determine if an existing workflow should be updated vs a new one created. For example, when migrating from DBX to DABs, the first deployment of a DAB would create a new workflow. A different user deploying a bundle creates a new workflow. Is is possible to provide more insight or detail into how this is determined?

Configuration

Please provide a minimal reproducible configuration for the issue

This is done in an azure devops pipeline, the basic configuration is

  1. Install the databricks cli
    • curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
  2. Set DATABRICKS_HOST and DATABRICKS_TOKEN environment variables
  3. Download a Python package from the build pipeline
  4. Create a databricks bundle with an internal script and run deploy
  • create_deployment --environment $ENVIRONMENT && databricks bundle deploy

Steps to reproduce the behavior

The above steps plus

  1. Download the Python package from the build pipeline
  2. Create a databricks bundle with an internal script and run deploy
  • create_deployment --environment $ENVIRONMENT && databricks bundle deploy

Expected Behavior

The existing Databricks workflow that has been previously created/updated with databricks bundle deploy is updated again with the new changes.

Actual Behavior

The existing Databricks workflow remains unchanged and a brand new workflow is created - this is intermittent, most of the time the existing workflow is updated

OS and CLI version

Please provide the version of the CLI (eg: v0.1.2) and the operating system (eg: windows). You can run databricks --version to get the version of your Databricks CLI

CLI version: Databricks CLI v0.209.1
OS: Ubuntu-22.04.3

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