Skip to content

Conversation

@ericvergnaud
Copy link
Contributor

@ericvergnaud ericvergnaud commented Sep 4, 2024

In complement to #257 , dataclass field type needs to be adjusted in other places.
This fix is required by databrickslabs/ucx#2526

@github-actions
Copy link

github-actions bot commented Sep 4, 2024

✅ 34/34 passed, 3 flaky, 3 skipped, 26m1s total

Flaky tests:

  • 🤪 test_dashboard_deploys_dashboard_with_counter_variation (11.66s)
  • 🤪 test_dashboard_deploys_dashboard_with_table (8.447s)
  • 🤪 test_dashboards_creates_dashboard_with_widget_title_and_description (8.482s)

Running from acceptance #374

Copy link
Collaborator

@nfx nfx left a comment

Choose a reason for hiding this comment

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

lgtm

@nfx nfx merged commit 21995fd into main Sep 4, 2024
@nfx nfx deleted the complete-fix-dataclass-field-types branch September 4, 2024 15:40
nfx added a commit that referenced this pull request Sep 4, 2024
* Added documentation for exclude flag ([#265](#265)). A new `exclude` flag has been added to the configuration file for our lab tool, allowing users to specify a path to exclude from formatting during lab execution. This release also includes corrections to grammatical errors in the descriptions of existing flags related to catalog and database settings, such as updating `seperated` to "separate". Additionally, the flag descriptions for `publish` and `open-browser` have been updated for clarification: `publish` now clearly controls whether the dashboard is published after creation, while `open-browser` controls whether the dashboard is opened in a web browser. These changes are aimed at improving user experience and ease of use for our lab tool.
* Fixed dataclass field type in _row_to_sql ([#266](#266)). In this release, we have addressed an issue related to [#257](#257) by fixing the dataclass field type in the `_row_to_sql` method of the `backends.py` file. Additionally, we have made updates to the `_schema_for` method to use a new `_field_type` class method. This change resolves a rare problem where the `field.type` is a string instead of a type and ensures compatibility with a pull request from an external repository (<databrickslabs/ucx#2526>). The new `_field_type` method attempts to load the type from `__builtins__` if it's a string and logs a warning if it fails. The `_row_to_sql` method now consistently uses the `_field_type` method to get the field type. This ensures that the library functions seamlessly and consistently, avoiding any potential issues in the future.
nfx added a commit that referenced this pull request Sep 4, 2024
* Added documentation for exclude flag
([#265](#265)). A new
`exclude` flag has been added to the configuration file for our lab
tool, allowing users to specify a path to exclude from formatting during
lab execution. This release also includes corrections to grammatical
errors in the descriptions of existing flags related to catalog and
database settings, such as updating `seperated` to "separate".
Additionally, the flag descriptions for `publish` and `open-browser`
have been updated for clarification: `publish` now clearly controls
whether the dashboard is published after creation, while `open-browser`
controls whether the dashboard is opened in a web browser. These changes
are aimed at improving user experience and ease of use for our lab tool.
* Fixed dataclass field type in _row_to_sql
([#266](#266)). In this
release, we have addressed an issue related to
[#257](#257) by fixing the
dataclass field type in the `_row_to_sql` method of the `backends.py`
file. Additionally, we have made updates to the `_schema_for` method to
use a new `_field_type` class method. This change resolves a rare
problem where the `field.type` is a string instead of a type and ensures
compatibility with a pull request from an external repository
(<databrickslabs/ucx#2526>). The new
`_field_type` method attempts to load the type from `__builtins__` if
it's a string and logs a warning if it fails. The `_row_to_sql` method
now consistently uses the `_field_type` method to get the field type.
This ensures that the library functions seamlessly and consistently,
avoiding any potential issues in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants