Skip to content

Commit 257aede

Browse files
authored
Release v0.15.0 (#364)
* Validate resource names ([#357](#357)). In this update, we introduce resource name validation for the Lakeview API, allowing only alphanumeric characters, hyphens, and underscores. A new method, `_is_valid_resource_name`, has been added to facilitate validation. Existing classes, like `BaseHandler`, `TileMetadata`, and various methods, have been updated to incorporate this validation. If a resource name fails validation, a ValueError will be raised. The `TileMetadata` class has also been updated to modify the naming convention of filter tile IDs. Additionally, new unit tests have been implemented to ensure proper validation of tile IDs, names, and filter specifications, enhancing consistency and readability in dashboard metadata. Issues [#355](#355), [#356](#356), and [#354](#354) have been addressed in this commit.
1 parent a3d7b62 commit 257aede

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Version changelog
22

3+
## 0.15.0
4+
5+
* Validate resource names ([#357](https://github.com/databrickslabs/lsql/issues/357)). In this update, we introduce resource name validation for the Lakeview API, allowing only alphanumeric characters, hyphens, and underscores. A new method, `_is_valid_resource_name`, has been added to facilitate validation. Existing classes, like `BaseHandler`, `TileMetadata`, and various methods, have been updated to incorporate this validation. If a resource name fails validation, a ValueError will be raised. The `TileMetadata` class has also been updated to modify the naming convention of filter tile IDs. Additionally, new unit tests have been implemented to ensure proper validation of tile IDs, names, and filter specifications, enhancing consistency and readability in dashboard metadata. Issues [#355](https://github.com/databrickslabs/lsql/issues/355), [#356](https://github.com/databrickslabs/lsql/issues/356), and [#354](https://github.com/databrickslabs/lsql/issues/354) have been addressed in this commit.
6+
7+
38
## 0.14.2
49

510
* Validate resource names ([#357](https://github.com/databrickslabs/lsql/issues/357)). This pull request introduces a validation feature to the `ucx` project for resource names, specifically for dashboard tile IDs. The new naming convention restricts resource names to alphanumeric characters, hyphens, and underscores, enhancing usability and reducing potential issues caused by special characters. A new method, `_is_valid_resource_name`, is implemented to check if a name is valid based on the defined pattern. The `TileMetadata` class is updated to ensure its `id` attribute adheres to the new validation rules, and a `validate` method is added to raise a `ValueError` if the tile metadata is invalid. This method checks if the `id` attribute is not empty and if it is a valid resource name. Additionally, the `validate` method is updated in the `Tile`, `Section`, and `Dashboard` classes to call the `validate` method of the `TileMetadata` instance, if it exists. The pull request also includes tests for the new validation functionality, ensuring that tile IDs cannot be empty, must contain only alphanumeric characters, hyphens, and underscores, and that the `validate` method detects duplicate query IDs and widget IDs. This validation helps maintain consistency and correctness in dashboard resources, making it easier for users to manage and interact with their dashboards.

0 commit comments

Comments
 (0)