You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adopt installation package from databricks-labs-blueprint (#860)
1. The `pyproject.toml` file, which is used to manage the dependencies
and metadata of the project, has been updated to upgrade the version of
the `databricks-labs-blueprint` dependency from `0.2.2` to `0.2.4`.
2. The pull request also introduces changes to the `account.py` file in
the `databricks.labs.ucx` package. The changes include the addition of a
new `Installation` class from the
`databricks.labs.blueprint.installation` module and the removal of the
`InstallationManager` class. The `AccountWorkspaces` class has been
updated to accept an `Installation` object instead of an `AccountConfig`
object, and the `sync_workspace_info` method has been updated to use the
`Installation.save` method instead of writing the workspace info to a
JSON file.
3. The `aws.py` and `azure.py` files in the
`databricks.labs.ucx.assessment` package have also been updated to use
the `Installation` object instead of the `WorkspaceClient` object. The
`AzureResourcePermissions` and `AWSResourcePermissions` classes have
been updated to accept an `Installation` object and a `WorkspaceClient`
object as arguments, and the `save_spn_permissions` and
`save_instance_profile_permissions` methods have been updated to use the
`Installation.save` method instead of writing the permission info to a
CSV file.
4. The `cli.py` file in the `databricks.labs.ucx` package has been
updated to use the `Installation` object instead of the
`InstallationManager` object. The `installations` command has been
updated to use the `Installation.existing` method instead of the
`InstallationManager.user_installations` method. The `skip` command has
been updated to use the `TableMapping.current` method instead of the
`TableMapping.for_cli` method. The `sync_workspace_info` command has
been updated to use the `AccountWorkspaces.sync_workspace_info` method
instead of the `AccountWorkspaces.sync_workspace_info` method. The
`create_table_mapping` command has been updated to use the
`TableMapping.current` method instead of the `TableMapping.for_cli`
method. The `validate_external_locations` command has been updated to
use the `ExternalLocations.save_as_terraform_definitions_on_workspace`
method instead of the
`ExternalLocations.save_as_terraform_definitions_on_workspace` method.
The `ensure_assessment_run` command has been updated to use the
`WorkspaceInstallation.validate_and_run` method instead of the
`WorkspaceInstaller.validate_and_run` method. The `repair_run` command
has been updated to use the `WorkspaceInstallation.repair_run` method
instead of the `WorkspaceInstaller.repair_run` method. The
`validate_groups_membership` command has been updated to use the
`GroupManager.validate_group_membership` method instead of the
`GroupManager.validate_group_membership` method. The
`revert_migrated_tables` command has been updated to use the
`TablesMigrate.revert_migrated_tables` method instead of the
`TablesMigrate.revert_migrated_tables` method. The `move` and `alias`
commands have been updated to use the `TableMove.for_cli` method instead
of the `TableMove.for_cli` method. The `save_azure_storage_accounts`
command has been updated to use the `AzureResourcePermissions.for_cli`
method instead of the `AzureResourcePermissions.for_cli` method. The
`save_aws_iam_profiles` command has been updated to use the
`AWSResourcePermissions.for_cli` method instead of the
`AWSResourcePermissions.for_cli` method.
5. The `config.py` file in the `databricks.labs.ucx` package has been
updated to add a new `WorkspaceConfig` class and remove the
`AccountConfig` class. The `WorkspaceConfig` class has been updated to
include a new `connect` field, which is used to store the configuration
of the Databricks workspace. The `AccountConfig.from_dict` and
`WorkspaceConfig.from_dict` methods have been updated to migrate the
configuration from the old format to the new format. The
`AccountConfig.to_account_client` and
`WorkspaceConfig.to_workspace_client` methods have been removed, as they
are no longer needed.
6. The `crawlers.py` file in the `databricks.labs.ucx.framework` package
has been updated to add a new `DatabricksError` class, which is used to
raise exceptions when an error occurs during the execution of a SQL
statement. The `RuntimeBackend` and `SqlBackend` classes have been
updated to accept a new `debug_truncate_bytes` argument, which is used
to specify the maximum number of bytes to be printed when logging a SQL
statement. The `SqlBackend.execute` and `SqlBackend.fetch` methods have
been updated to raise a `DatabricksError` exception if an error occurs
during the execution of a SQL statement. The `CrawlerBase` class has
been updated to accept a new `SqlBackend` argument, which is used to
execute SQL statements.
7. The `dashboards.py` file in the `databricks.labs.ucx.framework`
package has been updated to add a new `Task` class, which is used to
define the tasks that can be executed by the `trigger` command. The
`Task` class has been updated to include a new `fn` field, which is used
to specify the function that should be executed when the task is run.
The `trigger` command has been updated to use the `Task.fn` field
instead of the `Task.fn` field.
8. The `locations.py` file in the `databricks.labs.ucx.hive_metastore`
package has been updated to add a new `Installation` class from the
`databricks.labs.blueprint.installation` module and remove the
`WorkspaceInfo` class. The `ExternalLocations` class has been updated to
accept an `Installation` object instead of a `WorkspaceClient` object.
The `save_as_terraform_definitions_on_workspace` method has been updated
to use the `Installation.upload` method instead of writing the external
location definitions to a file.
9. The `mapping.py` file in the `databricks.labs.ucx.hive_metastore`
package has been updated to add a new `Installation` class from the
`databricks.labs.blueprint.installation` module and remove the
`WorkspaceInfo` class. The `TableMapping` class has been updated to
accept an `Installation` object and a `WorkspaceClient` object as
arguments. The `save` method has been updated to use the
`Installation.save` method instead of writing the mapping to a CSV file.
The `load` method has been updated to use the `Installation.load` method
instead of reading the mapping from a CSV file. The `skip_table` and
`skip_schema` methods have been updated to use the
`Installation.execute` method instead of executing SQL statements
directly. The `get_tables_to_migrate` method has been updated to use the
`Installation.execute` method instead of executing SQL statements
directly.
In summary, this pull request introduces several changes to the
Databricks Labs project, including updates to the `labs.yml` and
`pyproject.toml` files, the addition of a new `Installation` class, the
removal of the `InstallationManager` class, the update of several
classes to use the `Installation` object instead of the
`WorkspaceClient` object, and the addition of a new `Task` class. These
changes aim to improve the usability and maintainability of the project.
0 commit comments