<?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: DBR 17.3 – sporadic import failures from bundle in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161250#M55010</link>
    <description>&lt;P&gt;Thanks for the reply. In our case it isn't wheel caching: we don't deploy a wheel. Our tasks are plain Python script tasks, deployed via a Databricks Asset Bundle directly into the workspace, e.g. /Workspace/Users/&amp;lt;user-id&amp;gt;/.bundle/project/Default/production/files/src/...&lt;BR /&gt;So there's no pip install and&amp;nbsp;&amp;nbsp;we've also already redeployed several times with no change.&lt;/P&gt;&lt;P&gt;The failing imports are for modules/functions inside the bundle's own source tree. It's intermittent and moves around: a task fails with "No module named ..." / "cannot import name ...", the next run passes it but fails another task the same way. That looks like files not being reliably visible at import time&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I also noticed a recent maintenance &lt;A href="https://docs.databricks.com/gcp/en/release-notes/runtime/maintenance-updates#databricks-runtime-173-lts" target="_self"&gt;update&lt;/A&gt; for 17.3 LTS, so I'm wondering if this could be related.&lt;/P&gt;&lt;P&gt;Same issue seems to be reported &lt;A href="https://community.databricks.com/t5/data-engineering/intermittent-failure-with-python-imports-statements-after/td-p/150708" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;by someone else (also two days ago), and I've added a message too.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jul 2026 19:32:24 GMT</pubDate>
    <dc:creator>freddyT</dc:creator>
    <dc:date>2026-07-02T19:32:24Z</dc:date>
    <item>
      <title>DBR 17.3 – sporadic import failures from bundle</title>
      <link>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161217#M55002</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Since two days ago we've been getting sporadic Python import failures on DBR 17.3, with no change on our side. The errors are either "cannot import name ..." or "no module named ...", and they come and go: the same code fails on one run and passes on the next.&lt;BR /&gt;&lt;BR /&gt;We are on Databricks Runtime&amp;nbsp;&lt;SPAN&gt;17.3.15, job compute (single node Standard_DC4as_v5).&lt;BR /&gt;&lt;BR /&gt;Is anyone else seeing this today? Any known cause or workaround would be a big help. Thanks!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2026 14:48:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161217#M55002</guid>
      <dc:creator>freddyT</dc:creator>
      <dc:date>2026-07-02T14:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: DBR 17.3 – sporadic import failures from bundle</title>
      <link>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161222#M55004</link>
      <description>&lt;P data-pm-slice="1 1 []"&gt;Hi, a few Databricks-specific things to check here. "From bundle" plus imports that come and go on the same runtime usually points at how the wheel gets packaged and installed across runs rather than at your code.&lt;/P&gt;
&lt;P&gt;On the runtime itself: DBR 17.3 is an &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/release-notes/runtime/17.3lts" target="_blank"&gt;LTS release&lt;/A&gt; (GA Oct 22, 2025, Spark 4.0.0), so a broad runtime-side import regression is unlikely. That makes a packaging or install-caching interaction the more probable cause, and those are fixable from the bundle side.&lt;/P&gt;
&lt;P&gt;The most common cause of &lt;CODE&gt;cannot import name ...&lt;/CODE&gt; / &lt;CODE&gt;no module named ...&lt;/CODE&gt; that flips between runs with no code change is a stale wheel being installed on some runs but not others:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Same wheel version across rebuilds.&lt;/STRONG&gt; If your wheel keeps the same version (say &lt;CODE&gt;0.0.1&lt;/CODE&gt;) between deploys, pip sees the requirement as already satisfied and can skip reinstalling it on compute that is warm or reused, so a newly added or renamed symbol is missing on those runs. Databricks added a setting for exactly this: put &lt;CODE&gt;dynamic_version: true&lt;/CODE&gt; on your &lt;CODE&gt;whl&lt;/CODE&gt; artifact and each deploy patches the wheel version suffix from the file timestamp, so new code always installs without you bumping the version in &lt;CODE&gt;setup.py&lt;/CODE&gt;/&lt;CODE&gt;pyproject.toml&lt;/CODE&gt;. It shipped in &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/release-notes/dev-tools/bundles" target="_blank"&gt;Databricks CLI 0.245.0&lt;/A&gt; and is documented under &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/reference#artifacts" target="_blank"&gt;artifacts&lt;/A&gt;. There is also a ready-made preset, &lt;CODE&gt;artifacts_dynamic_version&lt;/CODE&gt;, that the &lt;CODE&gt;default-python&lt;/CODE&gt; template enables for classic compute (see &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/deployment-modes#presets" target="_blank"&gt;Custom presets&lt;/A&gt;).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-yaml"&gt; artifacts:
   my_wheel:
     type: whl
     dynamic_version: true
     build: uv build --wheel&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;More than one wheel left in &lt;/STRONG&gt;&lt;CODE&gt;dist/&lt;/CODE&gt;&lt;STRONG&gt;.&lt;/STRONG&gt; If your library reference is a glob like &lt;CODE&gt;whl: ./dist/*.whl&lt;/CODE&gt; and older wheels are still sitting in &lt;CODE&gt;dist/&lt;/CODE&gt;, the install can match an older file on some runs. Clean &lt;CODE&gt;dist/&lt;/CODE&gt; before each build, or point at the exact filename, so only the current wheel is present. (This class of issue shows up in &lt;A href="https://community.databricks.com/t5/data-engineering/error-databricks-bundle-deploy-with-changes-in-the-wheel-file/td-p/103975" target="_blank"&gt;this community thread&lt;/A&gt;.)&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;To confirm which run got which build, compare a passing run and a failing run: log the installed version of your package at the top of the task (&lt;CODE&gt;importlib.metadata.version("&amp;lt;pkg&amp;gt;")&lt;/CODE&gt; or &lt;CODE&gt;pip show &amp;lt;pkg&amp;gt;&lt;/CODE&gt;) and check it against the wheel version/timestamp your deploy produced. If passing and failing runs show different installed versions, it is the caching path above and &lt;CODE&gt;dynamic_version&lt;/CODE&gt; will settle it.&lt;/P&gt;
&lt;P&gt;On "is anyone else seeing this today": since it began about two days ago with no change on your side, it is worth ruling out a redeploy that reused the same version (a scheduled CI job, or a teammate's deploy) landing unevenly across warm job clusters. If the installed versions match on passing and failing runs and the wheel is clean, grab the run IDs of one passing and one failing run and open a support ticket, and check the Azure status page for your region.&lt;/P&gt;
&lt;P&gt;(If your bundle deploys source files rather than a wheel, the same on-again/off-again behavior can instead come from &lt;CODE&gt;sys.path&lt;/CODE&gt;/workspace-files resolution; the version-logging check above will tell you which path you are on.)&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2026 15:47:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161222#M55004</guid>
      <dc:creator>anagilla</dc:creator>
      <dc:date>2026-07-02T15:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: DBR 17.3 – sporadic import failures from bundle</title>
      <link>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161243#M55008</link>
      <description>&lt;P class="isSelectedEnd"&gt;&lt;SPAN&gt;Hi, I think the accepted answer is pointing in the right direction.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="isSelectedEnd"&gt;&lt;SPAN&gt;Given that DBR 17.3 is an LTS runtime, this is more likely to be a packaging or deployment issue than a runtime regression.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="isSelectedEnd"&gt;&lt;SPAN&gt;One common cause is wheel caching. If your wheel version doesn't change between deployments, &lt;/SPAN&gt;&lt;CODE dir="ltr"&gt;&lt;SPAN&gt;pip&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt; running on the cluster may determine that the package is already installed and skip reinstalling it. That can produce exactly the kind of intermittent behavior you're seeing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="isSelectedEnd"&gt;&lt;SPAN&gt;If you're using Databricks Asset Bundles, consider enabling &lt;/SPAN&gt;&lt;CODE dir="ltr"&gt;&lt;SPAN&gt;dynamic_version&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE dir="ltr"&gt;&lt;CODE dir="ltr"&gt;&lt;SPAN&gt;artifacts:
  my_project:
    type: whl
    build: python setup.py bdist_wheel
    dynamic_version: true&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P class="isSelectedEnd"&gt;&lt;SPAN&gt;This feature (introduced in Databricks CLI 0.245.0) appends a unique timestamp to each generated wheel version so every deployment is treated as a new package and reinstalled accordingly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It's also a good idea to clean the &lt;/SPAN&gt;&lt;CODE dir="ltr"&gt;&lt;SPAN&gt;dist/&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt; directory before each build. If your artifact path uses a wildcard, an older wheel remaining alongside the newly built one is another common source of inconsistent deployments.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2026 17:57:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161243#M55008</guid>
      <dc:creator>iyashk-DB</dc:creator>
      <dc:date>2026-07-02T17:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: DBR 17.3 – sporadic import failures from bundle</title>
      <link>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161250#M55010</link>
      <description>&lt;P&gt;Thanks for the reply. In our case it isn't wheel caching: we don't deploy a wheel. Our tasks are plain Python script tasks, deployed via a Databricks Asset Bundle directly into the workspace, e.g. /Workspace/Users/&amp;lt;user-id&amp;gt;/.bundle/project/Default/production/files/src/...&lt;BR /&gt;So there's no pip install and&amp;nbsp;&amp;nbsp;we've also already redeployed several times with no change.&lt;/P&gt;&lt;P&gt;The failing imports are for modules/functions inside the bundle's own source tree. It's intermittent and moves around: a task fails with "No module named ..." / "cannot import name ...", the next run passes it but fails another task the same way. That looks like files not being reliably visible at import time&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I also noticed a recent maintenance &lt;A href="https://docs.databricks.com/gcp/en/release-notes/runtime/maintenance-updates#databricks-runtime-173-lts" target="_self"&gt;update&lt;/A&gt; for 17.3 LTS, so I'm wondering if this could be related.&lt;/P&gt;&lt;P&gt;Same issue seems to be reported &lt;A href="https://community.databricks.com/t5/data-engineering/intermittent-failure-with-python-imports-statements-after/td-p/150708" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;by someone else (also two days ago), and I've added a message too.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2026 19:32:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161250#M55010</guid>
      <dc:creator>freddyT</dc:creator>
      <dc:date>2026-07-02T19:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: DBR 17.3 – sporadic import failures from bundle</title>
      <link>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161388#M55020</link>
      <description>&lt;P&gt;I appreciate your response. Since we don't use a wheel, it isn't wheel caching in our situation. Our tasks are simple Python script tasks that are delivered straight into the workspace using a Databricks Asset Bundle, such as /Workspace/Users/&amp;lt;user-id&amp;gt;/.bundle/project/Default/production/files/src/...&lt;BR /&gt;Thus, there isn't a pip install, and we've already redeployed many times without any improvement.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2026 17:32:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161388#M55020</guid>
      <dc:creator>jason533</dc:creator>
      <dc:date>2026-07-04T17:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: DBR 17.3 – sporadic import failures from bundle</title>
      <link>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161393#M55021</link>
      <description>&lt;P&gt;Thank you for your reply. In our case, it isn't wheel caching because we don't utilize a wheel. We use a Databricks Asset Bundle to bring our straightforward Python script tasks directly into the workspace.&amp;nbsp;Tinytask modern automation software for keyboard and mouse recording and playing in loops. Tinytask Mailerchrome extension allows multiple Emails sending from Gmail as a human behavior.&amp;nbsp;&lt;A href="http://tinytask.org" target="_self"&gt;&lt;SPAN&gt;TinyTask&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2026 18:23:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dbr-17-3-sporadic-import-failures-from-bundle/m-p/161393#M55021</guid>
      <dc:creator>jason533</dc:creator>
      <dc:date>2026-07-04T18:23:47Z</dc:date>
    </item>
  </channel>
</rss>

