<?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: Bundle Validation Error: Volume lifecycle Field Rejected Despite Being in Schema in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/163339#M55128</link>
    <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/241804"&gt;@animeshjain&lt;/a&gt;&amp;nbsp;What's happening is that two different components are checking your config, and they are at different versions.&lt;/P&gt;&lt;P&gt;databricks bundle schema is generated from the CLI binary itself, and your CLI is latest enough enough to know about lifecycle. That's why the schema shows the field. But the error is not coming from the CLI.&lt;/P&gt;&lt;P&gt;Look at the traceback path: site-packages/databricks/bundles/build.py and core/_transform.py. That is the databricks-bundles Python package, which runs because your bundle has Python support enabled. With Python support on, every resource in the bundle, including ones defined in plain YAML like your volume, gets loaded into typed Python dataclasses so that Python code can see and mutate them. Those dataclasses are strict, and the transform step raises on any field the class does not declare. Your installed version of that package has a Volume class with no lifecycle field, so it rejects the config that your CLI already accepted.&lt;/P&gt;&lt;P&gt;Have you tried updating the Python package? You can check what you're on with&lt;/P&gt;&lt;P&gt;pip show databricks-bundles&lt;/P&gt;&lt;P&gt;If it reports anything below 0.268.0, that's your answer. Upgrade it:&lt;BR /&gt;&lt;BR /&gt;pip install --upgrade databricks-bundles&lt;/P&gt;&lt;P&gt;or, more likely in your case, bump the pin in whatever requirements or pyproject file builds your bundle's Python environment. The&lt;BR /&gt;pythonEnv-.../site-packages path in your traceback shows the environment is built fresh from declared dependencies, so the old version is coming from a pin somewhere rather than from a stale machine. The package is on a 1.x version line now, so anything current is well past the fix. Nothing in your resource definition needs to change; after the upgrade, rerun validate and the volume should load cleanly, and prevent_destroy works as expected with the direct engine.&lt;/P&gt;</description>
    <pubDate>Sat, 18 Jul 2026 20:40:05 GMT</pubDate>
    <dc:creator>binlogreader</dc:creator>
    <dc:date>2026-07-18T20:40:05Z</dc:date>
    <item>
      <title>Bundle Validation Error: Volume lifecycle Field Rejected Despite Being in Schema</title>
      <link>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/161887#M55034</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Bundle engine:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;direct&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Resource type: Volume (Unity Catalog)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;lifecycle&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;prevent_destroy: true&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;on a Unity Catalog volume resource in my Declarative Automation Bundle (DAB). the validation fails with:&lt;/P&gt;&lt;P&gt;Error: Error while loading volume&lt;BR /&gt;at resources.volumes.raw_zone&lt;/P&gt;&lt;P&gt;ValueError: Unexpected field 'lifecycle' for class Volume&lt;/P&gt;&lt;P&gt;```yaml&lt;/P&gt;&lt;P&gt;resources:&lt;BR /&gt;volumes:&lt;BR /&gt;raw_zone:&lt;BR /&gt;catalog_name: "datazone_dev"&lt;BR /&gt;schema_name: "source"&lt;BR /&gt;name: "raw_zone"&lt;BR /&gt;comment: "Volume created for raw zone data storage"&lt;BR /&gt;volume_type: "MANAGED"&lt;BR /&gt;lifecycle:&lt;BR /&gt;prevent_destroy: true&lt;BR /&gt;grants:&lt;BR /&gt;- principal: "user-name1"&lt;BR /&gt;privileges:&lt;BR /&gt;- READ_VOLUME&lt;BR /&gt;- WRITE_VOLUME&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;When I run&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;databricks bundle schema&lt;/SPAN&gt;&lt;SPAN&gt;, the JSON schema clearly shows that&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;lifecycle&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;is a valid field for Volume resources:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;"resources.Volume": {&lt;BR /&gt;"type": "object",&lt;BR /&gt;"properties": {&lt;BR /&gt;"catalog_name": { ... },&lt;BR /&gt;"comment": { ... },&lt;BR /&gt;"grants": { ... },&lt;BR /&gt;"lifecycle": {&lt;BR /&gt;"description": "Settings that control the deployment lifecycle of the resource, such as preventing it from being destroyed.",&lt;BR /&gt;"$ref": "#/$defs/github.com/databricks/cli/bundle/config/resources.Lifecycle"&lt;BR /&gt;},&lt;BR /&gt;"name": { ... },&lt;BR /&gt;"schema_name": { ... },&lt;BR /&gt;"volume_type": { ... }&lt;BR /&gt;}&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;is there something where I am wrong to get this error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="animeshjain_0-1783340968236.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/28631i1BE6FC058E569F4C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="animeshjain_0-1783340968236.png" alt="animeshjain_0-1783340968236.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="animeshjain_1-1783340987403.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/28632i422335963C51B00D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="animeshjain_1-1783340987403.png" alt="animeshjain_1-1783340987403.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2026 12:30:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/161887#M55034</guid>
      <dc:creator>animeshjain</dc:creator>
      <dc:date>2026-07-06T12:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Bundle Validation Error: Volume lifecycle Field Rejected Despite Being in Schema</title>
      <link>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/162302#M55060</link>
      <description>&lt;P&gt;What you are seeing is expected behavior when the local execution environment is out of sync with the latest target schema definitions. prevent_destroy: true is a fully supported property for Unity Catalog Volume resources within Databricks Asset Bundles (DABs).&amp;nbsp; The ValueError: Unexpected field 'lifecycle' for class Volume error is a strict validation failure thrown by an &lt;STRONG&gt;older Databricks CLI&lt;/STRONG&gt; bundle engine that does not yet recognize the lifecycle class for Volume resource types.&lt;/P&gt;&lt;H3&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;You can follow below&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;If you are running Databricks CLI version older than v1.6.0 -&lt;/STRONG&gt;&amp;nbsp;The local environment you use lacks the updated Python-based schema definitions that introduced volume lifecycle management. You must upgrade your &lt;STRONG&gt;Databricks CLI to v1.6.0 or higher&lt;/STRONG&gt;. You can verify your current version by executing databricks --version in the terminal.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;If your CLI is already up to date (v1.6.0+) but validation still fails -&lt;/STRONG&gt;&amp;nbsp;It can be due to corrupted local state cache or a YAML syntax misalignment. Delete the hidden .databricks caching directory in the project root to clear the state, ensure strict YAML indentation under the raw_zone block, and execute databricks bundle validate to force a clean parse.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;If you are experiencing this error within an automated CI/CD pipeline -&lt;/STRONG&gt;&amp;nbsp;The pipeline runner (GitHub Actions, Azure DevOps, GitLab) is pulling a stale, cached version of the Databricks CLI. Ensure the pipeline configuration explicitly specifies the latest CLI version tag in its setup step.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 09 Jul 2026 05:38:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/162302#M55060</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-07-09T05:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Bundle Validation Error: Volume lifecycle Field Rejected Despite Being in Schema</title>
      <link>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/162490#M55073</link>
      <description>&lt;P&gt;Hi thanks for reply&amp;nbsp;&lt;BR /&gt;I am running cli version 1.6.0 and still getting this error ,i also removed the .databricks directory from the project root&lt;BR /&gt;attaching screenshot for the same&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="animeshjain_0-1783679184456.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/28817i51FD43519A717E54/image-size/medium?v=v2&amp;amp;px=400" role="button" title="animeshjain_0-1783679184456.png" alt="animeshjain_0-1783679184456.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2026 10:26:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/162490#M55073</guid>
      <dc:creator>animeshjain</dc:creator>
      <dc:date>2026-07-10T10:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Bundle Validation Error: Volume lifecycle Field Rejected Despite Being in Schema</title>
      <link>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/162532#M55076</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;The &lt;/SPAN&gt;configuration is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;valid&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and the CLI version supports the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;lifecycle&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field. However, the error is most likely coming from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;outdated Databricks Python packages&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in your virtual environment at&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;/home/animesh/datazone/.venv/&lt;/SPAN&gt;. CLI uses the packages from the venv to parse and validate the bundle. Those packages are from an &lt;STRONG&gt;older version&lt;/STRONG&gt; that doesn't recognize&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;lifecycle&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as a valid field for volumes and hence the Unexpected field 'lifecycle' for class Volume error.&lt;/P&gt;&lt;P&gt;You can activate your virtual environment and upgrade the &lt;STRONG&gt;databricks-sdk &lt;/STRONG&gt;&amp;amp;&lt;STRONG&gt; all other packages &lt;/STRONG&gt;in the&lt;STRONG&gt; environment. &lt;/STRONG&gt;You can upgrade to python &lt;STRONG&gt;3.13.2&lt;/STRONG&gt; if feasible&amp;nbsp;for better management.&amp;nbsp;&lt;SPAN class=""&gt;lifecycle.prevent_destroy&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field will be recognized and your bundle will validate and deploy successfully after its upgraded&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2026 13:23:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/162532#M55076</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-07-10T13:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Bundle Validation Error: Volume lifecycle Field Rejected Despite Being in Schema</title>
      <link>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/162563#M55077</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/241804"&gt;@animeshjain&lt;/a&gt;&amp;nbsp;I think the error is coming from the local Python bundle parser, not from the schema itself, your CLI is showing a schema where lifecycle is valid for volume, but may be the installed &lt;STRONG&gt;databricks.bundles.volumes&lt;/STRONG&gt; runtime that actually parses the YAML is older and still rejects that field.&lt;BR /&gt;&lt;BR /&gt;You can try checking if multiple Databricks CLI installs are present by running below&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;which databricks
databricks --version
python -c "import databricks.bundles.volumes as v; print(v.__file__)"&lt;/LI-CODE&gt;&lt;P&gt;and if that points to an old virtualenv/site-packages path, do a clean reinstall of the Databricks CLI and upgrade to the latest available version rather than staying on 1.6.0. Removing &lt;STRONG&gt;.databricks&lt;/STRONG&gt; alone might not fix this because the failure is in the installed parser code, not bundle state.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2026 16:14:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/162563#M55077</guid>
      <dc:creator>bala_sai</dc:creator>
      <dc:date>2026-07-10T16:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Bundle Validation Error: Volume lifecycle Field Rejected Despite Being in Schema</title>
      <link>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/163339#M55128</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/241804"&gt;@animeshjain&lt;/a&gt;&amp;nbsp;What's happening is that two different components are checking your config, and they are at different versions.&lt;/P&gt;&lt;P&gt;databricks bundle schema is generated from the CLI binary itself, and your CLI is latest enough enough to know about lifecycle. That's why the schema shows the field. But the error is not coming from the CLI.&lt;/P&gt;&lt;P&gt;Look at the traceback path: site-packages/databricks/bundles/build.py and core/_transform.py. That is the databricks-bundles Python package, which runs because your bundle has Python support enabled. With Python support on, every resource in the bundle, including ones defined in plain YAML like your volume, gets loaded into typed Python dataclasses so that Python code can see and mutate them. Those dataclasses are strict, and the transform step raises on any field the class does not declare. Your installed version of that package has a Volume class with no lifecycle field, so it rejects the config that your CLI already accepted.&lt;/P&gt;&lt;P&gt;Have you tried updating the Python package? You can check what you're on with&lt;/P&gt;&lt;P&gt;pip show databricks-bundles&lt;/P&gt;&lt;P&gt;If it reports anything below 0.268.0, that's your answer. Upgrade it:&lt;BR /&gt;&lt;BR /&gt;pip install --upgrade databricks-bundles&lt;/P&gt;&lt;P&gt;or, more likely in your case, bump the pin in whatever requirements or pyproject file builds your bundle's Python environment. The&lt;BR /&gt;pythonEnv-.../site-packages path in your traceback shows the environment is built fresh from declared dependencies, so the old version is coming from a pin somewhere rather than from a stale machine. The package is on a 1.x version line now, so anything current is well past the fix. Nothing in your resource definition needs to change; after the upgrade, rerun validate and the volume should load cleanly, and prevent_destroy works as expected with the direct engine.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jul 2026 20:40:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/bundle-validation-error-volume-lifecycle-field-rejected-despite/m-p/163339#M55128</guid>
      <dc:creator>binlogreader</dc:creator>
      <dc:date>2026-07-18T20:40:05Z</dc:date>
    </item>
  </channel>
</rss>

