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

Fixed missing group entitlement migration bug #583

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/databricks/labs/ucx/workspace_access/scim.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ def _is_item_relevant(item: Permissions, migration_state: GroupMigrationState) -
return migration_state.is_id_in_scope(item.object_id)

def get_crawler_tasks(self):
groups = self._get_groups()
with_roles = [g for g in groups if g.roles and len(g.roles) > 0]
with_entitlements = [g for g in groups if g.entitlements and len(g.entitlements) > 0]
for g in with_roles:
yield partial(self._crawler_task, g, "roles")
for g in with_entitlements:
yield partial(self._crawler_task, g, "entitlements")
for g in self._get_groups():
if g.roles and len(g.roles) > 0:
yield partial(self._crawler_task, g, "roles")
if g.entitlements and len(g.entitlements) > 0:
yield partial(self._crawler_task, g, "entitlements")

# TODO remove after ES-892977 is fixed
@retried(on=[DatabricksError])
Expand Down
Loading