Skip to content

Correct usage of size parameter to WorkspaceClient.permission_migration.migrate_permissions #3710

Open
@JCZuurmond

Description

@JCZuurmond

Description

We use the WorkspaceClient.permission_migration.migrate_permissions to migrate permissions:

https://github.com/databrickslabs/ucx/blob/34b3d860b0786cad6f8db990d179cae74d1af998/src/databricks/labs/ucx/workspace_access/groups.py#L138C22-L143

We pass the batch_size variable to the size parameter when calling this method. Together with the while True it suggest that the API is paginated with each page having a size of 1000. However, according to the documentation size limits the amount of permissions that are migrated, it does NOT paginate:

https://github.com/databricks/databricks-sdk-py/blob/998a117c43a7bc901710d263a7a7ab0d66ae8b8c/databricks/sdk/service/iam.py#L3019-L3036

This introduces a bug for groups with above 1000 permission.

I expect that parameter should be removed together with the while-loop. However, I am not completely sure

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions