Skip to content

Update for Databricks SDK 0.56+ #4178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 17, 2025
Merged

Update for Databricks SDK 0.56+ #4178

merged 3 commits into from
Jun 17, 2025

Conversation

asnare
Copy link
Contributor

@asnare asnare commented Jun 17, 2025

Changes

This PR updates the project to work with Databricks SDK 0.56+ which included breaking changes.

Incidental changes included adding type-hints to ensure that all the updated functions are linted; some were not, which prevented some of the breaking changes from being found during linting.

Linked issues

Supersedes #4144.

This PR is also required for the upstream blueprint, whose CI/CD always tests UCX with the latest available SDK (even if UCX specifies an earlier one):

Tests

  • existing unit tests
  • existing integration tests

@asnare asnare self-assigned this Jun 17, 2025
@asnare asnare requested a review from a team as a code owner June 17, 2025 13:18
@asnare asnare added this to UCX Jun 17, 2025
@asnare asnare added the dependencies Pull requests that update a dependency file label Jun 17, 2025
@asnare asnare temporarily deployed to account-admin June 17, 2025 13:18 — with GitHub Actions Inactive
@asnare asnare moved this to In Progress in UCX Jun 17, 2025
Copy link

✅ 55/55 passed, 25 skipped, 7h5m20s total

Running from acceptance #8653

@asnare asnare moved this from In Progress to Ready for Review in UCX Jun 17, 2025
Copy link
Contributor

@pritishpai pritishpai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@asnare asnare added this pull request to the merge queue Jun 17, 2025
Merged via the queue into main with commit b6dc22b Jun 17, 2025
8 checks passed
@asnare asnare deleted the update-databricks-sdk branch June 17, 2025 19:29
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in UCX Jun 17, 2025
gueniai added a commit that referenced this pull request Jul 3, 2025
* Added documentation for [#3963](#3963) ([#4020](#4020)). The workflow assessment functionality has been enhanced with an experimental task that analyzes recently executed workflows for migration problems, providing links to relevant documentation and recommendations for addressing identified issues. This task, labeled as experimental, now only runs for workflows executed within the last 30 days, but users can opt to analyze all workflows by running a specific workflow. The assessment findings, including any migration problems detected, can be viewed in the assessment dashboard, offering a centralized location for monitoring and addressing potential issues, and helping users to ensure a smoother migration process.
* Enhance documentation for UCX ([#4024](#4024)). The UCX documentation has undergone significant enhancements to improve user experience and provide comprehensive guidance for contributors and users. The main page has been revamped with a simplified and accelerated Unity Catalog migration process, featuring a prominent call-to-action and key features such as comprehensive assessment, automated migrations, and detailed reporting. Additional pages, including a `Getting Started` section, have been added to guide users through installation, running, and operating the toolkit, with links to relevant sections such as installation, running, and reference materials. The contributing section has been updated for consistency, and a new `How to Contribute` section has been introduced, providing clear resources for submitting issues, pull requests, and contributing to the documentation. The documentation structure has been reorganized, with updated sidebar positions and revised descriptions to better reflect the content and purpose of each section, ultimately aiming to provide better user documentation, clarity, and a more intuitive interface for navigating and utilizing the UCX toolkit.
* Fixes fmt and unit test failures from new blueprint release ([#4048](#4048)). The dependency on the databricks-labs-blueprint has been updated to a version range of 0.11.0 or higher but less than 0.12.0, incorporating new features and bug fixes from the latest blueprint release. To ensure compatibility with this updated version, the codebase has been updated to address breaking changes introduced in the recent blueprint release, including the addition of type hints to MockInstallation and the DEFAULT_CONFIG variable, which is now defined as a dictionary with string keys and RootJsonValue values. Furthermore, a previously failing unit test has been fixed, and the test_installation_recovers_invalid_dashboard function has been refactored into two separate test functions to verify the recovery of invalid dashboards due to InvalidParameterValue and NotFound exceptions, utilizing the MockInstallation class and caplog fixture to capture and verify log messages. These changes aim to resolve issues with the new blueprint release, enable previously failing acceptance tests, and improve the overall robustness of the installation process.
* Updated for Databricks SDK 0.56+ ([#4178](#4178)). The project's dependencies have been updated to support Databricks SDK version 0.56 and above, with the upper bound set to less than 0.58.0, to ensure compatibility with the evolving SDK. This update includes breaking changes, and as a result, various modifications have been made to the code, such as adding type hints to functions to improve linting, replacing `PermissionsList` with `GetPermissionsResponse`, and accessing `SecurableType` enum values using the `value` attribute. Additionally, several test functions have been updated to reflect these changes, including the addition of return type hints and the use of `create_autospec` to create mock objects. These updates aim to maintain the project's functionality and ensure seamless compatibility with the latest Databricks SDK version, while also improving code quality and test coverage. The changes affect various aspects of the code, including grants management, permissions retrieval, and test cases for different scenarios, such as migrating managed tables, external tables, and tables in mounts.
* Workaround for acceptance with dependabot PR ([#4029](#4029)). The library's dependency on a key SDK has been updated to support a broader version range, now compatible with versions from 0.44.0 up to but not including 0.54.0, enhancing flexibility and potentially allowing for the incorporation of new features or bug fixes introduced in these versions. Additionally, an internal function responsible for setting default catalog settings has been refined to handle `NotFound` exceptions more robustly. Specifically, the function now checks for the presence of metadata before attempting to retrieve an etag, preventing potential errors that could occur when metadata is missing, thereby improving the overall stability and reliability of the library.
@gueniai gueniai mentioned this pull request Jul 3, 2025
gueniai added a commit that referenced this pull request Jul 3, 2025
* Added documentation for
[#3963](#3963)
([#4020](#4020)). The
workflow assessment functionality has been enhanced with an experimental
task that analyzes recently executed workflows for migration problems,
providing links to relevant documentation and recommendations for
addressing identified issues. This task, labeled as experimental, now
only runs for workflows executed within the last 30 days, but users can
opt to analyze all workflows by running a specific workflow. The
assessment findings, including any migration problems detected, can be
viewed in the assessment dashboard, offering a centralized location for
monitoring and addressing potential issues, and helping users to ensure
a smoother migration process.
* Enhance documentation for UCX
([#4024](#4024)). The UCX
documentation has undergone significant enhancements to improve user
experience and provide comprehensive guidance for contributors and
users. The main page has been revamped with a simplified and accelerated
Unity Catalog migration process, featuring a prominent call-to-action
and key features such as comprehensive assessment, automated migrations,
and detailed reporting. Additional pages, including a `Getting Started`
section, have been added to guide users through installation, running,
and operating the toolkit, with links to relevant sections such as
installation, running, and reference materials. The contributing section
has been updated for consistency, and a new `How to Contribute` section
has been introduced, providing clear resources for submitting issues,
pull requests, and contributing to the documentation. The documentation
structure has been reorganized, with updated sidebar positions and
revised descriptions to better reflect the content and purpose of each
section, ultimately aiming to provide better user documentation,
clarity, and a more intuitive interface for navigating and utilizing the
UCX toolkit.
* Fixes fmt and unit test failures from new blueprint release
([#4048](#4048)). The
dependency on the databricks-labs-blueprint has been updated to a
version range of 0.11.0 or higher but less than 0.12.0, incorporating
new features and bug fixes from the latest blueprint release. To ensure
compatibility with this updated version, the codebase has been updated
to address breaking changes introduced in the recent blueprint release,
including the addition of type hints to MockInstallation and the
DEFAULT_CONFIG variable, which is now defined as a dictionary with
string keys and RootJsonValue values. Furthermore, a previously failing
unit test has been fixed, and the
test_installation_recovers_invalid_dashboard function has been
refactored into two separate test functions to verify the recovery of
invalid dashboards due to InvalidParameterValue and NotFound exceptions,
utilizing the MockInstallation class and caplog fixture to capture and
verify log messages. These changes aim to resolve issues with the new
blueprint release, enable previously failing acceptance tests, and
improve the overall robustness of the installation process.
* Updated for Databricks SDK 0.56+
([#4178](#4178)). The
project's dependencies have been updated to support Databricks SDK
version 0.56 and above, with the upper bound set to less than 0.58.0, to
ensure compatibility with the evolving SDK. This update includes
breaking changes, and as a result, various modifications have been made
to the code, such as adding type hints to functions to improve linting,
replacing `PermissionsList` with `GetPermissionsResponse`, and accessing
`SecurableType` enum values using the `value` attribute. Additionally,
several test functions have been updated to reflect these changes,
including the addition of return type hints and the use of
`create_autospec` to create mock objects. These updates aim to maintain
the project's functionality and ensure seamless compatibility with the
latest Databricks SDK version, while also improving code quality and
test coverage. The changes affect various aspects of the code, including
grants management, permissions retrieval, and test cases for different
scenarios, such as migrating managed tables, external tables, and tables
in mounts.
* Workaround for acceptance with dependabot PR
([#4029](#4029)). The
library's dependency on a key SDK has been updated to support a broader
version range, now compatible with versions from 0.44.0 up to but not
including 0.54.0, enhancing flexibility and potentially allowing for the
incorporation of new features or bug fixes introduced in these versions.
Additionally, an internal function responsible for setting default
catalog settings has been refined to handle `NotFound` exceptions more
robustly. Specifically, the function now checks for the presence of
metadata before attempting to retrieve an etag, preventing potential
errors that could occur when metadata is missing, thereby improving the
overall stability and reliability of the library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants