Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata about notebook with slashes in directory name fails: DatabricksError: Path (/Users/XXX/Rapid Start - DGP - 27/02) doesn't exist. #230

Closed
nfx opened this issue Sep 20, 2023 · 1 comment · Fixed by #234

Comments

@nfx
Copy link
Collaborator

nfx commented Sep 20, 2023

In some corner cases, Databricks workspace folders can contain forward slashes (/), which does not fully follow the semantics of a filesystem:

image

this may break the listing:

    147 from databricks.labs.ucx.workspace_access.listing import WorkspaceListing
    149 ws_listing = WorkspaceListing(ws, num_threads=num_threads, with_directories=False)
--> 150 for _object in ws_listing.walk(start_path):
    151     request_type = _convert_object_type_to_request_type(_object)
    152     if request_type:
...
     30 while queue:
     31     path, queue = queue[0], queue[1:]
---> 32     for object_info in parent_list(path, notebooks_modified_after=notebooks_modified_after):
     33         if recursive and object_info.object_type == ObjectType.DIRECTORY:
     34             queue.append(object_info.path)
...
   1784 if path is not None: query['path'] = path
   1785 headers = {'Accept': 'application/json', }
-> 1786 json = self._api.do('GET', '/api/2.0/workspace/list', query=query, headers=headers)
   1787 return [ObjectInfo.from_dict(v) for v in json.get('objects', [])]
@nfx nfx changed the title Metadata about notebook with slashes in filename fails: DatabricksError: Path (/Users/XXX/Rapid Start - DGP - 27/02) doesn't exist. Metadata about notebook with slashes in directory name fails: DatabricksError: Path (/Users/XXX/Rapid Start - DGP - 27/02) doesn't exist. Sep 20, 2023
@nfx nfx added this to the 1 week milestone Sep 20, 2023
@nfx
Copy link
Collaborator Author

nfx commented Sep 20, 2023

Platform doesn't allow this from UI anymore. we'll just ignore it.

nfx added a commit that referenced this issue Sep 20, 2023
nfx added a commit that referenced this issue Sep 20, 2023
@nfx nfx closed this as completed in #234 Sep 20, 2023
nfx added a commit that referenced this issue Sep 20, 2023
FastLee pushed a commit that referenced this issue Sep 20, 2023
@nfx nfx removed this from the 1 week milestone Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant