NotebookResolver.resolve_notebook
should verify if the resolved path is a notebook
#3704
Open
1 task done
Labels
2026-BUG
migrate/python
Pull requests that update Python code
python
Pull requests that update Python code
Is there an existing issue for this?
Current Behavior
NotebookResolver.resolve_notebook
should verify if the resolved path is a file.ucx/src/databricks/labs/ucx/source_code/notebooks/loaders.py
Lines 33 to 38 in 34b3d86
Currently, if a directory is passed to the
NotebookResolver
it is resolved successfully.Implementation suggestion
The
NotebookResolver
usesNotebookLoader.resolve
which checks if the path is a notebook if can be resolved in the current working directory:ucx/src/databricks/labs/ucx/source_code/notebooks/loaders.py
Lines 61 to 79 in 34b3d86
That should be updated to always verify if a found path is a notebook, also with the adjusted path
Expected Behavior
A directory should not be resolved successfully by
NotebookResolver.resolve_notebook
Steps To Reproduce
No response
Cloud
AWS
Operating System
macOS
Version
latest via Databricks CLI
Relevant log output
The text was updated successfully, but these errors were encountered: