fix(ingest/tableau): warn with better error message (#10749)

This commit is contained in:
Aseem Bansal 2024-06-20 16:56:53 +05:30 committed by GitHub
parent 190f09ad7a
commit f581f70c93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -665,6 +665,12 @@ class TableauSource(StatefulIngestionSourceBase, TestableSource):
cur_proj = all_project_map[project_id]
ancestors = [cur_proj.name]
while cur_proj.parent_id is not None:
if cur_proj.parent_id not in all_project_map:
self.report.report_warning(
"project-issue",
f"Parent project {cur_proj.parent_id} not found. We need Site Administrator Explorer permissions.",
)
break
cur_proj = all_project_map[cur_proj.parent_id]
ancestors = [cur_proj.name, *ancestors]
return ancestors