-
Notifications
You must be signed in to change notification settings - Fork 154
Duplicate workflows being created with databricks bundle deploy #986
Description
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
- Install the databricks cli
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
- Set DATABRICKS_HOST and DATABRICKS_TOKEN environment variables
- Download a Python package from the build pipeline
- 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
- Download the Python package from the build pipeline
- 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