From 238cefd6f2c50ff36f4b02a1d7f6a0132b15328a Mon Sep 17 00:00:00 2001 From: Liran Bareket Date: Fri, 1 Nov 2024 15:52:36 -0400 Subject: [PATCH] Addressed Integration Tests Issues --- src/databricks/labs/ucx/contexts/application.py | 2 +- src/databricks/labs/ucx/hive_metastore/ownership.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/databricks/labs/ucx/contexts/application.py b/src/databricks/labs/ucx/contexts/application.py index 04c6e03236..7e3ee44ef4 100644 --- a/src/databricks/labs/ucx/contexts/application.py +++ b/src/databricks/labs/ucx/contexts/application.py @@ -284,7 +284,7 @@ def static_table_ownership(self) -> StaticTableOwnership: self.administrator_locator, self.tables_crawler, self.config.default_owner_group, - self.connect_config.username + self.connect_config.username, ) @cached_property diff --git a/src/databricks/labs/ucx/hive_metastore/ownership.py b/src/databricks/labs/ucx/hive_metastore/ownership.py index 60167e6086..6550c798dc 100644 --- a/src/databricks/labs/ucx/hive_metastore/ownership.py +++ b/src/databricks/labs/ucx/hive_metastore/ownership.py @@ -109,6 +109,9 @@ def load(self) -> Iterable[Grant]: for table in self._tables_crawler.snapshot(): owner = self._maybe_direct_owner(table) table_name, view_name = self._names(table) + if not owner: + logger.warning(f"No owner found for {table.key}") + continue yield Grant( principal=owner, action_type='OWN',