v0.31.0
- Added handling for corrupted dashboard state in installation process (#2262). This commit introduces a new method,
_handle_existing_dashboard, to manage various scenarios related to an existing dashboard during the installation process of UCX, including updating, upgrading from Redash to Lakeview, handling trashed dashboards, and recovering corrupted dashboard references. The_create_dashboardmethod now requires a non-nullparent_pathand has updated its docstring. New unit and integration tests have been added to verify the changes, with a particular focus on handling corrupted dashboard state during the installation process. - Added support for migrating Table ACL for SQL Warehouse cluster in AWS using Instance Profile and Azure using SPN (#2258). This pull request introduces support for migrating Table Access Control (ACL) for SQL Warehouse clusters in Amazon Web Services (AWS) using Instance Profiles and Azure using Service Principal Names (SPNs). It includes identifying SQL Warehouse instances, associated Instance Profiles/SPNs, and principals with access to the warehouse, as well as retrieving their permissions and external locations. The code has been enhanced to represent compute and associated permissions more flexibly, improving the project's handling of both clusters and warehouses. New test cases and a retry mechanism for transient errors have been implemented to ensure robustness. The
AzureServicePrincipalCrawlerclass has been added for managing SQL Warehouses using SPNs in Azure and Instance Profiles in AWS. These changes resolve issue #2238 and enhance the project's ability to handle ACL migration for SQL Warehouse clusters in AWS and Azure. - Consistently have
db-temp-as the backup prefix for renaming groups (#2266). In this release, we are implementing a consistent backup prefix for renaming workspace groups during migration, ensuring codebase and documentation consistency. Thedb-temp-prefix is now used for renaming groups, replacing the previousucx-renamed-prefix in therename_workspace_local_groupstask. This change mitigates potential conflicts with account-level groups of the same name. The group migration workflow remains unaltered, except for therename_workspace_local_groupstask that now uses the new prefix. Affected files include 'config.py', 'groups.py', and 'test_groups.py', with corresponding changes in theWorkspaceConfigclass,Groupsclass, and test cases. This feature is experimental, subject to further development, and may change in the future. - Fixed
astroidin the upload_dependencies (#2267). In this update, we have added theastroidlibrary as a dependent library for UCX in theupload_wheel_dependenciesfunction to resolve the reported issue #2257. Previously, the absence ofastroidfrom the dependencies caused problems in certain workspaces. To address this, we modified the_upload_wheelfunction to includeastroidin the list of libraries uploaded as wheel dependencies. This change has been manually tested and confirmed to work in a blocked workspace. No new methods have been added, and existing functionality has been updated within the_upload_wheelfunction to includeastroidin the uploaded dependencies. - Group migration: improve robustness when renaming groups (#2263). This pull request introduces changes to the group migration functionality to improve its robustness when renaming groups. Instead of assuming that a group rename has taken effect immediately after renaming it, the code now double-checks to ensure that the rename has taken place. This change affects the
migrate-groupsandmigrate-groups-experimentalworkflows, which have been modified accordingly. Additionally, unit tests and existing integration tests have been updated to account for these changes. Thetest_rename_groups_should_patch_eligible_groupsandtest_rename_groups_should_wait_for_renames_to_completetests have been updated to include a mocksleepfunction, allowing for more thorough testing of the rename process. Thelistandgetmethods of theworkspace_clientare mocked to return different values at different times, simulating the various stages of the rename process. This allows the tests to thoroughly exercise the code that handles group renames and ensures that it handles failure and success cases correctly. The methods_rename_group,_wait_for_group_rename, and_wait_for_renamed_groupshave been added or modified to support this functionality. The_wait_for_workspace_group_deletionand_check_workspace_group_deletionmethods have also been updated to support the deletion of original workspace groups. Thedelete_original_workspace_groupsmethod has been modified to use these new and updated methods for deleting groups and confirming that the deletion has taken effect. - Install state misses
dashboardsfields (#2275). In this release, we have resolved a bug related to the installation process in thedatabricks/labs/blueprintproject that resulted in the omission of thedashboardsfield from the installation state. This bug was introduced in a previous update (#2229) which parallelized the installation process. This commit addresses the issue by saving the installation state at the end of theWorkspaceInstallation.runmethod, ensuring that thedashboardsfield is included in the state. Additionally, a new method_install_state.save()has been added to save the installation state. The changes also include adding a new methodInstallState.from_installation()and a new test casetest_installation_stores_install_state_keys()to retrieve the installation state and check for the presence of specific keys (jobsanddashboards). Thetest_uninstallation()test case has been updated to ensure that the installation and uninstallation processes work correctly. These changes enhance the installation and uninstallation functionality for thedatabricks/labs/blueprintproject by ensuring that the installation state is saved correctly and that thejobsanddashboardskeys are stored as expected, providing improved coverage and increased confidence in the functionality. The changes affect the existing commanddatabricks labs install ucx. - Use deterministic names to create AWS external locations (#2271). In this release, we have introduced deterministic naming for AWS external locations in our open-source library, addressing issue #2270. The
runmethod in thelocations.pyfile has been updated to generate deterministic names for external locations using the new_generate_external_location_namemethod. This method generates names based on the lowercase parts of a file path, joined by underscores, instead of using a prefix and a counter. Additionally, test cases for creating external locations in AWS have been updated to use the new naming convention, improving the predictability and consistency of the external location names. These changes simplify the management and validation of external locations, making it easier for software engineers to maintain and control the names of the external locations.
Contributors: @asnare, @HariGS-DB, @JCZuurmond, @pritishpai, @nfx, @FastLee