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

Handle legacy ACL DENY permission in group migration #1815

Merged
merged 2 commits into from
May 31, 2024
Merged

Conversation

nkvuong
Copy link
Contributor

@nkvuong nkvuong commented May 31, 2024

Changes

  • In our legacy table ACLs, there are DENY operations. These permissions are shown with DENIED prefix. Apply them correctly when applying permissions for group migrations

Linked issues

Resolves #1803

Tests

  • manually tested
  • added unit tests
  • added integration tests
  • verified on staging environment (screenshot attached)

@nkvuong nkvuong requested review from a team and asnare May 31, 2024 12:15
Copy link

codecov bot commented May 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.45%. Comparing base (dd30f52) to head (c6b6c50).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1815   +/-   ##
=======================================
  Coverage   89.45%   89.45%           
=======================================
  Files          95       95           
  Lines       11836    11839    +3     
  Branches     2072     2073    +1     
=======================================
+ Hits        10588    10591    +3     
  Misses        853      853           
  Partials      395      395           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nkvuong nkvuong enabled auto-merge May 31, 2024 12:21
@@ -135,6 +135,9 @@ def _set_owner_sql(self, object_type, object_key):
return f"ALTER {object_type} {escape_sql_identifier(object_key)} OWNER TO `{self.principal}`"

def _apply_grant_sql(self, action_type, object_type, object_key):
if "DENIED" in action_type:
action_type = action_type.replace("DENIED_", "")
return f"DENY `{action_type}` ON {object_type} {escape_sql_identifier(object_key)} TO `{self.principal}`"
Copy link
Contributor Author

@nkvuong nkvuong May 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to wrap the action type in backticks, because DENY SELECT throws an error. DENY `SELECT` works

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it's not a code comment? 😉 add, otherwise someone would remove backticks

@nfx nfx disabled auto-merge May 31, 2024 12:51
@nfx nfx merged commit a8e823f into main May 31, 2024
7 of 8 checks passed
@nfx nfx deleted the fix/handle_deny branch May 31, 2024 12:51
Copy link

❌ 181/182 passed, 2 flaky, 1 failed, 23 skipped, 3h36m44s total

❌ test_running_real_migrate_groups_job: databricks.labs.blueprint.parallel.ManyError: Detected 2 failures: Unknown: parse_logs: InternalError: verify group permissions('sdk-U6Ov', [AclItem(principal='0a330eb5-dd51-4d97-b6e4-c474356b1d5d', permission=), AclItem(principal='ucx_GnSbK', permission=)]) task failed: Couldn't find permission for scope sdk-U6Ov and group ucx_GnSbK (6m28.97s)
databricks.labs.blueprint.parallel.ManyError: Detected 2 failures: Unknown: parse_logs: <span class='ansi-red-fg'>InternalError</span>: verify group permissions('sdk-U6Ov', [AclItem(principal='0a330eb5-dd51-4d97-b6e4-c474356b1d5d', permission=<AclPermission.MANAGE: 'MANAGE'>), AclItem(principal='ucx_GnSbK', permission=<AclPermission.WRITE: 'WRITE'>)]) task failed: Couldn't find permission for scope sdk-U6Ov and group ucx_GnSbK
acl to be applied=AclPermission.WRITE
acl found in the object=None
Traceback (most recent call last):
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/blueprint/parallel.py", line 158, in inner
    return func(*args, **kwargs), None
           ^^^^^^^^^^^^^^^^^^^^^
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/secrets.py", line 124, in _verify_acls
    self._verify(scope_name, acl.principal, acl.permission)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/blueprint/limiter.py", line 65, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/secrets.py", line 114, in _verify
    raise ValueError(msg)
ValueError: Couldn't find permission for scope sdk-U6Ov and group ucx_GnSbK
acl to be applied=AclPermission.WRITE
acl found in the object=None, ValueError: Couldn't find permission for scope sdk-U6Ov and group ucx_GnSbK
[gw7] linux -- Python 3.10.14 /home/runner/work/ucx/ucx/.venv/bin/python
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added workspace user fixture: User(active=True, display_name='[email protected]', emails=[ComplexValue(display=None, primary=True, ref=None, type='work', value='[email protected]')], entitlements=[], external_id=None, groups=[], id='5239561294424098', name=Name(family_name=None, given_name='[email protected]'), roles=[], schemas=[<UserSchema.URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_USER: 'urn:ietf:params:scim:schemas:core:2.0:User'>, <UserSchema.URN_IETF_PARAMS_SCIM_SCHEMAS_EXTENSION_WORKSPACE_2_0_USER: 'urn:ietf:params:scim:schemas:extension:workspace:2.0:User'>], user_name='[email protected]')
13:10 INFO [databricks.labs.ucx.mixins.fixtures] Workspace group ucx_GnSbK: https://DATABRICKS_HOST#setting/accounts/groups/1026950790723644
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added workspace group fixture: Group(display_name='ucx_GnSbK', entitlements=[ComplexValue(display=None, primary=None, ref=None, type=None, value='allow-cluster-create')], external_id=None, groups=[], id='1026950790723644', members=[ComplexValue(display='[email protected]', primary=None, ref='Users/5239561294424098', type=None, value='5239561294424098')], meta=ResourceMeta(resource_type='WorkspaceGroup'), roles=[], schemas=[<GroupSchema.URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_GROUP: 'urn:ietf:params:scim:schemas:core:2.0:Group'>])
13:10 INFO [databricks.labs.ucx.mixins.fixtures] Account group ucx_GnSbK: https://accounts.CLOUD_ENVdatabricks.net/users/groups/839140198683877/members
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added account group fixture: Group(display_name='ucx_GnSbK', entitlements=[], external_id=None, groups=[], id='839140198683877', members=[ComplexValue(display='[email protected]', primary=None, ref='Users/5239561294424098', type=None, value='5239561294424098')], meta=None, roles=[], schemas=[<GroupSchema.URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_GROUP: 'urn:ietf:params:scim:schemas:core:2.0:Group'>])
13:10 INFO [databricks.labs.ucx.mixins.fixtures] Cluster policy: https://DATABRICKS_HOST#setting/clusters/cluster-policies/view/00137A276F4E7BE5
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added cluster policy fixture: CreatePolicyResponse(policy_id='00137A276F4E7BE5')
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added cluster_policy permissions fixture: 00137A276F4E7BE5 [group_name admins CAN_USE] -> [group_name ucx_GnSbK CAN_USE]
13:10 INFO [databricks.labs.ucx.mixins.fixtures] Schema hive_metastore.ucx_s7xb3: https://DATABRICKS_HOST/explore/data/hive_metastore/ucx_s7xb3
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added schema fixture: SchemaInfo(browse_only=None, catalog_name='hive_metastore', catalog_type=None, comment=None, created_at=None, created_by=None, effective_predictive_optimization_flag=None, enable_predictive_optimization=None, full_name='hive_metastore.ucx_s7xb3', metastore_id=None, name='ucx_s7xb3', owner=None, properties=None, schema_id=None, storage_location=None, storage_root=None, updated_at=None, updated_by=None)
13:10 INFO [databricks.labs.ucx.mixins.fixtures] Table hive_metastore.ucx_s7xb3.ucx_tymsc: https://DATABRICKS_HOST/explore/data/hive_metastore/ucx_s7xb3/ucx_tymsc
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added table fixture: TableInfo(access_point=None, browse_only=None, catalog_name='hive_metastore', columns=None, comment=None, created_at=None, created_by=None, data_access_configuration_id=None, data_source_format=<DataSourceFormat.DELTA: 'DELTA'>, deleted_at=None, delta_runtime_properties_kvpairs=None, effective_predictive_optimization_flag=None, enable_predictive_optimization=None, encryption_details=None, full_name='hive_metastore.ucx_s7xb3.ucx_tymsc', metastore_id=None, name='ucx_tymsc', owner=None, pipeline_id=None, properties={'RemoveAfter': '2024053114'}, row_filter=None, schema_name='ucx_s7xb3', sql_path=None, storage_credential_name=None, storage_location='dbfs:/user/hive/warehouse/ucx_s7xb3/ucx_tymsc', table_constraints=None, table_id=None, table_type=<TableType.MANAGED: 'MANAGED'>, updated_at=None, updated_by=None, view_definition=None, view_dependencies=None)
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added secret scope fixture: sdk-U6Ov
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added secret scope acl fixture: ('sdk-U6Ov', 'ucx_GnSbK')
13:10 INFO [databricks.labs.ucx.mixins.fixtures] Schema hive_metastore.ucx_sv3vf: https://DATABRICKS_HOST/explore/data/hive_metastore/ucx_sv3vf
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added schema fixture: SchemaInfo(browse_only=None, catalog_name='hive_metastore', catalog_type=None, comment=None, created_at=None, created_by=None, effective_predictive_optimization_flag=None, enable_predictive_optimization=None, full_name='hive_metastore.ucx_sv3vf', metastore_id=None, name='ucx_sv3vf', owner=None, properties=None, schema_id=None, storage_location=None, storage_root=None, updated_at=None, updated_by=None)
13:10 DEBUG [databricks.labs.ucx.install] Cannot find previous installation: Path (/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/config.yml) doesn't exist.
13:10 INFO [databricks.labs.ucx.install] Please answer a couple of questions to configure Unity Catalog migration
13:10 INFO [databricks.labs.ucx.installer.hms_lineage] HMS Lineage feature creates one system table named system.hms_to_uc_migration.table_access and helps in your migration process from HMS to UC by allowing you to programmatically query HMS lineage data.
13:10 INFO [databricks.labs.ucx.install] Fetching installations...
13:10 INFO [databricks.labs.ucx.installer.policy] Creating UCX cluster policy.
13:10 DEBUG [tests.integration.conftest] Waiting for clusters to start...
13:10 DEBUG [tests.integration.conftest] Waiting for clusters to start...
13:10 INFO [databricks.labs.ucx.install] Installing UCX v0.24.1+2220240531131036
13:10 INFO [databricks.labs.ucx.install] Creating ucx schemas...
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=remove-workspace-local-backup-groups
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-tables-in-mounts-experimental
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-groups
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-external-hiveserde-tables-in-place-experimental
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=scan-tables-in-mounts-experimental
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-data-reconciliation
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=failing
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-tables
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=experimental-workflow-linter
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=validate-groups-permissions
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=assessment
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-external-tables-ctas
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-groups-experimental
13:10 INFO [databricks.labs.ucx.install] Installation completed successfully! Please refer to the https://DATABRICKS_HOST/#workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/README for the next steps.
13:11 DEBUG [databricks.labs.ucx.workspace_access.manager] Crawling permissions
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.grants] fetching grants inventory
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.grants] crawling new batch for grants
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.tables] fetching tables inventory
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.tables] crawling new batch for tables
13:11 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.ucx_s7xb3] listing tables
13:11 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.ucx_s7xb3.ucx_tymsc] fetching table metadata
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.tables] found 1 new records for tables
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.udfs] fetching udfs inventory
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.udfs] crawling new batch for udfs
13:11 DEBUG [databricks.labs.ucx.hive_metastore.udfs] [hive_metastore.ucx_s7xb3] listing udfs
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.udfs] found 0 new records for udfs
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.grants] found 4 new records for grants
13:11 INFO [databricks.labs.ucx.workspace_access.manager] Starting to crawl permissions. Total tasks: 4
13:11 INFO [databricks.labs.ucx.workspace_access.manager] Total crawled permissions: 4
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.permissions] found 4 new records for permissions
13:11 INFO [databricks.labs.ucx.workspace_access.manager] Successfully saved the items to inventory table
13:11 INFO [databricks.labs.ucx.workspace_access.manager] Saved 4 to hive_metastore.ucx_sv3vf.permissions
13:11 DEBUG [databricks.labs.ucx.installer.workflows] starting migrate-groups job: https://DATABRICKS_HOST#job/548267022497868
13:16 INFO [databricks.labs.ucx.installer.workflows] ---------- REMOTE LOGS --------------
13:16 INFO [databricks.labs.ucx:verify_metastore_attached] UCX v0.24.1+2220240531131036 After job finishes, see debug logs at /Workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/logs/migrate-groups/run-187666581788229-0/verify_metastore_attached.log
13:16 DEBUG [databricks.sdk:verify_metastore_attached] GET /api/2.1/unity-catalog/current-metastore-assignment
< 200 OK
< {
<   "TEST_SCHEMA_catalog_name": "hive_metastore",
<   "metastore_id": "8952c1e3-b265-4adf-98c3-6f755e2e1453",
<   "workspace_id": 7342989205138882
< }
13:16 INFO [databricks.labs.ucx:rename_workspace_local_groups] UCX v0.24.1+2220240531131036 After job finishes, see debug logs at /Workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/logs/migrate-groups/run-187666581788229-0/rename_workspace_local_groups.log
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Listing workspace groups (resource_type=Group) with id,displayName,externalId,meta...
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,externalId,meta&startIndex=1&count=100
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "role.labs.tempo.write",
<       "externalId": "8d2db608-4ed1-49f2-ad5c-fe942be7a4e1",
<       "id": "22190446071900",
<       "meta": {
<         "resourceType": "Group"
<       }
<     },
<     "... (67 additional elements)"
<   ],
<   "itemsPerPage": 68,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 68
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,externalId,meta&startIndex=69&count=100
< 200 OK
< {
<   "itemsPerPage": 0,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 69,
<   "totalResults": 68
< }
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Found 57 Group
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Listing workspace groups (resource_type=WorkspaceGroup) with id,displayName,meta,externalId,members,roles,entitlements...
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,externalId,roles,entitlements&startIndex=1&count=100
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "role.labs.tempo.write",
<       "externalId": "8d2db608-4ed1-49f2-ad5c-fe942be7a4e1",
<       "id": "22190446071900",
<       "meta": {
<         "resourceType": "Group"
<       }
<     },
<     "... (67 additional elements)"
<   ],
<   "itemsPerPage": 68,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 68
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/379081955855274
< 200 OK
< {
<   "displayName": "old_WQCF",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "379081955855274",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/388564657107131
< 200 OK
< {
<   "displayName": "old_T82x",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "388564657107131",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/516957125287019
< 200 OK
< {
<   "displayName": "new_jgGy",
<   "groups": [],
<   "id": "516957125287019",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/584704751598745
< 200 OK
< {
<   "displayName": "old_jgGy",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "584704751598745",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/598807434611271
< 200 OK
< {
<   "displayName": "ucx_Gfcyv",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "598807434611271",
<   "members": [
<     {
<       "$ref": "Users/6952094221586954",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/721939748767527
< 200 OK
< {
<   "displayName": "new_T82x",
<   "groups": [],
<   "id": "721939748767527",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/966341689312134
< 200 OK
< {
<   "displayName": "ucx_G2Tkw",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "966341689312134",
<   "members": [
<     {
<       "$ref": "Users/936802939955145",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/997586718744956
< 200 OK
< {
<   "displayName": "new_WQCF",
<   "groups": [],
<   "id": "997586718744956",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/1026950790723644
< 200 OK
< {
<   "displayName": "ucx_GnSbK",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "1026950790723644",
<   "members": [
<     {
<       "$ref": "Users/5239561294424098",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,externalId,roles,entitlements&startIndex=69&count=100
< 200 OK
< {
<   "itemsPerPage": 0,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 69,
<   "totalResults": 68
< }
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Found 9 WorkspaceGroup
13:16 DEBUG [databricks.labs.ucx.framework.crawlers:rename_workspace_local_groups] [hive_metastore.ucx_sv3vf.groups] fetching groups inventory
13:16 DEBUG [databricks.labs.lsql.backends:rename_workspace_local_groups] [spark][fetch] SELECT * FROM hive_metastore.ucx_sv3vf.groups
13:16 WARNING [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Group ucx_GnSbK defined in configuration does not exist on the groups table. Consider checking if the group exist in the workspace or re-running the assessment.
13:16 DEBUG [databricks.labs.ucx.framework.crawlers:rename_workspace_local_groups] [hive_metastore.ucx_sv3vf.groups] crawling new batch for groups
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Listing workspace groups (resource_type=WorkspaceGroup) with id,displayName,meta,externalId,members,roles,entitlements...
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,externalId,roles,entitlements&startIndex=1&count=100
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "role.labs.tempo.write",
<       "externalId": "8d2db608-4ed1-49f2-ad5c-fe942be7a4e1",
<       "id": "22190446071900",
<       "meta": {
<         "resourceType": "Group"
<       }
<     },
<     "... (67 additional elements)"
<   ],
<   "itemsPerPage": 68,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 68
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/379081955855274
< 200 OK
< {
<   "displayName": "old_WQCF",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "379081955855274",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/388564657107131
< 200 OK
< {
<   "displayName": "old_T82x",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "388564657107131",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/516957125287019
< 200 OK
< {
<   "displayName": "new_jgGy",
<   "groups": [],
<   "id": "516957125287019",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/584704751598745
< 200 OK
< {
<   "displayName": "old_jgGy",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "584704751598745",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/598807434611271
< 200 OK
< {
<   "displayName": "ucx_Gfcyv",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "598807434611271",
<   "members": [
<     {
<       "$ref": "Users/6952094221586954",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/721939748767527
< 200 OK
< {
<   "displayName": "new_T82x",
<   "groups": [],
<   "id": "721939748767527",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/966341689312134
< 200 OK
< {
<   "displayName": "ucx_G2Tkw",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "966341689312134",
<   "members": [
<     {
<       "$ref": "Users/936802939955145",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/997586718744956
< 200 OK
< {
<   "displayName": "new_WQCF",
<   "groups": [],
<   "id": "997586718744956",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/1026950790723644
< 200 OK
< {
<   "displayName": "ucx_GnSbK",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "1026950790723644",
<   "members": [
<     {
<       "$ref": "Users/5239561294424098",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,externalId,roles,entitlements&startIndex=69&count=100
< 200 OK
< {
<   "itemsPerPage": 0,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 69,
<   "totalResults": 68
< }
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Found 9 WorkspaceGroup
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Listing account groups with id,displayName,externalId...
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/account/scim/v2/Groups?attributes=id,displayName,externalId
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "ucx_EMQk",
<       "id": "747915403144"
<     },
<     {
<       "displayName": "rename-LFcF-ucx_GlGZb",
<       "id": "839447153138"
<     },
<     "... (2297 additional elements)"
<   ],
<   "itemsPerPage": 2299,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 2299
< }
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Found 2298 account groups
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Group listing provided, a subset of all groups will be migrated
13:16 DEBUG [databricks.labs.ucx.framework.crawlers:rename_workspace_local_groups] [hive_metastore.ucx_sv3vf.groups] found 1 new records for groups
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Renaming: ucx_GnSbK -> rename-r27Z-ucx_GnSbK
13:16 DEBUG [databricks.labs.blueprint.parallel:rename_workspace_local_groups] Starting 1 tasks in 8 threads
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] PATCH /api/2.0/preview/scim/v2/Groups/1026950790723644
> {
>   "Operations": [
>     {
>       "op": "replace",
>       "path": "displayName",
>       "value": "**REDACTED**"
>     }
>   ]
> }
< 200 OK
< {
<   "displayName": "rename-r27Z-ucx_GnSbK",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "1026950790723644",
<   "members": [
<     {
<       "$ref": "Users/5239561294424098",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 INFO [databricks.labs.blueprint.parallel:rename_workspace_local_groups] rename groups in the workspace 1/1, rps: 0.345/sec
13:16 INFO [databricks.labs.blueprint.parallel:rename_workspace_local_groups] Finished 'rename groups in the workspace' tasks: 100% results available (1/1). Took 0:00:02.905146
13:16 INFO [databricks.labs.ucx:reflect_account_groups_on_workspace] UCX v0.24.1+2220240531131036 After job finishes, see debug logs at /Workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/logs/migrate-groups/run-187666581788229-0/reflect_account_groups_on_workspace.log
13:16 INFO [databricks.labs.ucx.workspace_access.groups:reflect_account_groups_on_workspace] Listing account groups with id,displayName,externalId...
13:16 DEBUG [databricks.sdk:reflect_account_groups_on_workspace] GET /api/2.0/account/scim/v2/Groups?attributes=id,displayName,externalId
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "ucx_EMQk",
<       "id": "747915403144"
<     },
<     {
<       "displayName": "rename-LFcF-ucx_GlGZb",
<       "id": "839447153138"
<     },
<     "... (2297 additional elements)"
<   ],
<   "itemsPerPage": 2299,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 2299
< }
13:16 INFO [databricks.labs.ucx.workspace_access.groups:reflect_account_groups_on_workspace] Found 2298 account groups
13:16 INFO [databricks.labs.ucx.workspace_access.groups:reflect_account_groups_on_workspace] Listing workspace groups (resource_type=Group) with id,displayName,externalId,meta...
13:16 DEBUG [databricks.sdk:reflect_account_groups_on_workspace] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,externalId,meta&startIndex=1&count=100
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "role.labs.tempo.write",
<       "externalId": "8d2db608-4ed1-49f2-ad5c-fe942be7a4e1",
<       "id": "22190446071900",
<       "meta": {
<         "resourceType": "Group"
<       }
<     },
<     "... (61 additional elements)"
<   ],
<   "itemsPerPage": 62,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 62
< }
13:16 DEBUG [databricks.sdk:reflect_account_groups_on_workspace] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,externalId,meta&startIndex=63&count=100
< 200 OK
< {
<   "itemsPerPage": 0,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 63,
<   "totalResults": 62
< }
13:16 INFO [databricks.labs.ucx.workspace_access.groups:reflect_account_groups_on_workspace] Found 57 Group
13:16 DEBUG [databricks.labs.ucx.framework.crawlers:reflect_account_groups_on_workspace] [hive_metastore.ucx_sv3vf.groups] fetching groups inventory
13:16 DEBUG [databricks.labs.lsql.backends:reflect_account_groups_on_workspace] [spark][fetch] SELECT * FROM hive_metastore.ucx_sv3vf.groups
13:16 DEBUG [databricks.labs.blueprint.parallel:reflect_account_groups_on_workspace] Starting 1 tasks in 8 threads
13:16 DEBUG [databricks.sdk:reflect_account_groups_on_workspace] PUT /api/2.0/preview/permissionassignments/principals/839140198683877
> [raw stream]
< 200 OK
< {
<   "permissions": [
<     "USER"
<   ],
<   "principal": {
<     "display_name": "ucx_GnSbK",
<     "group_name": "ucx_GnSbK",
<     "principal_id": 839140198683877
<   }
< }
13:16 INFO [databricks.labs.blueprint.parallel:reflect_account_groups_on_workspace] reflect account groups on this workspace 1/1, rps: 1.516/sec
13:16 INFO [databricks.labs.blueprint.parallel:reflect_account_groups_on_workspace] Finished 'reflect account groups on this workspace' tasks: 100% results available (1/1). Took 0:00:00.670360
13:16 INFO [databricks.labs.ucx:apply_permissions_to_account_groups] UCX v0.24.1+2220240531131036 After job finishes, see debug logs at /Workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/logs/migrate-groups/run-187666581788229-0/apply_permissions_to_account_groups.log
13:16 DEBUG [databricks.labs.ucx.framework.crawlers:apply_permissions_to_account_groups] [hive_metastore.ucx_sv3vf.groups] fetching groups inventory
13:16 DEBUG [databricks.labs.lsql.backends:apply_permissions_to_account_groups] [spark][fetch] SELECT * FROM hive_metastore.ucx_sv3vf.groups
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,roles,entitlements&startIndex=1&count=100
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "role.labs.tempo.write",
<       "id": "22190446071900",
<       "meta": {
<         "resourceType": "Group"
<       }
<     },
<     "... (62 additional elements)"
<   ],
<   "itemsPerPage": 63,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 63
< }
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,roles,entitlements&startIndex=64&count=100
< 200 OK
< {
<   "itemsPerPage": 0,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 64,
<   "totalResults": 63
< }
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Loading inventory table hive_metastore.ucx_sv3vf.permissions
13:16 DEBUG [databricks.labs.lsql.backends:apply_permissions_to_account_groups] [spark][fetch] SELECT COUNT(*) as cnt FROM hive_metastore.ucx_sv3vf.permissions
13:16 DEBUG [databricks.labs.lsql.backends:apply_permissions_to_account_groups] [spark][fetch] SELECT object_id, object_type, raw FROM hive_metastore.ucx_sv3vf.permissions
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Applying the permissions to account groups. Total groups to apply permissions: 1. Total permissions found: 4
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Total tasks for TABLE: 1
13:16 DEBUG [databricks.labs.ucx.workspace_access.generic:apply_permissions_to_account_groups] Skipping AccessControlResponse(all_permissions=[Permission(inherited=True, inherited_from_object=['/cluster-policies/cluster-policies'], permission_level=<PermissionLevel.CAN_USE: 'CAN_USE'>)], display_name=None, group_name='admins', service_principal_name=None, user_name=None) for cluster-policy//cluster-policies/00137A276F4E7BE5 because it is not in scope
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Total tasks for cluster-policies: 1
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Total tasks for secrets: 1
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Starting to apply permissions on account groups. Total tasks: 3
13:16 DEBUG [databricks.labs.blueprint.parallel:apply_permissions_to_account_groups] Starting 3 tasks in 8 threads
13:16 DEBUG [databricks.labs.lsql.backends:apply_permissions_to_account_groups] [spark][execute] GRANT SELECT ON TABLE hive_metastore.ucx_s7xb3.ucx_tymsc TO `ucx_GnSbK`
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] POST /api/2.0/secrets/acls/put
> {
>   "permission": "MANAGE",
>   "principal": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d",
>   "scope": "sdk-U6Ov"
> }
< 200 OK
< {}
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] GET /api/2.0/secrets/acls/list?scope=sdk-U6Ov
< 200 OK
< {
<   "items": [
<     {
<       "permission": "MANAGE",
<       "principal": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     {
<       "permission": "WRITE",
<       "principal": "rename-r27Z-ucx_GnSbK"
<     }
<   ]
< }
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] POST /api/2.0/secrets/acls/put
> {
>   "permission": "WRITE",
>   "principal": "ucx_GnSbK",
>   "scope": "sdk-U6Ov"
> }
< 200 OK
< {}
13:16 DEBUG [databricks.labs.lsql.backends:apply_permissions_to_account_groups] [spark][fetch] SHOW GRANTS ON TABLE hive_metastore.ucx_s7xb3.ucx_tymsc
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] GET /api/2.0/secrets/acls/list?scope=sdk-U6Ov
< 200 OK
< {
<   "items": [
<     {
<       "permission": "MANAGE",
<       "principal": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     {
<       "permission": "WRITE",
<       "principal": "ucx_GnSbK"
<     }
<   ]
< }
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] PATCH /api/2.0/permissions/cluster-policies/00137A276F4E7BE5
> {
>   "access_control_list": [
>     {
>       "group_name": "ucx_GnSbK",
>       "permission_level": "CAN_USE"
>     }
>   ]
> }
< 200 OK
< {
<   "access_control_list": [
<     {
<       "all_permissions": [
<         {
<           "inherited": false,
<           "permission_level": "CAN_USE"
<         }
<       ],
<       "display_name": "labs-account-admin-identity",
<       "service_principal_name": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     "... (3 additional elements)"
<   ],
<   "object_id": "/cluster-policies/00137A276F4E7BE5",
<   "object_type": "cluster-policy"
< }
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] GET /api/2.0/permissions/cluster-policies/00137A276F4E7BE5
< 200 OK
< {
<   "access_control_list": [
<     {
<       "all_permissions": [
<         {
<           "inherited": false,
<           "permission_level": "CAN_USE"
<         }
<       ],
<       "display_name": "labs-account-admin-identity",
<       "service_principal_name": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     "... (3 additional elements)"
<   ],
<   "object_id": "/cluster-policies/00137A276F4E7BE5",
<   "object_type": "cluster-policy"
< }
13:16 INFO [databricks.labs.blueprint.parallel:apply_permissions_to_account_groups] apply account group permissions 3/3, rps: 4.942/sec
13:16 INFO [databricks.labs.blueprint.parallel:apply_permissions_to_account_groups] Finished 'apply account group permissions' tasks: 100% results available (3/3). Took 0:00:00.611802
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Permissions were applied
13:16 INFO [databricks.labs.ucx:validate_groups_permissions] UCX v0.24.1+2220240531131036 After job finishes, see debug logs at /Workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/logs/migrate-groups/run-187666581788229-0/validate_groups_permissions.log
13:16 DEBUG [databricks.sdk:validate_groups_permissions] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,roles,entitlements&startIndex=1&count=100
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "role.labs.tempo.write",
<       "id": "22190446071900",
<       "meta": {
<         "resourceType": "Group"
<       }
<     },
<     "... (62 additional elements)"
<   ],
<   "itemsPerPage": 63,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 63
< }
13:16 DEBUG [databricks.sdk:validate_groups_permissions] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,roles,entitlements&startIndex=64&count=100
< 200 OK
< {
<   "itemsPerPage": 0,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 64,
<   "totalResults": 63
< }
13:16 INFO [databricks.labs.ucx.workspace_access.manager:validate_groups_permissions] Loading inventory table hive_metastore.ucx_sv3vf.permissions
13:16 DEBUG [databricks.labs.lsql.backends:validate_groups_permissions] [spark][fetch] SELECT COUNT(*) as cnt FROM hive_metastore.ucx_sv3vf.permissions
13:16 DEBUG [databricks.labs.lsql.backends:validate_groups_permissions] [spark][fetch] SELECT object_id, object_type, raw FROM hive_metastore.ucx_sv3vf.permissions
13:16 INFO [databricks.labs.ucx.workspace_access.manager:validate_groups_permissions] Total permissions found: 4
13:16 INFO [databricks.labs.ucx.workspace_access.manager:validate_groups_permissions] Total tasks for TABLE: 2
13:16 INFO [databricks.labs.ucx.workspace_access.manager:validate_groups_permissions] Total tasks for cluster-policies: 1
13:16 INFO [databricks.labs.ucx.workspace_access.manager:validate_groups_permissions] Total tasks for secrets: 1
13:16 INFO [databricks.labs.ucx.workspace_access.manager:validate_groups_permissions] Starting to verify permissions. Total tasks: 4
13:16 DEBUG [databricks.labs.blueprint.parallel:validate_groups_permissions] Starting 4 tasks in 8 threads
13:16 DEBUG [databricks.labs.lsql.backends:validate_groups_permissions] [spark][fetch] SHOW GRANTS ON TABLE hive_metastore.ucx_s7xb3.ucx_tymsc
13:16 DEBUG [databricks.labs.lsql.backends:validate_groups_permissions] [spark][fetch] SHOW GRANTS ON TABLE hive_metastore.ucx_s7xb3.ucx_tymsc
13:16 DEBUG [databricks.sdk:validate_groups_permissions] GET /api/2.0/secrets/acls/list?scope=sdk-U6Ov
< 200 OK
< {
<   "items": [
<     {
<       "permission": "MANAGE",
<       "principal": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     {
<       "permission": "WRITE",
<       "principal": "rename-r27Z-ucx_GnSbK"
<     }
<   ]
< }
13:16 DEBUG [databricks.sdk:validate_groups_permissions] GET /api/2.0/secrets/acls/list?scope=sdk-U6Ov
< 200 OK
< {
<   "items": [
<     {
<       "permission": "MANAGE",
<       "principal": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     {
<       "permission": "WRITE",
<       "principal": "rename-r27Z-ucx_GnSbK"
<     }
<   ]
< }
13:16 ERROR [databricks.labs.blueprint.parallel:validate_groups_permissions] verify group permissions('sdk-U6Ov', [AclItem(principal='0a330eb5-dd51-4d97-b6e4-c474356b1d5d', permission=<AclPermission.MANAGE: 'MANAGE'>), AclItem(principal='ucx_GnSbK', permission=<AclPermission.WRITE: 'WRITE'>)]) task failed: Couldn't find permission for scope sdk-U6Ov and group ucx_GnSbK
acl to be applied=AclPermission.WRITE
acl found in the object=None
Traceback (most recent call last):
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/blueprint/parallel.py", line 158, in inner
    return func(*args, **kwargs), None
           ^^^^^^^^^^^^^^^^^^^^^
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/secrets.py", line 124, in _verify_acls
    self._verify(scope_name, acl.principal, acl.permission)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/blueprint/limiter.py", line 65, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/secrets.py", line 114, in _verify
    raise ValueError(msg)
ValueError: Couldn't find permission for scope sdk-U6Ov and group ucx_GnSbK
acl to be applied=AclPermission.WRITE
acl found in the object=None

13:16 DEBUG [databricks.sdk:validate_groups_permissions] GET /api/2.0/permissions/cluster-policies/00137A276F4E7BE5
< 200 OK
< {
<   "access_control_list": [
<     {
<       "all_permissions": [
<         {
<           "inherited": false,
<           "permission_level": "CAN_USE"
<         }
<       ],
<       "display_name": "labs-account-admin-identity",
<       "service_principal_name": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     "... (3 additional elements)"
<   ],
<   "object_id": "/cluster-policies/00137A276F4E7BE5",
<   "object_type": "cluster-policy"
< }
13:16 INFO [databricks.labs.blueprint.parallel:validate_groups_permissions] verify group permissions 4/4, rps: 19.300/sec
13:16 WARNING [databricks.labs.blueprint.parallel:validate_groups_permissions] Some 'verify group permissions' tasks failed: 75% results available (3/4). Took 0:00:00.216298
13:16 ERROR [databricks.labs.ucx:validate_groups_permissions] Execute `databricks workspace export //Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/logs/migrate-groups/run-187666581788229-0/validate_groups_permissions.log` locally to troubleshoot with more details. Couldn't find permission for scope sdk-U6Ov and group ucx_GnSbK
acl to be applied=AclPermission.WRITE
acl found in the object=None

13:16 DEBUG [databricks:validate_groups_permissions] Task crash details
Traceback (most recent call last):
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/runtime.py", line 96, in trigger
    current_task(ctx)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/workflows.py", line 50, in validate_groups_permissions
    ctx.permission_manager.verify_group_permissions()
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/manager.py", line 117, in verify_group_permissions
    Threads.strict("verify group permissions", verifier_tasks)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/blueprint/parallel.py", line 62, in strict
    raise errs[0]
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/blueprint/parallel.py", line 158, in inner
    return func(*args, **kwargs), None
           ^^^^^^^^^^^^^^^^^^^^^
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/secrets.py", line 124, in _verify_acls
    self._verify(scope_name, acl.principal, acl.permission)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/blueprint/limiter.py", line 65, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/secrets.py", line 114, in _verify
    raise ValueError(msg)
ValueError: Couldn't find permission for scope sdk-U6Ov and group ucx_GnSbK
acl to be applied=AclPermission.WRITE
acl found in the object=None

13:16 INFO [databricks.labs.ucx.installer.workflows] ---------- END REMOTE LOGS ----------
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added workspace user fixture: User(active=True, display_name='[email protected]', emails=[ComplexValue(display=None, primary=True, ref=None, type='work', value='[email protected]')], entitlements=[], external_id=None, groups=[], id='5239561294424098', name=Name(family_name=None, given_name='[email protected]'), roles=[], schemas=[<UserSchema.URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_USER: 'urn:ietf:params:scim:schemas:core:2.0:User'>, <UserSchema.URN_IETF_PARAMS_SCIM_SCHEMAS_EXTENSION_WORKSPACE_2_0_USER: 'urn:ietf:params:scim:schemas:extension:workspace:2.0:User'>], user_name='[email protected]')
13:10 INFO [databricks.labs.ucx.mixins.fixtures] Workspace group ucx_GnSbK: https://DATABRICKS_HOST#setting/accounts/groups/1026950790723644
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added workspace group fixture: Group(display_name='ucx_GnSbK', entitlements=[ComplexValue(display=None, primary=None, ref=None, type=None, value='allow-cluster-create')], external_id=None, groups=[], id='1026950790723644', members=[ComplexValue(display='[email protected]', primary=None, ref='Users/5239561294424098', type=None, value='5239561294424098')], meta=ResourceMeta(resource_type='WorkspaceGroup'), roles=[], schemas=[<GroupSchema.URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_GROUP: 'urn:ietf:params:scim:schemas:core:2.0:Group'>])
13:10 INFO [databricks.labs.ucx.mixins.fixtures] Account group ucx_GnSbK: https://accounts.CLOUD_ENVdatabricks.net/users/groups/839140198683877/members
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added account group fixture: Group(display_name='ucx_GnSbK', entitlements=[], external_id=None, groups=[], id='839140198683877', members=[ComplexValue(display='[email protected]', primary=None, ref='Users/5239561294424098', type=None, value='5239561294424098')], meta=None, roles=[], schemas=[<GroupSchema.URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_GROUP: 'urn:ietf:params:scim:schemas:core:2.0:Group'>])
13:10 INFO [databricks.labs.ucx.mixins.fixtures] Cluster policy: https://DATABRICKS_HOST#setting/clusters/cluster-policies/view/00137A276F4E7BE5
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added cluster policy fixture: CreatePolicyResponse(policy_id='00137A276F4E7BE5')
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added cluster_policy permissions fixture: 00137A276F4E7BE5 [group_name admins CAN_USE] -> [group_name ucx_GnSbK CAN_USE]
13:10 INFO [databricks.labs.ucx.mixins.fixtures] Schema hive_metastore.ucx_s7xb3: https://DATABRICKS_HOST/explore/data/hive_metastore/ucx_s7xb3
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added schema fixture: SchemaInfo(browse_only=None, catalog_name='hive_metastore', catalog_type=None, comment=None, created_at=None, created_by=None, effective_predictive_optimization_flag=None, enable_predictive_optimization=None, full_name='hive_metastore.ucx_s7xb3', metastore_id=None, name='ucx_s7xb3', owner=None, properties=None, schema_id=None, storage_location=None, storage_root=None, updated_at=None, updated_by=None)
13:10 INFO [databricks.labs.ucx.mixins.fixtures] Table hive_metastore.ucx_s7xb3.ucx_tymsc: https://DATABRICKS_HOST/explore/data/hive_metastore/ucx_s7xb3/ucx_tymsc
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added table fixture: TableInfo(access_point=None, browse_only=None, catalog_name='hive_metastore', columns=None, comment=None, created_at=None, created_by=None, data_access_configuration_id=None, data_source_format=<DataSourceFormat.DELTA: 'DELTA'>, deleted_at=None, delta_runtime_properties_kvpairs=None, effective_predictive_optimization_flag=None, enable_predictive_optimization=None, encryption_details=None, full_name='hive_metastore.ucx_s7xb3.ucx_tymsc', metastore_id=None, name='ucx_tymsc', owner=None, pipeline_id=None, properties={'RemoveAfter': '2024053114'}, row_filter=None, schema_name='ucx_s7xb3', sql_path=None, storage_credential_name=None, storage_location='dbfs:/user/hive/warehouse/ucx_s7xb3/ucx_tymsc', table_constraints=None, table_id=None, table_type=<TableType.MANAGED: 'MANAGED'>, updated_at=None, updated_by=None, view_definition=None, view_dependencies=None)
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added secret scope fixture: sdk-U6Ov
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added secret scope acl fixture: ('sdk-U6Ov', 'ucx_GnSbK')
13:10 INFO [databricks.labs.ucx.mixins.fixtures] Schema hive_metastore.ucx_sv3vf: https://DATABRICKS_HOST/explore/data/hive_metastore/ucx_sv3vf
13:10 DEBUG [databricks.labs.ucx.mixins.fixtures] added schema fixture: SchemaInfo(browse_only=None, catalog_name='hive_metastore', catalog_type=None, comment=None, created_at=None, created_by=None, effective_predictive_optimization_flag=None, enable_predictive_optimization=None, full_name='hive_metastore.ucx_sv3vf', metastore_id=None, name='ucx_sv3vf', owner=None, properties=None, schema_id=None, storage_location=None, storage_root=None, updated_at=None, updated_by=None)
13:10 DEBUG [databricks.labs.ucx.install] Cannot find previous installation: Path (/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/config.yml) doesn't exist.
13:10 INFO [databricks.labs.ucx.install] Please answer a couple of questions to configure Unity Catalog migration
13:10 INFO [databricks.labs.ucx.installer.hms_lineage] HMS Lineage feature creates one system table named system.hms_to_uc_migration.table_access and helps in your migration process from HMS to UC by allowing you to programmatically query HMS lineage data.
13:10 INFO [databricks.labs.ucx.install] Fetching installations...
13:10 INFO [databricks.labs.ucx.installer.policy] Creating UCX cluster policy.
13:10 DEBUG [tests.integration.conftest] Waiting for clusters to start...
13:10 DEBUG [tests.integration.conftest] Waiting for clusters to start...
13:10 INFO [databricks.labs.ucx.install] Installing UCX v0.24.1+2220240531131036
13:10 INFO [databricks.labs.ucx.install] Creating ucx schemas...
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=remove-workspace-local-backup-groups
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-tables-in-mounts-experimental
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-groups
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-external-hiveserde-tables-in-place-experimental
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=scan-tables-in-mounts-experimental
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-data-reconciliation
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=failing
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-tables
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=experimental-workflow-linter
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=validate-groups-permissions
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=assessment
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-external-tables-ctas
13:10 INFO [databricks.labs.ucx.installer.workflows] Creating new job configuration for step=migrate-groups-experimental
13:10 INFO [databricks.labs.ucx.install] Installation completed successfully! Please refer to the https://DATABRICKS_HOST/#workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/README for the next steps.
13:11 DEBUG [databricks.labs.ucx.workspace_access.manager] Crawling permissions
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.grants] fetching grants inventory
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.grants] crawling new batch for grants
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.tables] fetching tables inventory
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.tables] crawling new batch for tables
13:11 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.ucx_s7xb3] listing tables
13:11 DEBUG [databricks.labs.ucx.hive_metastore.tables] [hive_metastore.ucx_s7xb3.ucx_tymsc] fetching table metadata
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.tables] found 1 new records for tables
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.udfs] fetching udfs inventory
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.udfs] crawling new batch for udfs
13:11 DEBUG [databricks.labs.ucx.hive_metastore.udfs] [hive_metastore.ucx_s7xb3] listing udfs
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.udfs] found 0 new records for udfs
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.grants] found 4 new records for grants
13:11 INFO [databricks.labs.ucx.workspace_access.manager] Starting to crawl permissions. Total tasks: 4
13:11 INFO [databricks.labs.ucx.workspace_access.manager] Total crawled permissions: 4
13:11 DEBUG [databricks.labs.ucx.framework.crawlers] [hive_metastore.ucx_sv3vf.permissions] found 4 new records for permissions
13:11 INFO [databricks.labs.ucx.workspace_access.manager] Successfully saved the items to inventory table
13:11 INFO [databricks.labs.ucx.workspace_access.manager] Saved 4 to hive_metastore.ucx_sv3vf.permissions
13:11 DEBUG [databricks.labs.ucx.installer.workflows] starting migrate-groups job: https://DATABRICKS_HOST#job/548267022497868
13:16 INFO [databricks.labs.ucx.installer.workflows] ---------- REMOTE LOGS --------------
13:16 INFO [databricks.labs.ucx:verify_metastore_attached] UCX v0.24.1+2220240531131036 After job finishes, see debug logs at /Workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/logs/migrate-groups/run-187666581788229-0/verify_metastore_attached.log
13:16 DEBUG [databricks.sdk:verify_metastore_attached] GET /api/2.1/unity-catalog/current-metastore-assignment
< 200 OK
< {
<   "TEST_SCHEMA_catalog_name": "hive_metastore",
<   "metastore_id": "8952c1e3-b265-4adf-98c3-6f755e2e1453",
<   "workspace_id": 7342989205138882
< }
13:16 INFO [databricks.labs.ucx:rename_workspace_local_groups] UCX v0.24.1+2220240531131036 After job finishes, see debug logs at /Workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/logs/migrate-groups/run-187666581788229-0/rename_workspace_local_groups.log
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Listing workspace groups (resource_type=Group) with id,displayName,externalId,meta...
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,externalId,meta&startIndex=1&count=100
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "role.labs.tempo.write",
<       "externalId": "8d2db608-4ed1-49f2-ad5c-fe942be7a4e1",
<       "id": "22190446071900",
<       "meta": {
<         "resourceType": "Group"
<       }
<     },
<     "... (67 additional elements)"
<   ],
<   "itemsPerPage": 68,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 68
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,externalId,meta&startIndex=69&count=100
< 200 OK
< {
<   "itemsPerPage": 0,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 69,
<   "totalResults": 68
< }
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Found 57 Group
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Listing workspace groups (resource_type=WorkspaceGroup) with id,displayName,meta,externalId,members,roles,entitlements...
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,externalId,roles,entitlements&startIndex=1&count=100
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "role.labs.tempo.write",
<       "externalId": "8d2db608-4ed1-49f2-ad5c-fe942be7a4e1",
<       "id": "22190446071900",
<       "meta": {
<         "resourceType": "Group"
<       }
<     },
<     "... (67 additional elements)"
<   ],
<   "itemsPerPage": 68,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 68
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/379081955855274
< 200 OK
< {
<   "displayName": "old_WQCF",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "379081955855274",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/388564657107131
< 200 OK
< {
<   "displayName": "old_T82x",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "388564657107131",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/516957125287019
< 200 OK
< {
<   "displayName": "new_jgGy",
<   "groups": [],
<   "id": "516957125287019",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/584704751598745
< 200 OK
< {
<   "displayName": "old_jgGy",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "584704751598745",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/598807434611271
< 200 OK
< {
<   "displayName": "ucx_Gfcyv",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "598807434611271",
<   "members": [
<     {
<       "$ref": "Users/6952094221586954",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/721939748767527
< 200 OK
< {
<   "displayName": "new_T82x",
<   "groups": [],
<   "id": "721939748767527",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/966341689312134
< 200 OK
< {
<   "displayName": "ucx_G2Tkw",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "966341689312134",
<   "members": [
<     {
<       "$ref": "Users/936802939955145",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/997586718744956
< 200 OK
< {
<   "displayName": "new_WQCF",
<   "groups": [],
<   "id": "997586718744956",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/1026950790723644
< 200 OK
< {
<   "displayName": "ucx_GnSbK",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "1026950790723644",
<   "members": [
<     {
<       "$ref": "Users/5239561294424098",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,externalId,roles,entitlements&startIndex=69&count=100
< 200 OK
< {
<   "itemsPerPage": 0,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 69,
<   "totalResults": 68
< }
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Found 9 WorkspaceGroup
13:16 DEBUG [databricks.labs.ucx.framework.crawlers:rename_workspace_local_groups] [hive_metastore.ucx_sv3vf.groups] fetching groups inventory
13:16 DEBUG [databricks.labs.lsql.backends:rename_workspace_local_groups] [spark][fetch] SELECT * FROM hive_metastore.ucx_sv3vf.groups
13:16 WARNING [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Group ucx_GnSbK defined in configuration does not exist on the groups table. Consider checking if the group exist in the workspace or re-running the assessment.
13:16 DEBUG [databricks.labs.ucx.framework.crawlers:rename_workspace_local_groups] [hive_metastore.ucx_sv3vf.groups] crawling new batch for groups
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Listing workspace groups (resource_type=WorkspaceGroup) with id,displayName,meta,externalId,members,roles,entitlements...
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,externalId,roles,entitlements&startIndex=1&count=100
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "role.labs.tempo.write",
<       "externalId": "8d2db608-4ed1-49f2-ad5c-fe942be7a4e1",
<       "id": "22190446071900",
<       "meta": {
<         "resourceType": "Group"
<       }
<     },
<     "... (67 additional elements)"
<   ],
<   "itemsPerPage": 68,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 68
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/379081955855274
< 200 OK
< {
<   "displayName": "old_WQCF",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "379081955855274",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/388564657107131
< 200 OK
< {
<   "displayName": "old_T82x",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "388564657107131",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/516957125287019
< 200 OK
< {
<   "displayName": "new_jgGy",
<   "groups": [],
<   "id": "516957125287019",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/584704751598745
< 200 OK
< {
<   "displayName": "old_jgGy",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "584704751598745",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/598807434611271
< 200 OK
< {
<   "displayName": "ucx_Gfcyv",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "598807434611271",
<   "members": [
<     {
<       "$ref": "Users/6952094221586954",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/721939748767527
< 200 OK
< {
<   "displayName": "new_T82x",
<   "groups": [],
<   "id": "721939748767527",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/966341689312134
< 200 OK
< {
<   "displayName": "ucx_G2Tkw",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "966341689312134",
<   "members": [
<     {
<       "$ref": "Users/936802939955145",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/997586718744956
< 200 OK
< {
<   "displayName": "new_WQCF",
<   "groups": [],
<   "id": "997586718744956",
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups/1026950790723644
< 200 OK
< {
<   "displayName": "ucx_GnSbK",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "1026950790723644",
<   "members": [
<     {
<       "$ref": "Users/5239561294424098",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,externalId,roles,entitlements&startIndex=69&count=100
< 200 OK
< {
<   "itemsPerPage": 0,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 69,
<   "totalResults": 68
< }
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Found 9 WorkspaceGroup
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Listing account groups with id,displayName,externalId...
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] GET /api/2.0/account/scim/v2/Groups?attributes=id,displayName,externalId
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "ucx_EMQk",
<       "id": "747915403144"
<     },
<     {
<       "displayName": "rename-LFcF-ucx_GlGZb",
<       "id": "839447153138"
<     },
<     "... (2297 additional elements)"
<   ],
<   "itemsPerPage": 2299,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 2299
< }
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Found 2298 account groups
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Group listing provided, a subset of all groups will be migrated
13:16 DEBUG [databricks.labs.ucx.framework.crawlers:rename_workspace_local_groups] [hive_metastore.ucx_sv3vf.groups] found 1 new records for groups
13:16 INFO [databricks.labs.ucx.workspace_access.groups:rename_workspace_local_groups] Renaming: ucx_GnSbK -> rename-r27Z-ucx_GnSbK
13:16 DEBUG [databricks.labs.blueprint.parallel:rename_workspace_local_groups] Starting 1 tasks in 8 threads
13:16 DEBUG [databricks.sdk:rename_workspace_local_groups] PATCH /api/2.0/preview/scim/v2/Groups/1026950790723644
> {
>   "Operations": [
>     {
>       "op": "replace",
>       "path": "displayName",
>       "value": "**REDACTED**"
>     }
>   ]
> }
< 200 OK
< {
<   "displayName": "rename-r27Z-ucx_GnSbK",
<   "entitlements": [
<     {
<       "value": "**REDACTED**"
<     }
<   ],
<   "groups": [],
<   "id": "1026950790723644",
<   "members": [
<     {
<       "$ref": "Users/5239561294424098",
<       "display": "[email protected]",
<       "value": "**REDACTED**"
<     }
<   ],
<   "meta": {
<     "resourceType": "WorkspaceGroup"
<   },
<   "schemas": [
<     "urn:ietf:params:scim:schemas:core:2.0:Group"
<   ]
< }
13:16 INFO [databricks.labs.blueprint.parallel:rename_workspace_local_groups] rename groups in the workspace 1/1, rps: 0.345/sec
13:16 INFO [databricks.labs.blueprint.parallel:rename_workspace_local_groups] Finished 'rename groups in the workspace' tasks: 100% results available (1/1). Took 0:00:02.905146
13:16 INFO [databricks.labs.ucx:reflect_account_groups_on_workspace] UCX v0.24.1+2220240531131036 After job finishes, see debug logs at /Workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/logs/migrate-groups/run-187666581788229-0/reflect_account_groups_on_workspace.log
13:16 INFO [databricks.labs.ucx.workspace_access.groups:reflect_account_groups_on_workspace] Listing account groups with id,displayName,externalId...
13:16 DEBUG [databricks.sdk:reflect_account_groups_on_workspace] GET /api/2.0/account/scim/v2/Groups?attributes=id,displayName,externalId
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "ucx_EMQk",
<       "id": "747915403144"
<     },
<     {
<       "displayName": "rename-LFcF-ucx_GlGZb",
<       "id": "839447153138"
<     },
<     "... (2297 additional elements)"
<   ],
<   "itemsPerPage": 2299,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 2299
< }
13:16 INFO [databricks.labs.ucx.workspace_access.groups:reflect_account_groups_on_workspace] Found 2298 account groups
13:16 INFO [databricks.labs.ucx.workspace_access.groups:reflect_account_groups_on_workspace] Listing workspace groups (resource_type=Group) with id,displayName,externalId,meta...
13:16 DEBUG [databricks.sdk:reflect_account_groups_on_workspace] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,externalId,meta&startIndex=1&count=100
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "role.labs.tempo.write",
<       "externalId": "8d2db608-4ed1-49f2-ad5c-fe942be7a4e1",
<       "id": "22190446071900",
<       "meta": {
<         "resourceType": "Group"
<       }
<     },
<     "... (61 additional elements)"
<   ],
<   "itemsPerPage": 62,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 62
< }
13:16 DEBUG [databricks.sdk:reflect_account_groups_on_workspace] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,externalId,meta&startIndex=63&count=100
< 200 OK
< {
<   "itemsPerPage": 0,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 63,
<   "totalResults": 62
< }
13:16 INFO [databricks.labs.ucx.workspace_access.groups:reflect_account_groups_on_workspace] Found 57 Group
13:16 DEBUG [databricks.labs.ucx.framework.crawlers:reflect_account_groups_on_workspace] [hive_metastore.ucx_sv3vf.groups] fetching groups inventory
13:16 DEBUG [databricks.labs.lsql.backends:reflect_account_groups_on_workspace] [spark][fetch] SELECT * FROM hive_metastore.ucx_sv3vf.groups
13:16 DEBUG [databricks.labs.blueprint.parallel:reflect_account_groups_on_workspace] Starting 1 tasks in 8 threads
13:16 DEBUG [databricks.sdk:reflect_account_groups_on_workspace] PUT /api/2.0/preview/permissionassignments/principals/839140198683877
> [raw stream]
< 200 OK
< {
<   "permissions": [
<     "USER"
<   ],
<   "principal": {
<     "display_name": "ucx_GnSbK",
<     "group_name": "ucx_GnSbK",
<     "principal_id": 839140198683877
<   }
< }
13:16 INFO [databricks.labs.blueprint.parallel:reflect_account_groups_on_workspace] reflect account groups on this workspace 1/1, rps: 1.516/sec
13:16 INFO [databricks.labs.blueprint.parallel:reflect_account_groups_on_workspace] Finished 'reflect account groups on this workspace' tasks: 100% results available (1/1). Took 0:00:00.670360
13:16 INFO [databricks.labs.ucx:apply_permissions_to_account_groups] UCX v0.24.1+2220240531131036 After job finishes, see debug logs at /Workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/logs/migrate-groups/run-187666581788229-0/apply_permissions_to_account_groups.log
13:16 DEBUG [databricks.labs.ucx.framework.crawlers:apply_permissions_to_account_groups] [hive_metastore.ucx_sv3vf.groups] fetching groups inventory
13:16 DEBUG [databricks.labs.lsql.backends:apply_permissions_to_account_groups] [spark][fetch] SELECT * FROM hive_metastore.ucx_sv3vf.groups
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,roles,entitlements&startIndex=1&count=100
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "role.labs.tempo.write",
<       "id": "22190446071900",
<       "meta": {
<         "resourceType": "Group"
<       }
<     },
<     "... (62 additional elements)"
<   ],
<   "itemsPerPage": 63,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 63
< }
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,roles,entitlements&startIndex=64&count=100
< 200 OK
< {
<   "itemsPerPage": 0,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 64,
<   "totalResults": 63
< }
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Loading inventory table hive_metastore.ucx_sv3vf.permissions
13:16 DEBUG [databricks.labs.lsql.backends:apply_permissions_to_account_groups] [spark][fetch] SELECT COUNT(*) as cnt FROM hive_metastore.ucx_sv3vf.permissions
13:16 DEBUG [databricks.labs.lsql.backends:apply_permissions_to_account_groups] [spark][fetch] SELECT object_id, object_type, raw FROM hive_metastore.ucx_sv3vf.permissions
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Applying the permissions to account groups. Total groups to apply permissions: 1. Total permissions found: 4
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Total tasks for TABLE: 1
13:16 DEBUG [databricks.labs.ucx.workspace_access.generic:apply_permissions_to_account_groups] Skipping AccessControlResponse(all_permissions=[Permission(inherited=True, inherited_from_object=['/cluster-policies/cluster-policies'], permission_level=<PermissionLevel.CAN_USE: 'CAN_USE'>)], display_name=None, group_name='admins', service_principal_name=None, user_name=None) for cluster-policy//cluster-policies/00137A276F4E7BE5 because it is not in scope
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Total tasks for cluster-policies: 1
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Total tasks for secrets: 1
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Starting to apply permissions on account groups. Total tasks: 3
13:16 DEBUG [databricks.labs.blueprint.parallel:apply_permissions_to_account_groups] Starting 3 tasks in 8 threads
13:16 DEBUG [databricks.labs.lsql.backends:apply_permissions_to_account_groups] [spark][execute] GRANT SELECT ON TABLE hive_metastore.ucx_s7xb3.ucx_tymsc TO `ucx_GnSbK`
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] POST /api/2.0/secrets/acls/put
> {
>   "permission": "MANAGE",
>   "principal": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d",
>   "scope": "sdk-U6Ov"
> }
< 200 OK
< {}
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] GET /api/2.0/secrets/acls/list?scope=sdk-U6Ov
< 200 OK
< {
<   "items": [
<     {
<       "permission": "MANAGE",
<       "principal": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     {
<       "permission": "WRITE",
<       "principal": "rename-r27Z-ucx_GnSbK"
<     }
<   ]
< }
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] POST /api/2.0/secrets/acls/put
> {
>   "permission": "WRITE",
>   "principal": "ucx_GnSbK",
>   "scope": "sdk-U6Ov"
> }
< 200 OK
< {}
13:16 DEBUG [databricks.labs.lsql.backends:apply_permissions_to_account_groups] [spark][fetch] SHOW GRANTS ON TABLE hive_metastore.ucx_s7xb3.ucx_tymsc
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] GET /api/2.0/secrets/acls/list?scope=sdk-U6Ov
< 200 OK
< {
<   "items": [
<     {
<       "permission": "MANAGE",
<       "principal": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     {
<       "permission": "WRITE",
<       "principal": "ucx_GnSbK"
<     }
<   ]
< }
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] PATCH /api/2.0/permissions/cluster-policies/00137A276F4E7BE5
> {
>   "access_control_list": [
>     {
>       "group_name": "ucx_GnSbK",
>       "permission_level": "CAN_USE"
>     }
>   ]
> }
< 200 OK
< {
<   "access_control_list": [
<     {
<       "all_permissions": [
<         {
<           "inherited": false,
<           "permission_level": "CAN_USE"
<         }
<       ],
<       "display_name": "labs-account-admin-identity",
<       "service_principal_name": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     "... (3 additional elements)"
<   ],
<   "object_id": "/cluster-policies/00137A276F4E7BE5",
<   "object_type": "cluster-policy"
< }
13:16 DEBUG [databricks.sdk:apply_permissions_to_account_groups] GET /api/2.0/permissions/cluster-policies/00137A276F4E7BE5
< 200 OK
< {
<   "access_control_list": [
<     {
<       "all_permissions": [
<         {
<           "inherited": false,
<           "permission_level": "CAN_USE"
<         }
<       ],
<       "display_name": "labs-account-admin-identity",
<       "service_principal_name": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     "... (3 additional elements)"
<   ],
<   "object_id": "/cluster-policies/00137A276F4E7BE5",
<   "object_type": "cluster-policy"
< }
13:16 INFO [databricks.labs.blueprint.parallel:apply_permissions_to_account_groups] apply account group permissions 3/3, rps: 4.942/sec
13:16 INFO [databricks.labs.blueprint.parallel:apply_permissions_to_account_groups] Finished 'apply account group permissions' tasks: 100% results available (3/3). Took 0:00:00.611802
13:16 INFO [databricks.labs.ucx.workspace_access.manager:apply_permissions_to_account_groups] Permissions were applied
13:16 INFO [databricks.labs.ucx:validate_groups_permissions] UCX v0.24.1+2220240531131036 After job finishes, see debug logs at /Workspace/Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/logs/migrate-groups/run-187666581788229-0/validate_groups_permissions.log
13:16 DEBUG [databricks.sdk:validate_groups_permissions] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,roles,entitlements&startIndex=1&count=100
< 200 OK
< {
<   "Resources": [
<     {
<       "displayName": "role.labs.tempo.write",
<       "id": "22190446071900",
<       "meta": {
<         "resourceType": "Group"
<       }
<     },
<     "... (62 additional elements)"
<   ],
<   "itemsPerPage": 63,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 1,
<   "totalResults": 63
< }
13:16 DEBUG [databricks.sdk:validate_groups_permissions] GET /api/2.0/preview/scim/v2/Groups?attributes=id,displayName,meta,roles,entitlements&startIndex=64&count=100
< 200 OK
< {
<   "itemsPerPage": 0,
<   "schemas": [
<     "urn:ietf:params:scim:api:messages:2.0:ListResponse"
<   ],
<   "startIndex": 64,
<   "totalResults": 63
< }
13:16 INFO [databricks.labs.ucx.workspace_access.manager:validate_groups_permissions] Loading inventory table hive_metastore.ucx_sv3vf.permissions
13:16 DEBUG [databricks.labs.lsql.backends:validate_groups_permissions] [spark][fetch] SELECT COUNT(*) as cnt FROM hive_metastore.ucx_sv3vf.permissions
13:16 DEBUG [databricks.labs.lsql.backends:validate_groups_permissions] [spark][fetch] SELECT object_id, object_type, raw FROM hive_metastore.ucx_sv3vf.permissions
13:16 INFO [databricks.labs.ucx.workspace_access.manager:validate_groups_permissions] Total permissions found: 4
13:16 INFO [databricks.labs.ucx.workspace_access.manager:validate_groups_permissions] Total tasks for TABLE: 2
13:16 INFO [databricks.labs.ucx.workspace_access.manager:validate_groups_permissions] Total tasks for cluster-policies: 1
13:16 INFO [databricks.labs.ucx.workspace_access.manager:validate_groups_permissions] Total tasks for secrets: 1
13:16 INFO [databricks.labs.ucx.workspace_access.manager:validate_groups_permissions] Starting to verify permissions. Total tasks: 4
13:16 DEBUG [databricks.labs.blueprint.parallel:validate_groups_permissions] Starting 4 tasks in 8 threads
13:16 DEBUG [databricks.labs.lsql.backends:validate_groups_permissions] [spark][fetch] SHOW GRANTS ON TABLE hive_metastore.ucx_s7xb3.ucx_tymsc
13:16 DEBUG [databricks.labs.lsql.backends:validate_groups_permissions] [spark][fetch] SHOW GRANTS ON TABLE hive_metastore.ucx_s7xb3.ucx_tymsc
13:16 DEBUG [databricks.sdk:validate_groups_permissions] GET /api/2.0/secrets/acls/list?scope=sdk-U6Ov
< 200 OK
< {
<   "items": [
<     {
<       "permission": "MANAGE",
<       "principal": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     {
<       "permission": "WRITE",
<       "principal": "rename-r27Z-ucx_GnSbK"
<     }
<   ]
< }
13:16 DEBUG [databricks.sdk:validate_groups_permissions] GET /api/2.0/secrets/acls/list?scope=sdk-U6Ov
< 200 OK
< {
<   "items": [
<     {
<       "permission": "MANAGE",
<       "principal": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     {
<       "permission": "WRITE",
<       "principal": "rename-r27Z-ucx_GnSbK"
<     }
<   ]
< }
13:16 ERROR [databricks.labs.blueprint.parallel:validate_groups_permissions] verify group permissions('sdk-U6Ov', [AclItem(principal='0a330eb5-dd51-4d97-b6e4-c474356b1d5d', permission=<AclPermission.MANAGE: 'MANAGE'>), AclItem(principal='ucx_GnSbK', permission=<AclPermission.WRITE: 'WRITE'>)]) task failed: Couldn't find permission for scope sdk-U6Ov and group ucx_GnSbK
acl to be applied=AclPermission.WRITE
acl found in the object=None
Traceback (most recent call last):
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/blueprint/parallel.py", line 158, in inner
    return func(*args, **kwargs), None
           ^^^^^^^^^^^^^^^^^^^^^
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/secrets.py", line 124, in _verify_acls
    self._verify(scope_name, acl.principal, acl.permission)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/blueprint/limiter.py", line 65, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/secrets.py", line 114, in _verify
    raise ValueError(msg)
ValueError: Couldn't find permission for scope sdk-U6Ov and group ucx_GnSbK
acl to be applied=AclPermission.WRITE
acl found in the object=None

13:16 DEBUG [databricks.sdk:validate_groups_permissions] GET /api/2.0/permissions/cluster-policies/00137A276F4E7BE5
< 200 OK
< {
<   "access_control_list": [
<     {
<       "all_permissions": [
<         {
<           "inherited": false,
<           "permission_level": "CAN_USE"
<         }
<       ],
<       "display_name": "labs-account-admin-identity",
<       "service_principal_name": "0a330eb5-dd51-4d97-b6e4-c474356b1d5d"
<     },
<     "... (3 additional elements)"
<   ],
<   "object_id": "/cluster-policies/00137A276F4E7BE5",
<   "object_type": "cluster-policy"
< }
13:16 INFO [databricks.labs.blueprint.parallel:validate_groups_permissions] verify group permissions 4/4, rps: 19.300/sec
13:16 WARNING [databricks.labs.blueprint.parallel:validate_groups_permissions] Some 'verify group permissions' tasks failed: 75% results available (3/4). Took 0:00:00.216298
13:16 ERROR [databricks.labs.ucx:validate_groups_permissions] Execute `databricks workspace export //Users/0a330eb5-dd51-4d97-b6e4-c474356b1d5d/.r27Z/logs/migrate-groups/run-187666581788229-0/validate_groups_permissions.log` locally to troubleshoot with more details. Couldn't find permission for scope sdk-U6Ov and group ucx_GnSbK
acl to be applied=AclPermission.WRITE
acl found in the object=None

13:16 DEBUG [databricks:validate_groups_permissions] Task crash details
Traceback (most recent call last):
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/runtime.py", line 96, in trigger
    current_task(ctx)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/workflows.py", line 50, in validate_groups_permissions
    ctx.permission_manager.verify_group_permissions()
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/manager.py", line 117, in verify_group_permissions
    Threads.strict("verify group permissions", verifier_tasks)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/blueprint/parallel.py", line 62, in strict
    raise errs[0]
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/blueprint/parallel.py", line 158, in inner
    return func(*args, **kwargs), None
           ^^^^^^^^^^^^^^^^^^^^^
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/secrets.py", line 124, in _verify_acls
    self._verify(scope_name, acl.principal, acl.permission)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/blueprint/limiter.py", line 65, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-2a058d88-7054-438f-963c-0cbfb5b2e871/lib/python3.11/site-packages/databricks/labs/ucx/workspace_access/secrets.py", line 114, in _verify
    raise ValueError(msg)
ValueError: Couldn't find permission for scope sdk-U6Ov and group ucx_GnSbK
acl to be applied=AclPermission.WRITE
acl found in the object=None

13:16 INFO [databricks.labs.ucx.installer.workflows] ---------- END REMOTE LOGS ----------
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] clearing 1 secret scope acl fixtures
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] removing secret scope acl fixture: ('sdk-U6Ov', 'ucx_GnSbK')
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] ignoring error while secret scope acl ('sdk-U6Ov', 'ucx_GnSbK') teardown: ACL for ucx_GnSbK does not exist in scope sdk-U6Ov!
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] clearing 1 secret scope fixtures
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] removing secret scope fixture: sdk-U6Ov
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] clearing 1 cluster_policy permissions fixtures
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] removing cluster_policy permissions fixture: 00137A276F4E7BE5 [group_name admins CAN_USE] -> [group_name ucx_GnSbK CAN_USE]
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] clearing 1 cluster policy fixtures
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] removing cluster policy fixture: CreatePolicyResponse(policy_id='00137A276F4E7BE5')
13:16 INFO [databricks.labs.ucx.install] Deleting UCX v0.24.1+2220240531131036 from https://DATABRICKS_HOST
13:16 INFO [databricks.labs.ucx.install] Deleting inventory database ucx_sv3vf
13:16 INFO [databricks.labs.ucx.install] Deleting jobs
13:16 INFO [databricks.labs.ucx.install] Deleting remove-workspace-local-backup-groups job_id=462204659156919.
13:16 INFO [databricks.labs.ucx.install] Deleting migrate-tables-in-mounts-experimental job_id=369371082131842.
13:16 INFO [databricks.labs.ucx.install] Deleting migrate-groups job_id=548267022497868.
13:16 INFO [databricks.labs.ucx.install] Deleting migrate-external-hiveserde-tables-in-place-experimental job_id=1003544857559410.
13:16 INFO [databricks.labs.ucx.install] Deleting scan-tables-in-mounts-experimental job_id=327786358952424.
13:16 INFO [databricks.labs.ucx.install] Deleting migrate-data-reconciliation job_id=527720640384133.
13:16 INFO [databricks.labs.ucx.install] Deleting failing job_id=570461456724151.
13:16 INFO [databricks.labs.ucx.install] Deleting migrate-tables job_id=878876855304767.
13:16 INFO [databricks.labs.ucx.install] Deleting experimental-workflow-linter job_id=542929341370560.
13:16 INFO [databricks.labs.ucx.install] Deleting validate-groups-permissions job_id=858254737177785.
13:16 INFO [databricks.labs.ucx.install] Deleting assessment job_id=244152491472891.
13:16 INFO [databricks.labs.ucx.install] Deleting migrate-external-tables-ctas job_id=716088251908113.
13:16 INFO [databricks.labs.ucx.install] Deleting migrate-groups-experimental job_id=998355393939330.
13:16 INFO [databricks.labs.ucx.install] Deleting cluster policy
13:16 INFO [databricks.labs.ucx.install] Deleting secret scope
13:16 INFO [databricks.labs.ucx.install] UnInstalling UCX complete
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] clearing 1 workspace user fixtures
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] removing workspace user fixture: User(active=True, display_name='[email protected]', emails=[ComplexValue(display=None, primary=True, ref=None, type='work', value='[email protected]')], entitlements=[], external_id=None, groups=[], id='5239561294424098', name=Name(family_name=None, given_name='[email protected]'), roles=[], schemas=[<UserSchema.URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_USER: 'urn:ietf:params:scim:schemas:core:2.0:User'>, <UserSchema.URN_IETF_PARAMS_SCIM_SCHEMAS_EXTENSION_WORKSPACE_2_0_USER: 'urn:ietf:params:scim:schemas:extension:workspace:2.0:User'>], user_name='[email protected]')
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] clearing 1 account group fixtures
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] removing account group fixture: Group(display_name='ucx_GnSbK', entitlements=[], external_id=None, groups=[], id='839140198683877', members=[ComplexValue(display='[email protected]', primary=None, ref='Users/5239561294424098', type=None, value='5239561294424098')], meta=None, roles=[], schemas=[<GroupSchema.URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_GROUP: 'urn:ietf:params:scim:schemas:core:2.0:Group'>])
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] clearing 1 workspace group fixtures
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] removing workspace group fixture: Group(display_name='ucx_GnSbK', entitlements=[ComplexValue(display=None, primary=None, ref=None, type=None, value='allow-cluster-create')], external_id=None, groups=[], id='1026950790723644', members=[ComplexValue(display='[email protected]', primary=None, ref='Users/5239561294424098', type=None, value='5239561294424098')], meta=ResourceMeta(resource_type='WorkspaceGroup'), roles=[], schemas=[<GroupSchema.URN_IETF_PARAMS_SCIM_SCHEMAS_CORE_2_0_GROUP: 'urn:ietf:params:scim:schemas:core:2.0:Group'>])
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] clearing 0 table fixtures
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] clearing 1 table fixtures
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] removing table fixture: TableInfo(access_point=None, browse_only=None, catalog_name='hive_metastore', columns=None, comment=None, created_at=None, created_by=None, data_access_configuration_id=None, data_source_format=<DataSourceFormat.DELTA: 'DELTA'>, deleted_at=None, delta_runtime_properties_kvpairs=None, effective_predictive_optimization_flag=None, enable_predictive_optimization=None, encryption_details=None, full_name='hive_metastore.ucx_s7xb3.ucx_tymsc', metastore_id=None, name='ucx_tymsc', owner=None, pipeline_id=None, properties={'RemoveAfter': '2024053114'}, row_filter=None, schema_name='ucx_s7xb3', sql_path=None, storage_credential_name=None, storage_location='dbfs:/user/hive/warehouse/ucx_s7xb3/ucx_tymsc', table_constraints=None, table_id=None, table_type=<TableType.MANAGED: 'MANAGED'>, updated_at=None, updated_by=None, view_definition=None, view_dependencies=None)
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] clearing 2 schema fixtures
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] removing schema fixture: SchemaInfo(browse_only=None, catalog_name='hive_metastore', catalog_type=None, comment=None, created_at=None, created_by=None, effective_predictive_optimization_flag=None, enable_predictive_optimization=None, full_name='hive_metastore.ucx_s7xb3', metastore_id=None, name='ucx_s7xb3', owner=None, properties=None, schema_id=None, storage_location=None, storage_root=None, updated_at=None, updated_by=None)
13:16 DEBUG [databricks.labs.ucx.mixins.fixtures] removing schema fixture: SchemaInfo(browse_only=None, catalog_name='hive_metastore', catalog_type=None, comment=None, created_at=None, created_by=None, effective_predictive_optimization_flag=None, enable_predictive_optimization=None, full_name='hive_metastore.ucx_sv3vf', metastore_id=None, name='ucx_sv3vf', owner=None, properties=None, schema_id=None, storage_location=None, storage_root=None, updated_at=None, updated_by=None)
[gw7] linux -- Python 3.10.14 /home/runner/work/ucx/ucx/.venv/bin/python

Flaky tests:

  • 🤪 test_spn_migration_access_connector_created (4.63s)
  • 🤪 test_delete_ws_groups_should_delete_renamed_and_reflected_groups_only (3m39.826s)

Running from acceptance #3640

nfx added a commit that referenced this pull request Jun 4, 2024
* Added handling for legacy ACL `DENY` permission in group migration ([#1815](#1815)). In this release, the handling of `DENY` permissions during group migrations in our legacy ACL table has been improved. Previously, `DENY` operations were denoted with a `DENIED` prefix and were not being applied correctly during migrations. This issue has been resolved by adding a condition in the _apply_grant_sql method to check for the presence of `DENIED` in the action_type, removing the prefix, and enclosing the action type in backticks to prevent syntax errors. These changes have been thoroughly tested through manual testing, unit tests, integration tests, and verification on the staging environment, and resolve issue [#1803](#1803). A new test function, test_hive_deny_sql(), has also been added to test the behavior of the `DENY` permission.
* Added handling for parsing corrupted log files ([#1817](#1817)). The `logs.py` file in the `src/databricks/labs/ucx/installer` directory has been updated to improve the handling of corrupted log files. A new block of code has been added to check if the logs match the expected format, and if they don't, a warning message is logged and the function returns, preventing further processing and potential production of incorrect results. The changes include a new method `test_parse_logs_warns_for_corrupted_log_file` that verifies the expected warning message and corrupt log line are present in the last log message when a corrupted log file is detected. These enhancements increase the robustness of the log parsing functionality by introducing error handling for corrupted log files.
* Added known problems with `pyspark` package ([#1813](#1813)). In this release, updates have been made to the `src/databricks/labs/ucx/source_code/known.json` file to document known issues with the `pyspark` package when running on UC Shared Clusters. These issues include not being able to access the Spark Driver JVM, using legacy contexts, or using RDD APIs. A new `KnownProblem` dataclass has been added to the `known.py` file, which includes methods for converting the object to a dictionary for better encoding of problems. The `_analyze_file` method has also been updated to use a `known_problems` set of `KnownProblem` objects, improving readability and management of known problems within the application. These changes address issue [#1813](#1813) and improve the documentation of known issues with `pyspark`.
* Added library linting for jobs launched on shared clusters ([#1689](#1689)). This release includes an update to add library linting for jobs launched on shared clusters, addressing issue [#1637](#1637). A new function, `_register_existing_cluster_id(graph: DependencyGraph)`, has been introduced to retrieve libraries installed on a specified existing cluster and register them in the dependency graph. If the existing cluster ID is not present in the task, the function returns early. This feature also includes changes to the `test_jobs.py` file in the `tests/integration/source_code` directory, such as the addition of new methods for linting jobs and handling libraries, and the inclusion of the `jobs` and `compute` modules from the `databricks.sdk.service` package. Additionally, a new `WorkflowTaskContainer` method has been added to build a dependency graph for job tasks. These changes improve the reliability and efficiency of the service by ensuring that jobs run smoothly on shared clusters by checking for and handling missing libraries. Software engineers will benefit from these improvements as it will reduce the occurrence of errors due to missing libraries on shared clusters.
* Added linters to check for spark logging and configuration access ([#1808](#1808)). This commit introduces new linters to check for the use of Spark logging, Spark configuration access via `sc.conf`, and `rdd.mapPartitions`. The changes address one issue and enhance three others related to RDDs in shared clusters and the use of deprecated code. Additionally, new tests have been added for the linters and updates have been made to existing ones. The new linters have been added to the `SparkConnectLinter` class and are executed as part of the `databricks labs ucx` command. This commit also includes documentation for the new functionality. The modifications are thoroughly tested through manual tests and unit tests to ensure no existing functionality is affected.
* Added list of known dependency compatibilities and regeneration infrastructure for it ([#1747](#1747)). This change introduces an automated system for regenerating known Python dependencies to ensure compatibility with Unity Catalog (UC), resolving import issues during graph generation. The changes include a script entry point for adding new libraries, manual trimming of unnecessary information in the `known.json` file, and integration of package data with the Whitelist. This development practice prioritizes using standard libraries and provides guidelines for contributing to the project, including debugging, fixtures, and IDE setup. The target audience for this feature is software engineers contributing to the open-source library.
* Added more known libraries from Databricks Runtime ([#1812](#1812)). In this release, we've expanded the Databricks Runtime's capabilities by incorporating a variety of new libraries. These libraries include absl-py, aiohttp, and grpcio, which enhance networking functionalities. For improved data processing, we've added aiosignal, anyio, appdirs, and others. The suite of cloud computing libraries has been bolstered with the addition of google-auth, google-cloud-bigquery, google-cloud-storage, and many more. These libraries are now integrated in the known libraries file in the JSON format, enhancing the platform's overall functionality and performance in networking, data processing, and cloud computing scenarios.
* Added more known packages from Databricks Runtime ([#1814](#1814)). In this release, we have added a significant number of new packages to the known packages file in the Databricks Runtime, including astor, audioread, azure-core, and many others. These additions include several new modules and sub-packages for some of the existing packages, significantly expanding the library's capabilities. The new packages are expected to provide new functionality and improve compatibility with the existing packages. However, it is crucial to thoroughly test the new packages to ensure they work as expected and do not introduce any issues. We encourage all software engineers to familiarize themselves with the new packages and integrate them into their workflows to take full advantage of the improved functionality and compatibility.
* Added support for `.egg` Python libraries in jobs ([#1789](#1789)). This commit adds support for `.egg` Python libraries in jobs by registering egg library dependencies to DependencyGraph for linting, addressing issue [#1643](#1643). It includes the addition of a new method, `PythonLibraryResolver`, which replaces the old `PipResolver`, and is used to register egg library dependencies in the `DependencyGraph`. The changes also involve adding user documentation, a new CLI command, and a new workflow, as well as modifying an existing workflow and table. The tests include manual testing, unit tests, and integration tests. The diff includes changes to the 'test_dependencies.py' file, specifically in the import section where `PipResolver` is replaced with `PythonLibraryResolver` from the 'databricks.labs.ucx.source_code.python_libraries' package. These changes aim to improve test coverage and ensure the correct resolution of dependencies, including those from `.egg` files.
* Added table migration workflow guide ([#1607](#1607)). UCX is a new open-source library that simplifies the process of upgrading to Unity Catalog in Databricks workspaces. After installation, users can trigger the assessment workflow, which identifies any incompatible entities and provides information necessary for planning migration. Once the assessment is complete, users can initiate the group migration workflow to upgrade various Databricks workspace assets, including Legacy Table ACLs, Entitlements, AWS instance profiles, Clusters, Cluster policies, Instance Pools, Databricks SQL warehouses, Delta Live Tables, Jobs, MLflow experiments and registry, SQL Dashboards & Queries, SQL Alerts, and Token and Password usage permissions set on the workspace level, Secret scopes, Notebooks, Directories, Repos, and Files. Additionally, the group migration workflow creates a debug notebook and logs for debugging purposes, providing added convenience and improved user experience.
* Added workflow linter for spark python tasks ([#1810](#1810)). A linter for workflows related to Spark Python tasks has been implemented, ensuring proper implementation of workflows for Spark Python tasks and avoiding errors for tasks that are not yet implemented. The changes are limited to the `_register_spark_python_task` method in the `jobs.py` file. If the task is not a Spark Python task, an empty list is returned, and if it is, the entrypoint is logged and the notebook is registered. Additionally, two new tests have been implemented to demonstrate the functionality of this linter. The `test_job_spark_python_task_linter_happy_path` test checks the linter on a valid job configuration where all required libraries are specified, while the `test_job_spark_python_task_linter_unhappy_path` test checks the linter on an invalid job configuration where required libraries are not specified. These tests ensure that the workflow linter for Spark Python tasks is functioning correctly and can help identify any potential issues in job configurations.
* Connect all linters to `LinterContext` and add functional testing framework ([#1811](#1811)). This commit connects all linters, including those related to JVM, to the critical path for improved code linting, and introduces a functional testing framework to simplify the writing of code linting verification tests. The `pyproject.toml` file has been updated to include a new configuration for the `ignore-paths` option, utilizing a regular expression to exclude certain files or directories from linting. The testing framework is particularly useful for verifying the correct functioning of linters, reducing the risk of errors and improving the overall development experience. These changes will help to improve the reliability and efficiency of the linting process, making it easier to write and maintain high-quality code.
* Deduplicate errors emitted by Spark Connect linter ([#1824](#1824)). This pull request introduces error deduplication for the Spark Connect linter and adds new functional tests using an updated framework. The modifications include the addition of user documentation and unit tests, as well as alterations to existing commands and workflows. Specifically, a new CLI command has been added, and the command `databricks labs ucx ...` has been modified. Additionally, a new workflow has been implemented, and an existing workflow has been updated. No new tables or modifications to existing tables are present. Testing has been conducted through manual testing and new unit tests, with no integration tests or staging environment tests specified. The `verify` method in the `test_functional.py` file has been updated to sort the actual problems list before comparing it to the expected problems list, ensuring consistent ordering of results. The changes aim to improve the functionality and usability of the Spark Connect linter for our software engineer audience.
* Download wheel dependency locally to register it to the dependency graph ([#1704](#1704)). A new feature has been implemented in the open-source library to enhance dependency management for wheel files. Previously, when the library type was wheel, a `not-yet-implemented` DependencyProblem would be yielded. Now, the system downloads the wheel file from a remote location, saves it to a temporary directory, and registers the local file to the dependency graph. This allows for more comprehensive handling of wheel dependencies, as they are now downloaded and registered instead of simply being flagged as "not-yet-implemented". Additionally, new functions for creating jobs, making notebooks, and generating random values have been added to enable more comprehensive testing of the workflow linter. New tests have been implemented to check the linter's behavior when there is a missing library dependency and to verify that the linter correctly handles wheel dependencies. These changes improve the testing capabilities of the workflow linter and ensure that all dependencies are properly accounted for and managed within the system. A new test method, 'test_workflow_task_container_builds_dependency_graph_for_python_wheel', has been added to ensure that the dependency graph is built correctly for Python wheels and to improve test coverage.
* Drop pyspark `register` lint matcher ([#1818](#1818)). In the latest release, the `register` lint matcher has been removed from pyspark, indicating that the specific usage pattern for the `register` method in UDTFRegistration is no longer required. This change affects the linting process during code reviews, but does not impact the functionality of the code directly. Other matchers for DataFrame, DataFrameReader, DataFrameWriter, and direct filesystem access remain unchanged. The `register` method, which was likely used to register a temporary table or view in pyspark, is no longer considered a best practice or necessary feature. If you previously relied on the `register` method in your pyspark code, you will need to find an alternative solution. This update aims to improve the quality and consistency of pyspark code by removing outdated or unnecessary functionality.
* Enabled joining an existing installation to a collection ([#1799](#1799)). This change introduces several new features and modifications to the open-source library, aimed at enhancing the management and organization of workspaces within a collection. A new command `join-collection` has been added to allow a workspace to join a collection using its workspace ID. The `report-account-compatibility` command has been updated with a new flag `--workspace-ids`, and the `alias` command has been updated with a new description. Two new commands `principal-prefix-access` and `create-missing-principals` have been introduced for AWS, and a new command `create-uber-principal` has been introduced for Azure to handle the creation of service principals with STORAGE BLOB READER access for storage accounts used by tables in the workspace. The code's readability and maintainability have been improved by modifying the method `_can_administer` to `can_administer` and `_load_workspace_info` to `load_workspace_info` in the `workspaces.py` file. A new `join_collection` command has been added to the `ucx` application instance to enable joining an existing installation to a collection. Additionally, modifications to the `install.py` file and `test_installation.py` file have been made to facilitate the integration of existing installations into a collection. The tests have been updated to ensure that the joining process works correctly in various scenarios. Overall, these changes provide more flexibility and ease of use for users and improve the interoperability and security of the system.
* Fixed `migrate-credential` cli command on AWS ([#1732](#1732)). In this release, the `migrate-credential` CLI command for AWS has been improved and fixed. The command now includes changes to the `access.py` file in the `databricks/labs/ucx/aws` directory. Notable updates are the refactoring of the `role_name` method into a dataclass called `AWSCredentialCandidate`, the addition of the method `_aws_role_trust_doc`, and the removal of the `_databricks_trust_statement` method. The `_aws_s3_policy` method has been updated to include `s3:PutObjectAcl` in the allowed actions, and methods `_create_role` and `_get_role_access_task` have been updated to use `arn` instead of `role_name`. Additionally, the `create_uc_role` and `update_uc_trust_role` methods have been combined into a single `update_uc_role` method. The `migrate-credentials` command in the `cli.py` file has also been updated to support migration of AWS Instance Profiles to UC storage credentials. These improvements resolve issue [#1726](#1726) and enhance the functionality and reliability of the `migrate-credential` command for AWS.
* Fixed crasher when running migrate-local-code ([#1794](#1794)). In this release, we have addressed a crasher issue that occurred when running the `migrate-local-code` command. The change involves modifying the `local_file_migrator` property in the `LocalCheckoutContext` class to use a lambda function instead of directly passing `self.languages`. This ensures that the languages are loaded only when the `local_file_migrator` property is accessed, preventing unnecessary load and potential crashes. The change does not introduce any new functionalities, but instead modifies existing commands related to local file migration. Comprehensive manual testing and unit tests have been conducted to ensure the fix works as expected without negatively impacting other parts of the system.
* Fixed inconsistent behavior in `%pip` cell handling ([#1785](#1785)). This PR addresses inconsistent behavior in `%pip` cell handling by modifying Python library installation to occur in a designated path lookup, rather than deep within the library tree. These changes impact various components, such as the `PipResolver` class, which no longer requires a `FileLoader` instance as an argument and now takes a `Whitelist` instance directly. Additionally, tests like `test_detect_s3fs_import` and `test_detect_s3fs_import_in_dependencies` are affected by these modifications. Overall, these changes streamline the `%pip` feature, improving library installation efficiency and consistency.
* Fixed issue when creating view using `WITH` clause ([#1809](#1809)). In this release, we have addressed an issue that occurred when creating a view using a `WITH` clause, which was causing potential errors or incorrect results due to improper handling of aliases. A new method, `_read_aliases`, has been introduced to read and store aliases from the `WITH` clause as a set, and during view dependency analysis, if an old table's name matches an alias, it is now skipped to prevent double-counting. This ensures improved accuracy and reliability of view creation with `WITH` clauses. Moreover, the commit includes adjustments to import statements, addition of unit tests, and the introduction of a new class `TableView` in the `databricks.labs.ucx.hive_metastore.view_migrate` module to test whether a view with a local dataset should be skipped. This release also includes a test for migrating a view with columns, ensuring that views with local datasets are now handled correctly. The fix resolves issue [#1798](#1798).
* Fixed linting for non-UTF8 encoded files ([#1804](#1804)). This commit addresses linting issues for files that are not encoded in UTF-8, improving compatibility with non-UTF-8 encoded files in the databricks labs ucx project. Previously, the linter and fixer tools were unable to process non-UTF-8 encoded files, causing them to fail. This issue has been resolved by adding a check for file encoding during linting and handling the case where the file is not encoded in UTF-8 by returning a failure message. A new method, `getpreferredencoding(False)`, has been introduced to determine the file's encoding, ensuring UTF-8 compatibility. Additionally, a new test method, `test_file_linter_lints_non_ascii_encoded_file`, has been added to check the linter's behavior with non-ASCII encoded files. This enhancement simplifies the linting process, allowing for better file handling of non-UTF-8 encoded files, and is supported by manual testing and unit tests.
* Further fix for DENY permissions ([#1834](#1834)). This commit addresses issue [#1834](#1834) by implementing a fix for handling DENY permissions in the legacy TACL migration logic. Previously, all permissions were grouped in a single GRANT statement, but they have now been updated to be split into separate GRANT and DENY statements. This change improves the clarity and maintainability of the code and also increases test coverage with the addition of unit tests and integration tests. A new test function `test_tacl_applier_deny_and_grant()` has been added to demonstrate the use of the updated logic for handling DENY permissions. The resulting SQL queries now include both GRANT and DENY statements, reflecting the updated logic. These changes ensure that the DENY permissions are correctly applied, increasing the overall test coverage and confidence in the code.
* Removed false warning on DataFrame.insertInto() about the default format changing from parquet to delta ([#1823](#1823)). This pull request removes a false warning related to the use of DataFrameWriter.insertInto(), which had been incorrectly flagging a potential issue due to the default format change from Parquet to Delta. The warning is now suppressed as it is no longer relevant, since the operation ignores any specified format and uses the existing format of the underlying table. Additionally, an unnecessary linting suppression has been removed. These changes improve the accuracy of the warning system and eliminate confusion for users, with no impact on functionality, usability, or performance. The changes have been manually tested and do not require any new unit or integration tests, CLI commands, workflows, or tables.
* Support linting python wheel tasks ([#1821](#1821)). This release introduces support for linting python wheel tasks, addressing issue [#1](#1)
* Updated linting checks for Spark table methods ([#1816](#1816)). This commit updates linting checks for PySpark's Spark table methods, focusing on improving handling of migrated tables and deprecating direct filesystem references in favor of the Unity Catalog. New tests and examples include literal and variable references to known and unknown tables, as well as cases with extra or out-of-position arguments. The commit also highlights false positives and trivial references in unrelated contexts. These changes aim to ensure proper usage of Spark table methods, improve codebase consistency, and minimize potential issues related to migrations and format changes.

Dependency updates:

 * Updated sqlglot requirement from <24.1,>=23.9 to >=23.9,<24.2 ([#1819](#1819)).
@nfx nfx mentioned this pull request Jun 4, 2024
nfx added a commit that referenced this pull request Jun 4, 2024
* Added handling for legacy ACL `DENY` permission in group migration
([#1815](#1815)). In this
release, the handling of `DENY` permissions during group migrations in
our legacy ACL table has been improved. Previously, `DENY` operations
were denoted with a `DENIED` prefix and were not being applied correctly
during migrations. This issue has been resolved by adding a condition in
the _apply_grant_sql method to check for the presence of `DENIED` in the
action_type, removing the prefix, and enclosing the action type in
backticks to prevent syntax errors. These changes have been thoroughly
tested through manual testing, unit tests, integration tests, and
verification on the staging environment, and resolve issue
[#1803](#1803). A new test
function, test_hive_deny_sql(), has also been added to test the behavior
of the `DENY` permission.
* Added handling for parsing corrupted log files
([#1817](#1817)). The
`logs.py` file in the `src/databricks/labs/ucx/installer` directory has
been updated to improve the handling of corrupted log files. A new block
of code has been added to check if the logs match the expected format,
and if they don't, a warning message is logged and the function returns,
preventing further processing and potential production of incorrect
results. The changes include a new method
`test_parse_logs_warns_for_corrupted_log_file` that verifies the
expected warning message and corrupt log line are present in the last
log message when a corrupted log file is detected. These enhancements
increase the robustness of the log parsing functionality by introducing
error handling for corrupted log files.
* Added known problems with `pyspark` package
([#1813](#1813)). In this
release, updates have been made to the
`src/databricks/labs/ucx/source_code/known.json` file to document known
issues with the `pyspark` package when running on UC Shared Clusters.
These issues include not being able to access the Spark Driver JVM,
using legacy contexts, or using RDD APIs. A new `KnownProblem` dataclass
has been added to the `known.py` file, which includes methods for
converting the object to a dictionary for better encoding of problems.
The `_analyze_file` method has also been updated to use a
`known_problems` set of `KnownProblem` objects, improving readability
and management of known problems within the application. These changes
address issue [#1813](#1813)
and improve the documentation of known issues with `pyspark`.
* Added library linting for jobs launched on shared clusters
([#1689](#1689)). This
release includes an update to add library linting for jobs launched on
shared clusters, addressing issue
[#1637](#1637). A new
function, `_register_existing_cluster_id(graph: DependencyGraph)`, has
been introduced to retrieve libraries installed on a specified existing
cluster and register them in the dependency graph. If the existing
cluster ID is not present in the task, the function returns early. This
feature also includes changes to the `test_jobs.py` file in the
`tests/integration/source_code` directory, such as the addition of new
methods for linting jobs and handling libraries, and the inclusion of
the `jobs` and `compute` modules from the `databricks.sdk.service`
package. Additionally, a new `WorkflowTaskContainer` method has been
added to build a dependency graph for job tasks. These changes improve
the reliability and efficiency of the service by ensuring that jobs run
smoothly on shared clusters by checking for and handling missing
libraries. Software engineers will benefit from these improvements as it
will reduce the occurrence of errors due to missing libraries on shared
clusters.
* Added linters to check for spark logging and configuration access
([#1808](#1808)). This
commit introduces new linters to check for the use of Spark logging,
Spark configuration access via `sc.conf`, and `rdd.mapPartitions`. The
changes address one issue and enhance three others related to RDDs in
shared clusters and the use of deprecated code. Additionally, new tests
have been added for the linters and updates have been made to existing
ones. The new linters have been added to the `SparkConnectLinter` class
and are executed as part of the `databricks labs ucx` command. This
commit also includes documentation for the new functionality. The
modifications are thoroughly tested through manual tests and unit tests
to ensure no existing functionality is affected.
* Added list of known dependency compatibilities and regeneration
infrastructure for it
([#1747](#1747)). This
change introduces an automated system for regenerating known Python
dependencies to ensure compatibility with Unity Catalog (UC), resolving
import issues during graph generation. The changes include a script
entry point for adding new libraries, manual trimming of unnecessary
information in the `known.json` file, and integration of package data
with the Whitelist. This development practice prioritizes using standard
libraries and provides guidelines for contributing to the project,
including debugging, fixtures, and IDE setup. The target audience for
this feature is software engineers contributing to the open-source
library.
* Added more known libraries from Databricks Runtime
([#1812](#1812)). In this
release, we've expanded the Databricks Runtime's capabilities by
incorporating a variety of new libraries. These libraries include
absl-py, aiohttp, and grpcio, which enhance networking functionalities.
For improved data processing, we've added aiosignal, anyio, appdirs, and
others. The suite of cloud computing libraries has been bolstered with
the addition of google-auth, google-cloud-bigquery,
google-cloud-storage, and many more. These libraries are now integrated
in the known libraries file in the JSON format, enhancing the platform's
overall functionality and performance in networking, data processing,
and cloud computing scenarios.
* Added more known packages from Databricks Runtime
([#1814](#1814)). In this
release, we have added a significant number of new packages to the known
packages file in the Databricks Runtime, including astor, audioread,
azure-core, and many others. These additions include several new modules
and sub-packages for some of the existing packages, significantly
expanding the library's capabilities. The new packages are expected to
provide new functionality and improve compatibility with the existing
packages. However, it is crucial to thoroughly test the new packages to
ensure they work as expected and do not introduce any issues. We
encourage all software engineers to familiarize themselves with the new
packages and integrate them into their workflows to take full advantage
of the improved functionality and compatibility.
* Added support for `.egg` Python libraries in jobs
([#1789](#1789)). This
commit adds support for `.egg` Python libraries in jobs by registering
egg library dependencies to DependencyGraph for linting, addressing
issue [#1643](#1643). It
includes the addition of a new method, `PythonLibraryResolver`, which
replaces the old `PipResolver`, and is used to register egg library
dependencies in the `DependencyGraph`. The changes also involve adding
user documentation, a new CLI command, and a new workflow, as well as
modifying an existing workflow and table. The tests include manual
testing, unit tests, and integration tests. The diff includes changes to
the 'test_dependencies.py' file, specifically in the import section
where `PipResolver` is replaced with `PythonLibraryResolver` from the
'databricks.labs.ucx.source_code.python_libraries' package. These
changes aim to improve test coverage and ensure the correct resolution
of dependencies, including those from `.egg` files.
* Added table migration workflow guide
([#1607](#1607)). UCX is a
new open-source library that simplifies the process of upgrading to
Unity Catalog in Databricks workspaces. After installation, users can
trigger the assessment workflow, which identifies any incompatible
entities and provides information necessary for planning migration. Once
the assessment is complete, users can initiate the group migration
workflow to upgrade various Databricks workspace assets, including
Legacy Table ACLs, Entitlements, AWS instance profiles, Clusters,
Cluster policies, Instance Pools, Databricks SQL warehouses, Delta Live
Tables, Jobs, MLflow experiments and registry, SQL Dashboards & Queries,
SQL Alerts, and Token and Password usage permissions set on the
workspace level, Secret scopes, Notebooks, Directories, Repos, and
Files. Additionally, the group migration workflow creates a debug
notebook and logs for debugging purposes, providing added convenience
and improved user experience.
* Added workflow linter for spark python tasks
([#1810](#1810)). A linter
for workflows related to Spark Python tasks has been implemented,
ensuring proper implementation of workflows for Spark Python tasks and
avoiding errors for tasks that are not yet implemented. The changes are
limited to the `_register_spark_python_task` method in the `jobs.py`
file. If the task is not a Spark Python task, an empty list is returned,
and if it is, the entrypoint is logged and the notebook is registered.
Additionally, two new tests have been implemented to demonstrate the
functionality of this linter. The
`test_job_spark_python_task_linter_happy_path` test checks the linter on
a valid job configuration where all required libraries are specified,
while the `test_job_spark_python_task_linter_unhappy_path` test checks
the linter on an invalid job configuration where required libraries are
not specified. These tests ensure that the workflow linter for Spark
Python tasks is functioning correctly and can help identify any
potential issues in job configurations.
* Connect all linters to `LinterContext` and add functional testing
framework ([#1811](#1811)).
This commit connects all linters, including those related to JVM, to the
critical path for improved code linting, and introduces a functional
testing framework to simplify the writing of code linting verification
tests. The `pyproject.toml` file has been updated to include a new
configuration for the `ignore-paths` option, utilizing a regular
expression to exclude certain files or directories from linting. The
testing framework is particularly useful for verifying the correct
functioning of linters, reducing the risk of errors and improving the
overall development experience. These changes will help to improve the
reliability and efficiency of the linting process, making it easier to
write and maintain high-quality code.
* Deduplicate errors emitted by Spark Connect linter
([#1824](#1824)). This pull
request introduces error deduplication for the Spark Connect linter and
adds new functional tests using an updated framework. The modifications
include the addition of user documentation and unit tests, as well as
alterations to existing commands and workflows. Specifically, a new CLI
command has been added, and the command `databricks labs ucx ...` has
been modified. Additionally, a new workflow has been implemented, and an
existing workflow has been updated. No new tables or modifications to
existing tables are present. Testing has been conducted through manual
testing and new unit tests, with no integration tests or staging
environment tests specified. The `verify` method in the
`test_functional.py` file has been updated to sort the actual problems
list before comparing it to the expected problems list, ensuring
consistent ordering of results. The changes aim to improve the
functionality and usability of the Spark Connect linter for our software
engineer audience.
* Download wheel dependency locally to register it to the dependency
graph ([#1704](#1704)). A
new feature has been implemented in the open-source library to enhance
dependency management for wheel files. Previously, when the library type
was wheel, a `not-yet-implemented` DependencyProblem would be yielded.
Now, the system downloads the wheel file from a remote location, saves
it to a temporary directory, and registers the local file to the
dependency graph. This allows for more comprehensive handling of wheel
dependencies, as they are now downloaded and registered instead of
simply being flagged as "not-yet-implemented". Additionally, new
functions for creating jobs, making notebooks, and generating random
values have been added to enable more comprehensive testing of the
workflow linter. New tests have been implemented to check the linter's
behavior when there is a missing library dependency and to verify that
the linter correctly handles wheel dependencies. These changes improve
the testing capabilities of the workflow linter and ensure that all
dependencies are properly accounted for and managed within the system. A
new test method,
'test_workflow_task_container_builds_dependency_graph_for_python_wheel',
has been added to ensure that the dependency graph is built correctly
for Python wheels and to improve test coverage.
* Drop pyspark `register` lint matcher
([#1818](#1818)). In the
latest release, the `register` lint matcher has been removed from
pyspark, indicating that the specific usage pattern for the `register`
method in UDTFRegistration is no longer required. This change affects
the linting process during code reviews, but does not impact the
functionality of the code directly. Other matchers for DataFrame,
DataFrameReader, DataFrameWriter, and direct filesystem access remain
unchanged. The `register` method, which was likely used to register a
temporary table or view in pyspark, is no longer considered a best
practice or necessary feature. If you previously relied on the
`register` method in your pyspark code, you will need to find an
alternative solution. This update aims to improve the quality and
consistency of pyspark code by removing outdated or unnecessary
functionality.
* Enabled joining an existing installation to a collection
([#1799](#1799)). This
change introduces several new features and modifications to the
open-source library, aimed at enhancing the management and organization
of workspaces within a collection. A new command `join-collection` has
been added to allow a workspace to join a collection using its workspace
ID. The `report-account-compatibility` command has been updated with a
new flag `--workspace-ids`, and the `alias` command has been updated
with a new description. Two new commands `principal-prefix-access` and
`create-missing-principals` have been introduced for AWS, and a new
command `create-uber-principal` has been introduced for Azure to handle
the creation of service principals with STORAGE BLOB READER access for
storage accounts used by tables in the workspace. The code's readability
and maintainability have been improved by modifying the method
`_can_administer` to `can_administer` and `_load_workspace_info` to
`load_workspace_info` in the `workspaces.py` file. A new
`join_collection` command has been added to the `ucx` application
instance to enable joining an existing installation to a collection.
Additionally, modifications to the `install.py` file and
`test_installation.py` file have been made to facilitate the integration
of existing installations into a collection. The tests have been updated
to ensure that the joining process works correctly in various scenarios.
Overall, these changes provide more flexibility and ease of use for
users and improve the interoperability and security of the system.
* Fixed `migrate-credential` cli command on AWS
([#1732](#1732)). In this
release, the `migrate-credential` CLI command for AWS has been improved
and fixed. The command now includes changes to the `access.py` file in
the `databricks/labs/ucx/aws` directory. Notable updates are the
refactoring of the `role_name` method into a dataclass called
`AWSCredentialCandidate`, the addition of the method
`_aws_role_trust_doc`, and the removal of the
`_databricks_trust_statement` method. The `_aws_s3_policy` method has
been updated to include `s3:PutObjectAcl` in the allowed actions, and
methods `_create_role` and `_get_role_access_task` have been updated to
use `arn` instead of `role_name`. Additionally, the `create_uc_role` and
`update_uc_trust_role` methods have been combined into a single
`update_uc_role` method. The `migrate-credentials` command in the
`cli.py` file has also been updated to support migration of AWS Instance
Profiles to UC storage credentials. These improvements resolve issue
[#1726](#1726) and enhance
the functionality and reliability of the `migrate-credential` command
for AWS.
* Fixed crasher when running migrate-local-code
([#1794](#1794)). In this
release, we have addressed a crasher issue that occurred when running
the `migrate-local-code` command. The change involves modifying the
`local_file_migrator` property in the `LocalCheckoutContext` class to
use a lambda function instead of directly passing `self.languages`. This
ensures that the languages are loaded only when the
`local_file_migrator` property is accessed, preventing unnecessary load
and potential crashes. The change does not introduce any new
functionalities, but instead modifies existing commands related to local
file migration. Comprehensive manual testing and unit tests have been
conducted to ensure the fix works as expected without negatively
impacting other parts of the system.
* Fixed inconsistent behavior in `%pip` cell handling
([#1785](#1785)). This PR
addresses inconsistent behavior in `%pip` cell handling by modifying
Python library installation to occur in a designated path lookup, rather
than deep within the library tree. These changes impact various
components, such as the `PipResolver` class, which no longer requires a
`FileLoader` instance as an argument and now takes a `Whitelist`
instance directly. Additionally, tests like `test_detect_s3fs_import`
and `test_detect_s3fs_import_in_dependencies` are affected by these
modifications. Overall, these changes streamline the `%pip` feature,
improving library installation efficiency and consistency.
* Fixed issue when creating view using `WITH` clause
([#1809](#1809)). In this
release, we have addressed an issue that occurred when creating a view
using a `WITH` clause, which was causing potential errors or incorrect
results due to improper handling of aliases. A new method,
`_read_aliases`, has been introduced to read and store aliases from the
`WITH` clause as a set, and during view dependency analysis, if an old
table's name matches an alias, it is now skipped to prevent
double-counting. This ensures improved accuracy and reliability of view
creation with `WITH` clauses. Moreover, the commit includes adjustments
to import statements, addition of unit tests, and the introduction of a
new class `TableView` in the
`databricks.labs.ucx.hive_metastore.view_migrate` module to test whether
a view with a local dataset should be skipped. This release also
includes a test for migrating a view with columns, ensuring that views
with local datasets are now handled correctly. The fix resolves issue
[#1798](#1798).
* Fixed linting for non-UTF8 encoded files
([#1804](#1804)). This
commit addresses linting issues for files that are not encoded in UTF-8,
improving compatibility with non-UTF-8 encoded files in the databricks
labs ucx project. Previously, the linter and fixer tools were unable to
process non-UTF-8 encoded files, causing them to fail. This issue has
been resolved by adding a check for file encoding during linting and
handling the case where the file is not encoded in UTF-8 by returning a
failure message. A new method, `getpreferredencoding(False)`, has been
introduced to determine the file's encoding, ensuring UTF-8
compatibility. Additionally, a new test method,
`test_file_linter_lints_non_ascii_encoded_file`, has been added to check
the linter's behavior with non-ASCII encoded files. This enhancement
simplifies the linting process, allowing for better file handling of
non-UTF-8 encoded files, and is supported by manual testing and unit
tests.
* Further fix for DENY permissions
([#1834](#1834)). This
commit addresses issue
[#1834](#1834) by
implementing a fix for handling DENY permissions in the legacy TACL
migration logic. Previously, all permissions were grouped in a single
GRANT statement, but they have now been updated to be split into
separate GRANT and DENY statements. This change improves the clarity and
maintainability of the code and also increases test coverage with the
addition of unit tests and integration tests. A new test function
`test_tacl_applier_deny_and_grant()` has been added to demonstrate the
use of the updated logic for handling DENY permissions. The resulting
SQL queries now include both GRANT and DENY statements, reflecting the
updated logic. These changes ensure that the DENY permissions are
correctly applied, increasing the overall test coverage and confidence
in the code.
* Removed false warning on DataFrame.insertInto() about the default
format changing from parquet to delta
([#1823](#1823)). This pull
request removes a false warning related to the use of
DataFrameWriter.insertInto(), which had been incorrectly flagging a
potential issue due to the default format change from Parquet to Delta.
The warning is now suppressed as it is no longer relevant, since the
operation ignores any specified format and uses the existing format of
the underlying table. Additionally, an unnecessary linting suppression
has been removed. These changes improve the accuracy of the warning
system and eliminate confusion for users, with no impact on
functionality, usability, or performance. The changes have been manually
tested and do not require any new unit or integration tests, CLI
commands, workflows, or tables.
* Support linting python wheel tasks
([#1821](#1821)). This
release introduces support for linting python wheel tasks, addressing
issue [#1](#1)
* Updated linting checks for Spark table methods
([#1816](#1816)). This
commit updates linting checks for PySpark's Spark table methods,
focusing on improving handling of migrated tables and deprecating direct
filesystem references in favor of the Unity Catalog. New tests and
examples include literal and variable references to known and unknown
tables, as well as cases with extra or out-of-position arguments. The
commit also highlights false positives and trivial references in
unrelated contexts. These changes aim to ensure proper usage of Spark
table methods, improve codebase consistency, and minimize potential
issues related to migrations and format changes.

Dependency updates:

* Updated sqlglot requirement from <24.1,>=23.9 to >=23.9,<24.2
([#1819](#1819)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: legacy Deny ACL is not handled
2 participants