Skip to content

Commit c6fb616

Browse files
ericvergnaudJCZuurmond
authored andcommitted
populate ownership - leave the correct implementation to issue #3003
1 parent c1fc429 commit c6fb616

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/databricks/labs/ucx/framework/owners.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,3 +255,10 @@ def _maybe_direct_owner(self, record: str) -> str | None:
255255
return None
256256
except InternalError: # redash is very naughty and throws 500s instead of proper 404s
257257
return None
258+
259+
260+
class WorkspaceObjectOwnership(Ownership[tuple[str, str]]):
261+
262+
def _maybe_direct_owner(self, record: tuple[str, str]) -> str | None:
263+
# TODO: tuple[0] = object_type, tuple[1] = object_id
264+
return None

src/databricks/labs/ucx/sequencing/sequencing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from databricks.labs.ucx.assessment.clusters import ClusterOwnership, ClusterInfo
1212
from databricks.labs.ucx.assessment.jobs import JobOwnership, JobInfo
13-
from databricks.labs.ucx.framework.owners import AdministratorLocator
13+
from databricks.labs.ucx.framework.owners import AdministratorLocator, WorkspaceObjectOwnership
1414
from databricks.labs.ucx.source_code.graph import DependencyGraph
1515
from databricks.labs.ucx.source_code.path_lookup import PathLookup
1616

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

0 commit comments

Comments
 (0)