Skip to content

RESOURCE_DOES_NOT_EXIST when Run As Workflow #1856

@waynefillis-ET

Description

@waynefillis-ET

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

  1. Clone an existing repo
  2. Set up a project (either Serverless or Cluster)
  3. Python env 3.12
  4. DBX Connect 18.1.1
  5. Target dev
  6. Remote folder is User/.bundle
  7. Open a .py notebook
  8. Click Run File As Workflow
  9. Error is that it's stuck at Sync and the log has a RESOURCE_DOES_NOT_EXIST error
  10. Rename the wrapper file to add the .py extension
  11. Click Run File As Workflow
  12. NB now executes
  13. (NOTE) - Original NB was a .ipynb NB and was converted to a .py NB
  14. NB runs on the DBX UI as a .py NB

System information:

  1. Mac Tahoe 26.3
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions