Skip to content

Commit

Permalink
Release v0.3.1 (#61)
Browse files Browse the repository at this point in the history
* Fixed the order of marshal to handle Dataclass with as_dict before
other types to avoid SerdeError
([#60](#60)). In this
release, we have addressed an issue that caused a SerdeError during the
installation.save operation with a Dataclass object. The error was due
to the order of evaluation in the _marshal_dataclass method. The order
has been updated to evaluate the `as_dict` method first if it exists in
the Dataclass, which resolves the SerdeError. To ensure the correctness
of the fix, we have added a new test_data_class function that tests the
save and load functionality with a Dataclass object. The test defines a
Policy Dataclass with an `as_dict` method that returns a dictionary
representation of the object and checks if the file is written correctly
and if the loaded object matches the original object. This change has
been thoroughly unit tested to ensure that it works as expected.
  • Loading branch information
nfx authored Mar 5, 2024
1 parent 4297af6 commit f9909ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Version changelog

## 0.3.1

* Fixed the order of marshal to handle Dataclass with as_dict before other types to avoid SerdeError ([#60](https://github.com/databrickslabs/blueprint/issues/60)). In this release, we have addressed an issue that caused a SerdeError during the installation.save operation with a Dataclass object. The error was due to the order of evaluation in the _marshal_dataclass method. The order has been updated to evaluate the `as_dict` method first if it exists in the Dataclass, which resolves the SerdeError. To ensure the correctness of the fix, we have added a new test_data_class function that tests the save and load functionality with a Dataclass object. The test defines a Policy Dataclass with an `as_dict` method that returns a dictionary representation of the object and checks if the file is written correctly and if the loaded object matches the original object. This change has been thoroughly unit tested to ensure that it works as expected.


## 0.3.0

* Added automated upgrade framework ([#50](https://github.com/databrickslabs/blueprint/issues/50)). This update introduces an automated upgrade framework for managing and applying upgrades to the product, with a new `upgrades.py` file that includes a `ProductInfo` class 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. The `test_wheels.py` file 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 new `Application State Migrations` section 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_whitespace` function in the `commands.py` file of the `databricks.labs.blueprint` module, ensuring accurate and consistent removal of leading whitespace for each line in the command string, leading to better overall functionality and maintainability.
Expand Down
2 changes: 1 addition & 1 deletion src/databricks/labs/blueprint/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.0"
__version__ = "0.3.1"

0 comments on commit f9909ba

Please sign in to comment.