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

Fix GroupConfig.auto for permissions inventory #236

Closed
nfx opened this issue Sep 20, 2023 · 0 comments · Fixed by #277
Closed

Fix GroupConfig.auto for permissions inventory #236

nfx opened this issue Sep 20, 2023 · 0 comments · Fixed by #277
Labels
bug Something isn't working feat/account-level cross-workspace installations

Comments

@nfx
Copy link
Contributor

nfx commented Sep 20, 2023

Fails when we don't have a match between workspace groups and account groups:

     84 toolkit = GroupMigrationToolkit(cfg)
---> 85 toolkit.prepare_environment()
     86 toolkit.cleanup_inventory_table()
     87 toolkit.inventorize_permissions()
...
    117 def prepare_environment(self):
--> 118     self._group_manager.prepare_groups_in_environment()
...
    173     logger.info("No group listing provided, all available workspace-level groups will be used")
    174     available_group_names = [g.display_name for g in self._workspace_groups]
--> 175     self._set_migration_groups(groups_names=available_group_names)
...
    120     backup_group = self._get_or_create_backup_group(source_group_name=name, source_group=ws_group)
    121     return MigrationGroupInfo(workspace=ws_group, backup=backup_group, account=acc_group)
--> 123 collected_groups = ThreadedExecution.gather(
    124     "get group info", [partial(get_group_info, group_name) for group_name in groups_names]
    125 )
    126 for g in collected_groups:
    127     self._migration_state.add(g)
...
    117 assert ws_group, f"Group {name} not found on the workspace level"
    118 acc_group = self._get_group(name, "account")
--> 119 assert acc_group, f"Group {name} not found on the account level"
    120 backup_group = self._get_or_create_backup_group(source_group_name=name, source_group=ws_group)
    121 return MigrationGroupInfo(workspace=ws_group, backup=backup_group, account=acc_group)
@nfx nfx added this to the 1 week milestone Sep 20, 2023
@nfx nfx added bug Something isn't working migration step feat/account-level cross-workspace installations labels Sep 20, 2023
nfx added a commit that referenced this issue Sep 22, 2023
…roups in case no explicit configuration

Fixes #272
Fixes #236
nfx added a commit that referenced this issue Sep 25, 2023
…roups in case no explicit configuration

Fixes #272
Fixes #236
@nfx nfx closed this as completed in #277 Sep 25, 2023
nfx added a commit that referenced this issue Sep 25, 2023
…roups in case no explicit configuration (#277)

Fixes #272
Fixes #236
@nfx nfx removed this from the 1 week milestone Sep 25, 2023
FastLee pushed a commit that referenced this issue Sep 25, 2023
…roups in case no explicit configuration (#277)

Fixes #272
Fixes #236
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feat/account-level cross-workspace installations
Projects
None yet
1 participant