Skip to content

Commit cdb7709

Browse files
authored
New dashboard: group migration, showing groups that failed to migrate. (#2333)
## Changes This PR introduces a new dashboard focused on group migration. It currently has a widget that displays messages relating to groups that failed to migrate properly as part of the `migrate-groups-experimental` workflow. ### Linked issues Resolves #1914. ### Functionality - New dashboard: `UCX Migration (Groups)` ### Tests - manually tested - verified on staging environment (screenshot to be attached)
1 parent e07c443 commit cdb7709

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
height: 5
3+
---
4+
5+
Workspace Group Migration
6+
=========================
7+
8+
[Quick link to the group migration documentation.](https://github.com/databrickslabs/ucx/blob/main/docs/local-group-migration.md)
9+
10+
Prerequisites for group migration are:
11+
12+
- The assessment workflow has completed.
13+
- For each workspace group a corresponding account-level group must exist.
14+
15+
Group migration performs the following steps:
16+
17+
1. Workspace groups are renamed to a temporary name.
18+
2. The account-level groups are then provisioned into the workspace.
19+
3. Permissions assigned to the workspace groups are replicated on the account-level groups.
20+
21+
These steps are performed by either the `migrate-groups` or the `migrate-groups-experimental` workflows. (The latter uses a faster, but experimental, method to replicate group permissions.)
22+
23+
Once group migration has taken place:
24+
25+
- The `validate-groups-permissions` workflow can be used to check that permissions were correctly duplicated.
26+
- The `remove-workspace-local-backup-groups` workflow can be used to remove the (original) workspace-level groups.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
height: 4
3+
width: 2
4+
---
5+
6+
Group Migration Failures
7+
------------------------
8+
9+
When migrating groups, errors may occur during the migration of a particular group. Any errors that occurred while migrating groups are displayed here.
10+
11+
The errors for all workflow runs are shown; to clear (old) errors the job run can be deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* --title 'Group Migration Failures' --height 4 --width 4 */ /*
2+
*
3+
* Messages that we're looking for are of the form:
4+
* failed-group-migration: {name_in_workspace} -> {name_in_account}: {reason}
5+
*/
6+
SELECT
7+
FROM_UNIXTIME(timestamp) AS timestamp,
8+
job_run_id,
9+
level,
10+
message
11+
FROM inventory.logs
12+
WHERE
13+
workflow_name IN ('migrate-groups', 'migrate-groups-experimental') AND STARTSWITH(message, 'failed-group-migration:')
14+
ORDER BY
15+
1

0 commit comments

Comments
 (0)