From 27f22c0c145092ccb12b3ada74a2a47947f53e74 Mon Sep 17 00:00:00 2001 From: Guenia Izquierdo Delgado Date: Mon, 13 Jan 2025 16:32:09 -0500 Subject: [PATCH] Release v0.10.0 (#184) * Fixed incorrect script for no-pylint-disable ([#178](https://github.com/databrickslabs/blueprint/issues/178)). In this release, we have updated the script used in the `no-cheat` GitHub workflow to address false positives in stacked pull requests. The updated script fetches the base reference from the remote repository and generates a diff between the base reference and the current branch, saving it to a file. It then runs the "no_cheat.py" script against this diff file and saves the results to a separate file. If the count of cheats (instances where linting has been intentionally disabled) is greater than one, the script outputs the contents of the results file and exits with a non-zero status, indicating an error. This change enhances the accuracy of the script and ensures it functions correctly in a stacked pull request scenario. The `no_cheat` function, which checks for the presence of certain pylint disable tags in a given diff text, has been updated to the latest version from the ucx project to improve accuracy. The function identifies tags by looking for lines starting with `-` or "+" followed by the disable tag and a list of codes, and counts the number of times each code is added and removed, reporting any net additions. * Skip dataclassess fields only when `None` ([#180](https://github.com/databrickslabs/blueprint/issues/180)). In this release, we have implemented a change that allows for the skipping of dataclass fields only when the value is `None`, enabling the inclusion of empty lists, strings, or zeros during marshalling. This modification is in response to issue [#179](https://github.com/databrickslabs/blueprint/issues/179) and involves adding a check for `None` before marshalling a dataclass field. Specifically, the previous condition `if not raw:` has been replaced with `if raw is None:`. This change ensures that empty values such as `[]`, `''`, or `0` are not skipped during the serialization process, unless they are explicitly set to `None`. This enhancement provides improved compatibility and flexibility for users working with dataclasses containing empty values, allowing for more fine-grained control during the serialization process. Dependency updates: * Bump codecov/codecov-action from 4 to 5 ([#174](https://github.com/databrickslabs/blueprint/pull/174)). --- CHANGELOG.md | 9 +++++++++ src/databricks/labs/blueprint/__about__.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dd75e4..b2a0dae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Version changelog +## 0.10.0 + +* Fixed incorrect script for no-pylint-disable ([#178](https://github.com/databrickslabs/blueprint/issues/178)). In this release, we have updated the script used in the `no-cheat` GitHub workflow to address false positives in stacked pull requests. The updated script fetches the base reference from the remote repository and generates a diff between the base reference and the current branch, saving it to a file. It then runs the "no_cheat.py" script against this diff file and saves the results to a separate file. If the count of cheats (instances where linting has been intentionally disabled) is greater than one, the script outputs the contents of the results file and exits with a non-zero status, indicating an error. This change enhances the accuracy of the script and ensures it functions correctly in a stacked pull request scenario. The `no_cheat` function, which checks for the presence of certain pylint disable tags in a given diff text, has been updated to the latest version from the ucx project to improve accuracy. The function identifies tags by looking for lines starting with `-` or "+" followed by the disable tag and a list of codes, and counts the number of times each code is added and removed, reporting any net additions. +* Skip dataclassess fields only when `None` ([#180](https://github.com/databrickslabs/blueprint/issues/180)). In this release, we have implemented a change that allows for the skipping of dataclass fields only when the value is `None`, enabling the inclusion of empty lists, strings, or zeros during marshalling. This modification is in response to issue [#179](https://github.com/databrickslabs/blueprint/issues/179) and involves adding a check for `None` before marshalling a dataclass field. Specifically, the previous condition `if not raw:` has been replaced with `if raw is None:`. This change ensures that empty values such as `[]`, `''`, or `0` are not skipped during the serialization process, unless they are explicitly set to `None`. This enhancement provides improved compatibility and flexibility for users working with dataclasses containing empty values, allowing for more fine-grained control during the serialization process. + +Dependency updates: + + * Bump codecov/codecov-action from 4 to 5 ([#174](https://github.com/databrickslabs/blueprint/pull/174)). + ## 0.9.3 * Fixed issue when Databricks SDK config objects were overridden for installation config files ([#170](https://github.com/databrickslabs/blueprint/issues/170)). This commit addresses an issue where Databricks SDK config objects were being overridden during installation config files creation, which has been resolved by modifying the `_marshal` method in the `installation` class to handle `databricks.sdk.core.Config` instances more carefully, and by introducing a new helper function `get_databricks_sdk_config` in the `paths.py` file, which retrieves the Databricks SDK configuration and improves the reliability and robustness of the SDK configuration. This fixes bug [#169](https://github.com/databrickslabs/blueprint/issues/169) and ensures that the SDK configuration is not accidentally modified during the installation process, preventing unexpected behavior and errors. The changes are isolated to the `paths.py` file and do not affect other parts of the codebase. diff --git a/src/databricks/labs/blueprint/__about__.py b/src/databricks/labs/blueprint/__about__.py index c598173..61fb31c 100644 --- a/src/databricks/labs/blueprint/__about__.py +++ b/src/databricks/labs/blueprint/__about__.py @@ -1 +1 @@ -__version__ = "0.9.3" +__version__ = "0.10.0"