v0.21.0
- Ensure proper sequencing of view migrations (#1157). In this release, we have introduced a
views_migratormodule and corresponding test cases to ensure proper sequencing of view migrations, addressing issue #1132. The module contains two main classes:ViewToMigrateandViewsMigrator. The former is responsible for parsing a view's SQL text and identifying its dependencies, while the latter sequences views based on their dependencies. The commit also adds a new method,__hash__, to the Table class, which returns a hash value of the key of the table, improving the handling of Table objects. Additionally, we have added unit tests and verified the changes on a staging environment. We have also introduced a new filetables_and_views.jsonfor unit testing and added aviews_migratormodule that takes aTablesCrawlerobject and returns a sequence of tables (views) that need to be migrated in the correct order. The commit addresses various scenarios such as no views, direct views, indirect views, deep indirect views, invalid SQL, invalid SQL tables, and circular view references. This release is focused on improving the sequencing of view migrations and is accompanied by appropriate tests. - Experimental support for scanning Delta Tables inside Mount Points (#1095). This commit introduces experimental support for scanning Delta Tables located inside mount points using a new
TablesInMountscrawler. Users can now scan specific mount points using the--include-mountsflag and include Parquet files in the scan results with the--include-parquet-filesflag. Additionally, the--filter-pathsflag allows for filtering paths in a mount point and the--max-depthflag (currently unimplemented) will filter at a specific sub-folder depth in future development. The project dependencies have been updated to usedatabricks-labs-lsql~=0.3.0. This new feature provides a more granular and flexible way to scan Delta Tables, making the project more user-friendly and adaptable to various use cases. - Fixed
NULLvalues inucx.views.table_formatto haveUNKNOWNvalue instead (#1156). This commit includes a fix for handling NULL values in thetable_formatcolumn of Views in theucx.views.table_formatmodule. Previously, NULL values were displayed as-is, but now they will be replaced with the string "UNKNOWN". This change is part of the fix for issue #115 - Fixing run_workflow functionality for better error handling (#1159). In this release, the
run_workflowmethod in theworkflows.pyfile has been updated to improve error handling by waiting for the job to terminate or skip before raising an error, allowing for a more detailed error message to be generated. A new method,job_initial_run, has been added to initiate a job run and return the run ID, raising aNotFoundexception if the job run is not found. Therun_workflowfunctionality in theWorkflowsInstallmodule has also been enhanced to handle unexpected error types and improve overall error handling during the installation of products. New test cases have been added and existing ones updated to check how the code handles errors when the run ID is not found or when anOperationFailedexception is raised during the installation process. These changes improve the robustness and stability of the system. - Use experimental Permissions Migration API also for Legacy Table ACLs (#1161). This release introduces several changes to the group permissions migration functionality and associated tests. The experimental Permissions Migration API is now being utilized for Legacy Table ACLs, which has led to the removal of the verification step from the experimental group migration job. The
TableAclSupportimport and class have been removed, as they are no longer needed. A newapply_to_renamed_groupsmethod has been added for production usage, and aapply_to_groups_with_different_namesmethod has been added for integration testing, both of which are part of the Permissions Migration API. Additionally, two tests have been added to support the experimental permissions migration for a group with the same name in the workspace and account. Thepermission_managerparameter has been removed from several test functions in thetest_generic.pyfile and replaced with theMigrationStateclass, which is used directly with theWorkspaceClientobject to apply permissions to groups with different names. Thetest_some_entitlementsfunction in thetest_scim.pyfile has also been updated to use theMigratedGroupclass and theMigrationStateclass'sapply_to_groups_with_different_namesmethod. Finally, new tests for the Permissions Migration API have been added to thetest_tacl.pyfile in thetests/integration/workspace_accessdirectory to verify the behavior of the Permissions Migration API when migrating different grants.
Contributors: @ericvergnaud, @qziyuan, @nfx, @FastLee, @william-conti, @dmoore247, @pritishpai