cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Deploy lock force acquired error when deploying asset bundle using databricks cli

alpine
New Contributor

I'm running this command on a DevOps pipeline.

databricks bundle deploy -t dev

I receive this error and have tried using --force-lock but it still doesn't work.

Error: deploy lock force acquired by name@company.com at 2024-02-20 16:38:34.99794209 +0000 UTC. Use --force-lock to override
 
This problem started happening after I added a module to the databricks asset bundle. 
2 REPLIES 2

Kaniz
Community Manager
Community Manager

Hi @alpine Let’s troubleshoot this:

  1. Force Lock Override:

    • You mentioned that you’ve tried using --force-lock, but it didn’t work. To override the lock, ensure that you’re using the correct syntax. The command should be:
      databricks bundle deploy -t dev --force-lock
      

    Make sure you include the --force-lock flag after specifying the target environment (-t dev in your case).

  2. Check for Environment Variables:

    • If you’re running this command in an Azure pipeline, ensure that any environment variables related to Databricks (such as DATABRICKS_HOST and DATABRICKS_TOKEN) are correctly configured. The Databricks CLI prioritizes environment variables over the contents of the .databrickscfg file.
    • You can set these environment variables in your pipeline script. For example:
      - script: |
          echo "[DEFAULT]
          host = $(DATABRICKS_HOST)
          token = $(DATABRICKS_TOKEN)" > ~/.databrickscfg
        displayName: 'Configure .databrickscfg'
      

    Adjust the variable names according to your setup.

  3. Python Wheel Project Detection (Optional):

    • If you recently added a module to the Databricks asset bundle, consider checking if the problem is related to Python wheel project detection. Sometimes issues arise due to specific project configurations.
    • You mentioned removing the python_wheel_task in the my_project_job.yml file resolved the issue. Investigate further to understand why this change made a difference.

Li_Li
New Contributor II

Hi, I had the same error. Could I ask if this --force-lock has anything to do with the terraform lock? or it's a separate lock only for bundle? Where can I find documentation about this flag? thank you in advance.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.