v0.3.0
- Added automated upgrade framework (#50). This update introduces an automated upgrade framework for managing and applying upgrades to the product, with a new
upgrades.pyfile that includes aProductInfoclass having methods for version handling, wheel building, and exception handling. The test code organization has been improved, and new test cases, functions, and a directory structure for fixtures and unit tests have been added for the upgrades functionality. Thetest_wheels.pyfile now checks the version of the Databricks SDK and handles cases where the version marker is missing or does not contain the__version__variable. Additionally, a newApplication State Migrationssection has been added to the README, explaining the process of seamless upgrades from version X to version Z through version Y, addressing the need for configuration or database state migrations as the application evolves. Users can apply these upgrades by following an idiomatic usage pattern involving several classes and functions. Furthermore, improvements have been made to the_trim_leading_whitespacefunction in thecommands.pyfile of thedatabricks.labs.blueprintmodule, ensuring accurate and consistent removal of leading whitespace for each line in the command string, leading to better overall functionality and maintainability. - Added brute-forcing
SerdeErrorwithas_dict()andfrom_dict()(#58). This commit introduces a brute-forcing approach for handlingSerdeErrorusingas_dict()andfrom_dict()methods in an open-source library. The newSomePolicyclass demonstrates the usage of these methods for manual serialization and deserialization of custom classes. Theas_dict()method returns a dictionary representation of the class instance, and thefrom_dict()method, decorated with@classmethod, creates a new instance from the provided dictionary. Additionally, the GitHub Actions workflow for acceptance tests has been updated to include theready_for_reviewevent type, ensuring that tests run not only for opened and synchronized pull requests but also when marked as "ready for review." These changes provide developers with more control over the deserialization process and facilitate debugging in cases where default deserialization fails, but should be used judiciously to avoid brittle code. - Fixed nightly integration tests run as service principals (#52). In this release, we have enhanced the compatibility of our codebase with service principals, particularly in the context of nightly integration tests. The
Installationclass in thedatabricks.labs.blueprint.installationmodule has been refactored, deprecating thecurrentmethod and introducing two new methods:assume_globalandassume_user_home. These methods enable users to install and manageblueprintas either a global or user-specific installation. Additionally, theexistingmethod has been updated to work with the newInstallationmethods. In the test suite, thetest_installation.pyfile has been updated to correctly detect global and user-specific installations when running as a service principal. These changes improve the testability and functionality of our software, ensuring seamless operation with service principals during nightly integration tests. - Made
test_existing_installations_are_detectedmore resilient (#51). In this release, we have added a new test functiontest_existing_installations_are_detectedthat checks if existing installations are correctly detected and retries the test for up to 15 seconds if they are not. This improves the reliability of the test by making it more resilient to potential intermittent failures. We have also added an import fromdatabricks.sdk.retriesnamedretriedwhich is used to retry the test function in case of anAssertionError. Additionally, the test functiontest_existinghas been renamed totest_existing_installations_are_detectedand thexfailmarker has been removed. We have also renamed the test functiontest_dataclasstotest_loading_dataclass_from_installationfor better clarity. This change will help ensure that the library is correctly detecting existing installations and improve the overall quality of the codebase.
Contributors: @nfx