Description
Is there an existing issue for this?
- I have searched the existing issues
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
uses NotebookLoader.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
Metadata
Metadata
Assignees
Type
Projects
Status