Skip to content

Commit

Permalink
populate ownership - leave the correct implementation to issue #3003
Browse files Browse the repository at this point in the history
  • Loading branch information
ericvergnaud authored and JCZuurmond committed Nov 26, 2024
1 parent c1fc429 commit c6fb616
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/databricks/labs/ucx/framework/owners.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,10 @@ def _maybe_direct_owner(self, record: str) -> str | None:
return None
except InternalError: # redash is very naughty and throws 500s instead of proper 404s
return None


class WorkspaceObjectOwnership(Ownership[tuple[str, str]]):

def _maybe_direct_owner(self, record: tuple[str, str]) -> str | None:
# TODO: tuple[0] = object_type, tuple[1] = object_id
return None
3 changes: 2 additions & 1 deletion src/databricks/labs/ucx/sequencing/sequencing.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from databricks.labs.ucx.assessment.clusters import ClusterOwnership, ClusterInfo
from databricks.labs.ucx.assessment.jobs import JobOwnership, JobInfo
from databricks.labs.ucx.framework.owners import AdministratorLocator
from databricks.labs.ucx.framework.owners import AdministratorLocator, WorkspaceObjectOwnership
from databricks.labs.ucx.source_code.graph import DependencyGraph
from databricks.labs.ucx.source_code.path_lookup import PathLookup

Expand Down Expand Up @@ -115,6 +115,7 @@ def register_dependency(self, parent_node: MigrationNode, object_type: str, obje
continue
object_name = path.relative_to(library_root).as_posix()
break
object_owner = WorkspaceObjectOwnership(self._admin_locator).owner_of((object_type, object_id))
else:
raise ValueError(f"{object_type} not supported yet!")
self._last_node_id += 1
Expand Down

0 comments on commit c6fb616

Please sign in to comment.