<?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: Asset Bundle Include Glob paths not resolving recursive directories in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/asset-bundle-include-glob-paths-not-resolving-recursive/m-p/135973#M4269</link>
    <description>&lt;P&gt;now THAT is a clear answer!&lt;/P&gt;</description>
    <pubDate>Fri, 24 Oct 2025 14:20:43 GMT</pubDate>
    <dc:creator>-werners-</dc:creator>
    <dc:date>2025-10-24T14:20:43Z</dc:date>
    <item>
      <title>Asset Bundle Include Glob paths not resolving recursive directories</title>
      <link>https://community.databricks.com/t5/administration-architecture/asset-bundle-include-glob-paths-not-resolving-recursive/m-p/124337#M3596</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;When trying to include resource definitions in nested yaml files, the recursive paths I am specifying in the &lt;EM&gt;include&lt;/EM&gt; section are not resolving as would be expected.&lt;/P&gt;&lt;P&gt;With the include path &lt;STRONG&gt;resources/**/*.yml&lt;/STRONG&gt; and a directory structure structure as follows:&lt;BR /&gt;/&lt;BR /&gt;| databricks.yml&lt;BR /&gt;| resources&lt;BR /&gt;- | clusters&lt;BR /&gt;- - | cluster1.yml&lt;BR /&gt;- - | cluster2.yml&lt;BR /&gt;- | unity-catalog&lt;BR /&gt;- - | schemas&lt;BR /&gt;- - - | schema1.yml&lt;BR /&gt;- - - | schema2.yml&lt;/P&gt;&lt;P&gt;I would expect all .yml files to be included in the deployed template, but only those in &lt;STRONG&gt;resources/clusters&lt;/STRONG&gt; are.&amp;nbsp; If I change the include to&amp;nbsp;&lt;STRONG&gt;resources/**/**/*.yml&lt;/STRONG&gt; then all the .yml files in&amp;nbsp;&lt;STRONG&gt;resources/unity-catalog/schemas&lt;/STRONG&gt; are included, but the&amp;nbsp;&lt;STRONG&gt;clusters&lt;/STRONG&gt; are not.&amp;nbsp; If I add&amp;nbsp;&lt;EM&gt;both&amp;nbsp;&lt;/EM&gt;paths to the include, then all the nested .yml files are included within the deployed template, though this is obviously a less than ideal workaround.&lt;/P&gt;&lt;P&gt;Am I misunderstanding how these paths are supposed to be resolved or is this a bug in the databricks cli?&lt;/P&gt;&lt;P&gt;For reference I am using Databricks CLI v0.255.0 within a PowerShell terminal on Windows 10.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 14:40:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/asset-bundle-include-glob-paths-not-resolving-recursive/m-p/124337#M3596</guid>
      <dc:creator>DavidMoss</dc:creator>
      <dc:date>2025-07-07T14:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Asset Bundle Include Glob paths not resolving recursive directories</title>
      <link>https://community.databricks.com/t5/administration-architecture/asset-bundle-include-glob-paths-not-resolving-recursive/m-p/135970#M4268</link>
      <description>&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;This behavior is caused by the way the Databricks CLI currently handles recursive globbing for the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;include&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;section in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;databricks.yml&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;files. You are not misunderstanding; this is a limitation (and partially a bug) in how the CLI resolves glob patterns for included YAML files rather than a mistake in your configuration.&lt;/P&gt;
&lt;H2 class="mb-2 mt-4 font-display font-semimedium text-base first:mt-0"&gt;Explanation&lt;/H2&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;According to the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Databricks Asset Bundle configuration documentation&lt;/STRONG&gt;, entries in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;include&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;are processed using relative path globs that behave similarly to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;.gitignore&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;patterns. However, the CLI does&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;not support fully recursive multi-level expansion&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;beyond one level of double-star (&lt;CODE&gt;**&lt;/CODE&gt;) recursion in some contexts. Specifically:​&lt;/P&gt;
&lt;UL class="marker:text-quiet list-disc"&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;&lt;CODE&gt;resources/**/*.yml&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;expands only one directory deep under&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;resources&lt;/CODE&gt;, meaning files like&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;resources/clusters/cluster*.yml&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;are correctly found.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;When deeper folders exist (for example,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;resources/unity-catalog/schemas/schema1.yml&lt;/CODE&gt;), the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;**&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;pattern stops matching because the CLI performs only one recursive depth expansion during include resolution, not fully recursive searching.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Conversely, when you change the pattern to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;resources/**/**/*.yml&lt;/CODE&gt;, the traversal starts deeper, catching nested schemas but skipping the shallower directory, since it shifts the base recursion depth.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;This behavior affects the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;include&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;array in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;databricks.yml&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;but&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;not&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;sync.include&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;sync.paths&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;mappings, which use standardized&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;.gitignore&lt;/CODE&gt;-style globbing.&lt;/P&gt;
&lt;H2 class="mb-2 mt-4 font-display font-semimedium text-base first:mt-0"&gt;Confirmation of the Bug&lt;/H2&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;A related issue was raised in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Databricks CLI GitHub issue #1755&lt;/STRONG&gt;, where similar path resolution and glob-root expansion inconsistencies were reported. The Databricks team acknowledged the issue and implemented a patch (&lt;CODE&gt;#1756 – Expand library globs relative to the sync root&lt;/CODE&gt;) to improve consistent glob expansion, but as of version&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;0.227.x–0.228.x&lt;/STRONG&gt;, this fix primarily affected the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;sync&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and resource path resolution,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;not&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;include&lt;/CODE&gt;.​&lt;/P&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Hence your observation—having to specify multiple patterns (e.g., both&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;resources/**/*.yml&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;resources/**/**/*.yml&lt;/CODE&gt;)—is consistent with this incomplete glob-expansion behavior.&lt;/P&gt;
&lt;H2 class="mb-2 mt-4 font-display font-semimedium text-base first:mt-0"&gt;Workarounds&lt;/H2&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Until Databricks extends consistent glob handling to nested includes, you can:&lt;/P&gt;
&lt;OL class="marker:text-quiet list-decimal"&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Combine multiple patterns in your include mapping:&lt;/P&gt;
&lt;DIV class="w-full md:max-w-[90vw]"&gt;
&lt;DIV class="codeWrapper text-light selection:text-super selection:bg-super/10 my-md relative flex flex-col rounded font-mono text-sm font-normal bg-subtler"&gt;
&lt;DIV class="translate-y-xs -translate-x-xs bottom-xl mb-xl flex h-0 items-start justify-end md:sticky md:top-[100px]"&gt;
&lt;DIV class="overflow-hidden rounded-full border-subtlest ring-subtlest divide-subtlest bg-base"&gt;
&lt;DIV class="border-subtlest ring-subtlest divide-subtlest bg-subtler"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="-mt-xl"&gt;
&lt;DIV&gt;
&lt;DIV class="text-quiet bg-subtle py-xs px-sm inline-block rounded-br rounded-tl-[3px] font-thin" data-testid="code-language-indicator"&gt;text&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;CODE&gt;include:
  - resources/**/*.yml
  - resources/**/**/*.yml
&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Alternatively, flatten the resource structure or consolidate schema definitions where possible.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="py-0 my-0 prose-p:pt-0 prose-p:mb-2 prose-p:my-0 [&amp;amp;&amp;gt;p]:pt-0 [&amp;amp;&amp;gt;p]:mb-2 [&amp;amp;&amp;gt;p]:my-0"&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;Ensure your CLI is updated beyond v0.228.x once a fix for recursive include resolution is officially released.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;H2 class="mb-2 mt-4 font-display font-semimedium text-base first:mt-0"&gt;Summary&lt;/H2&gt;
&lt;P class="my-2 [&amp;amp;+p]:mt-4 [&amp;amp;_strong:has(+br)]:inline-block [&amp;amp;_strong:has(+br)]:pb-2"&gt;You’re not misunderstanding the syntax; it’s a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;known, unresolved bug&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the Databricks CLI’s recursive include implementation. As of CLI versions through&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;0.228.x&lt;/STRONG&gt;, the recursive&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;**&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;matches inconsistently depending on directory depth within the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;include&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;block.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 14:17:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/asset-bundle-include-glob-paths-not-resolving-recursive/m-p/135970#M4268</guid>
      <dc:creator>mark_ott</dc:creator>
      <dc:date>2025-10-24T14:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Asset Bundle Include Glob paths not resolving recursive directories</title>
      <link>https://community.databricks.com/t5/administration-architecture/asset-bundle-include-glob-paths-not-resolving-recursive/m-p/135973#M4269</link>
      <description>&lt;P&gt;now THAT is a clear answer!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 14:20:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/asset-bundle-include-glob-paths-not-resolving-recursive/m-p/135973#M4269</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2025-10-24T14:20:43Z</dc:date>
    </item>
  </channel>
</rss>

