Skip to content

Commit

Permalink
New dashboard: group migration, showing groups that failed to migrate. (
Browse files Browse the repository at this point in the history
#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)
  • Loading branch information
asnare authored Jul 31, 2024
1 parent e07c443 commit cdb7709
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
height: 5
---

Workspace Group Migration
=========================

[Quick link to the group migration documentation.](https://github.com/databrickslabs/ucx/blob/main/docs/local-group-migration.md)

Prerequisites for group migration are:

- The assessment workflow has completed.
- For each workspace group a corresponding account-level group must exist.

Group migration performs the following steps:

1. Workspace groups are renamed to a temporary name.
2. The account-level groups are then provisioned into the workspace.
3. Permissions assigned to the workspace groups are replicated on the account-level groups.

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.)

Once group migration has taken place:

- The `validate-groups-permissions` workflow can be used to check that permissions were correctly duplicated.
- The `remove-workspace-local-backup-groups` workflow can be used to remove the (original) workspace-level groups.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
height: 4
width: 2
---

Group Migration Failures
------------------------

When migrating groups, errors may occur during the migration of a particular group. Any errors that occurred while migrating groups are displayed here.

The errors for all workflow runs are shown; to clear (old) errors the job run can be deleted.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* --title 'Group Migration Failures' --height 4 --width 4 */ /*
*
* Messages that we're looking for are of the form:
* failed-group-migration: {name_in_workspace} -> {name_in_account}: {reason}
*/
SELECT
FROM_UNIXTIME(timestamp) AS timestamp,
job_run_id,
level,
message
FROM inventory.logs
WHERE
workflow_name IN ('migrate-groups', 'migrate-groups-experimental') AND STARTSWITH(message, 'failed-group-migration:')
ORDER BY
1

0 comments on commit cdb7709

Please sign in to comment.