<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DAB bundle deploy --force-lock creates duplicate jobs after Azure DevOps pipeline failure in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/dab-bundle-deploy-force-lock-creates-duplicate-jobs-after-azure/m-p/160521#M54895</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Is this expected behavior when using --force-lock after a partially successful deployment? -&amp;nbsp;&lt;SPAN&gt;This is expected when the state becomes disconnected from actual workspace resources. DAB uses IDs generally to correlate bundle resources with workspace instances. If the state file does not contain the IDs of partially deployed resources, DAB treats it as new.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Is there a recommended recovery process after a deployment fails midway? - You can&amp;nbsp;use the &lt;STRONG&gt;bundle deployment bind&lt;/STRONG&gt; command to manually link existing resources back to your bundle.&amp;nbsp;It updates the state file to recognize the existing resource preventing duplicates in the next deployment&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Is there a way to resume deployment without creating duplicate resources? -&amp;nbsp;You can try to manually reconnect the partially deployed resources to the bundle state.&amp;nbsp;&lt;STRONG&gt;Identify which jobs were created,&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;for every job that exists -&amp;nbsp;bind it to&lt;/STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt; your bundle &amp;amp; deploy normally.&lt;/STRONG&gt;&amp;nbsp;You can also manually delete the partially deployed resources from the UI and deploy again.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="python"&gt;databricks jobs list --output JSON | grep "jobname"

databricks bundle deployment bind resourcekey jobid -t prod

databricks bundle deploy -t prod&lt;/LI-CODE&gt;&lt;P&gt;4.&amp;nbsp;&lt;SPAN&gt;Does this indicate that the deployment state (Terraform/DAB state) is being recreated or lost? -&amp;nbsp;The state is being &lt;STRONG&gt;lost&lt;/STRONG&gt; or corrupted during the failed deployment.&amp;nbsp;Next deployment runs with the&amp;nbsp;&lt;STRONG&gt;old state&lt;/STRONG&gt;&amp;nbsp;that doesn't include the partially deployed resources. DAB sees it as missing from state and creates it again&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;5. Is there any recommended approach for Azure DevOps pipelines to prevent this scenario? - You can follow below. &lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Use explicit&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class=""&gt;root_path&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;in production&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;State file backup -&lt;/STRONG&gt;&amp;nbsp;You can consider backing up the state file from the workspace if possible&amp;nbsp;before deploying.&lt;/LI&gt;&lt;LI&gt;You can use&amp;nbsp;&lt;SPAN class=""&gt;bundle &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;validate&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;before deployment to catch configuration issues&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Consider&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class=""&gt;fail-on-active-runs&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;to prevent concurrent deployment issues&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Thu, 25 Jun 2026 12:54:47 GMT</pubDate>
    <dc:creator>balajij8</dc:creator>
    <dc:date>2026-06-25T12:54:47Z</dc:date>
    <item>
      <title>DAB bundle deploy --force-lock creates duplicate jobs after Azure DevOps pipeline failure</title>
      <link>https://community.databricks.com/t5/data-engineering/dab-bundle-deploy-force-lock-creates-duplicate-jobs-after-azure/m-p/160502#M54892</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Hi everyone,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;We're experiencing an issue with Declarative Automation Bundles (DAB) while deploying to our Azure Databricks Production workspace through an Azure DevOps pipeline.&lt;/FONT&gt;&lt;/P&gt;&lt;H3&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Environment&lt;/FONT&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Azure Databricks&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Declarative Automation Bundles (DAB)&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Azure DevOps Pipeline&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Authentication using a Service Principal&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Deployment target: prod&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Deployment lock enabled&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Issue&lt;/FONT&gt;&lt;/H3&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;During deployment, the Azure DevOps pipeline fails midway after successfully deploying some resources. As a result:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;A subset of jobs gets created successfully in the Databricks workspace.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;The deployment remains in a locked state.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;To recover, we rerun the deployment using:&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;databricks bundle deploy -t prod --force-lock&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;However, instead of updating the existing jobs that were already deployed, Databricks creates new duplicate jobs with different Job IDs.&lt;/FONT&gt;&lt;/P&gt;&lt;H3&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Expected Behavior&lt;/FONT&gt;&lt;/H3&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I would expect the subsequent deployment to:&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Reuse the existing deployment state.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Update the already deployed jobs.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Continue deploying the remaining resources.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Avoid creating duplicate jobs.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Current Behavior&lt;/FONT&gt;&lt;/H3&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Each retry with --force-lock creates duplicate jobs rather than updating the existing ones.&lt;/FONT&gt;&lt;/P&gt;&lt;H3&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Questions&lt;/FONT&gt;&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Is this expected behavior when using --force-lock after a partially successful deployment?&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Is there a recommended recovery process after a deployment fails midway?&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Is there a way to resume deployment without creating duplicate resources?&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Does this indicate that the deployment state (Terraform/DAB state) is being recreated or lost?&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Is there any recommended approach for Azure DevOps pipelines to prevent this scenario?&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Any guidance or best practices would be greatly appreciated.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Thank you!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2026 09:44:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dab-bundle-deploy-force-lock-creates-duplicate-jobs-after-azure/m-p/160502#M54892</guid>
      <dc:creator>bhawuk_arora</dc:creator>
      <dc:date>2026-06-25T09:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: DAB bundle deploy --force-lock creates duplicate jobs after Azure DevOps pipeline failure</title>
      <link>https://community.databricks.com/t5/data-engineering/dab-bundle-deploy-force-lock-creates-duplicate-jobs-after-azure/m-p/160521#M54895</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Is this expected behavior when using --force-lock after a partially successful deployment? -&amp;nbsp;&lt;SPAN&gt;This is expected when the state becomes disconnected from actual workspace resources. DAB uses IDs generally to correlate bundle resources with workspace instances. If the state file does not contain the IDs of partially deployed resources, DAB treats it as new.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Is there a recommended recovery process after a deployment fails midway? - You can&amp;nbsp;use the &lt;STRONG&gt;bundle deployment bind&lt;/STRONG&gt; command to manually link existing resources back to your bundle.&amp;nbsp;It updates the state file to recognize the existing resource preventing duplicates in the next deployment&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Is there a way to resume deployment without creating duplicate resources? -&amp;nbsp;You can try to manually reconnect the partially deployed resources to the bundle state.&amp;nbsp;&lt;STRONG&gt;Identify which jobs were created,&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;for every job that exists -&amp;nbsp;bind it to&lt;/STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt; your bundle &amp;amp; deploy normally.&lt;/STRONG&gt;&amp;nbsp;You can also manually delete the partially deployed resources from the UI and deploy again.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="python"&gt;databricks jobs list --output JSON | grep "jobname"

databricks bundle deployment bind resourcekey jobid -t prod

databricks bundle deploy -t prod&lt;/LI-CODE&gt;&lt;P&gt;4.&amp;nbsp;&lt;SPAN&gt;Does this indicate that the deployment state (Terraform/DAB state) is being recreated or lost? -&amp;nbsp;The state is being &lt;STRONG&gt;lost&lt;/STRONG&gt; or corrupted during the failed deployment.&amp;nbsp;Next deployment runs with the&amp;nbsp;&lt;STRONG&gt;old state&lt;/STRONG&gt;&amp;nbsp;that doesn't include the partially deployed resources. DAB sees it as missing from state and creates it again&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;5. Is there any recommended approach for Azure DevOps pipelines to prevent this scenario? - You can follow below. &lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Use explicit&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class=""&gt;root_path&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;in production&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;State file backup -&lt;/STRONG&gt;&amp;nbsp;You can consider backing up the state file from the workspace if possible&amp;nbsp;before deploying.&lt;/LI&gt;&lt;LI&gt;You can use&amp;nbsp;&lt;SPAN class=""&gt;bundle &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;validate&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;before deployment to catch configuration issues&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Consider&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class=""&gt;fail-on-active-runs&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;to prevent concurrent deployment issues&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 25 Jun 2026 12:54:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dab-bundle-deploy-force-lock-creates-duplicate-jobs-after-azure/m-p/160521#M54895</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-06-25T12:54:47Z</dc:date>
    </item>
  </channel>
</rss>

