-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Describe the bug
The extension's WorkspaceFsWorkflowWrapper.createFile checks for the wrapper path with .py appended, but when the bundle sync uploads it, Databricks strips the .py extension (as it does for all notebooks). The get-status API call then 404s because it's looking for the .py version.
To Reproduce
- Clone an existing repo
- Set up a project (either Serverless or Cluster)
- Python env 3.12
- DBX Connect 18.1.1
- Target dev
- Remote folder is User/.bundle
- Open a .py notebook
- Click Run File As Workflow
- Error is that it's stuck at Sync and the log has a RESOURCE_DOES_NOT_EXIST error
- Rename the wrapper file to add the .py extension
- Click Run File As Workflow
- NB now executes
- (NOTE) - Original NB was a .ipynb NB and was converted to a .py NB
- NB runs on the DBX UI as a .py NB
System information:
- Mac Tahoe 26.3
- Databricks Extension Version: 2.10.5
Databricks Extension Logs
Here's the sanitised log snippet for the bug report:
2026-03-13 10:43:08.880 [info] sync: Uploading bundle assets for target dev...
2026-03-13 10:43:09.304 [info] sync: Initial Sync Complete
2026-03-13 10:43:09.306 [info] sync: Bundle assets uploaded successfully.
2026-03-13 10:43:10.048 [error] API error while running workflow:
error_code: "RESOURCE_DOES_NOT_EXIST"
message: "Path (/Users//.bundle//dev/files/notebooks/load//LRI_V2_EWT_OTP_Hourly.databricks.notebook.workflow-wrapper.py) doesn't exist."
statusCode: 404
Stack trace:
at parseErrorFromResponse (extension.js:1860:14)
at fn (extension.js:2439:63)
at async retry4 (extension.js:1740:20)
at async ApiClient8.request (extension.js:2417:26)
at async WorkspaceService._getStatus (extension.js:72858:16)
at async WorkspaceService.getStatus (extension.js:72872:16)
at async _WorkspaceFsEntity.fromPath (extension.js:88198:13)
at async WorkspaceFsDir.createFile (extension.js:88009:22)
at async WorkspaceFsWorkflowWrapper.createFile (extension.js:143195:25)
at async WorkflowRunner.run (extension.js:143449:31)
at async DatabricksWorkflowDebugSession.startWorkflow (extension.js:143631:5)
at async DatabricksWorkflowDebugSession.launchRequest (extension.js:143588:5)
2026-03-13 10:43:10.048 [error] Workflow error handling failed:
TypeError: Cannot use 'in' operator to search for 'error_trace' in {"error_code":"RESOURCE_DOES_NOT_EXIST",...}
at WorkflowRunner.handleRunError (extension.js:143508:32)
at WorkflowRunner.run (extension.js:143497:12)
Key points to highlight in the report:
The get-status API call requests the path with .py appended
The bundle sync uploads the notebook without .py (standard Databricks workspace behaviour)
Manually renaming the notebook in the workspace UI to include .py resolves it
There's also a secondary bug: handleRunError crashes with a TypeError because it tries to use the in operator on a string instead of parsing the JSON response first