Conversation
|
This PR breaks backwards compatibility for databrickslabs/blueprint downstream. See build logs for more details. Running from downstreams #459 |
|
This PR breaks backwards compatibility for databrickslabs/ucx downstream. See build logs for more details. Running from downstreams #459 |
mgyucht
commented
Sep 12, 2024
| import requests | ||
|
|
||
|
|
||
| class _ErrorDeserializer(abc.ABC): |
Contributor
Author
There was a problem hiding this comment.
Renamed to _ErrorDeserializer and moved here from parser.py.
| from .private_link import (_get_private_link_validation_error, | ||
| _is_private_link_redirect) | ||
|
|
||
|
|
Contributor
Author
There was a problem hiding this comment.
Moved to deserializers.py, and replaced Parser -> Deserializer.
hectorcast-db
approved these changes
Sep 12, 2024
renaudhartert-db
requested changes
Sep 13, 2024
renaudhartert-db
approved these changes
Sep 13, 2024
Contributor
renaudhartert-db
left a comment
There was a problem hiding this comment.
LGTM, just a small typo left.
tanmay-db
added a commit
that referenced
this pull request
Sep 16, 2024
### New Features and Improvements * Support Models in `dbutils.fs` operations ([#750](#750)). ### Bug Fixes * Do not specify --tenant flag when fetching managed identity access token from the CLI ([#748](#748)). * Fix deserialization of 401/403 errors ([#758](#758)). * Use correct optional typing in `WorkspaceClient` for `mypy` ([#760](#760)).
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 17, 2024
### New Features and Improvements * Support Models in `dbutils.fs` operations ([#750](#750)). ### Bug Fixes * Do not specify --tenant flag when fetching managed identity access token from the CLI ([#748](#748)). * Fix deserialization of 401/403 errors ([#758](#758)). * Use correct optional typing in `WorkspaceClient` for `mypy` ([#760](#760)).
aravind-segu
pushed a commit
to aravind-segu/databricks-sdk-py
that referenced
this pull request
Sep 18, 2024
## Changes databricks#741 introduced a change to how an error message was modified in `ApiClient._perform`. Previously, arguments to the DatabricksError constructor were modified as a dictionary in `_perform`. After that change, `get_api_error` started to return a `DatabricksError` instance whose attributes were modified. The `message` attribute referred to in that change does not exist in the DatabricksError class: there is a `message` constructor parameter, but it is not set as an attribute. This PR refactors the error handling logic slightly to restore the original behavior. In doing this, we decouple all error-parsing and customizing logic out of ApiClient. This also sets us up to allow for further extension of error parsing and customization in the future, a feature that I have seen present in other SDKs. Fixes databricks#755. ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] `make test` run locally - [ ] `make fmt` applied - [ ] relevant integration tests applied
aravind-segu
pushed a commit
to aravind-segu/databricks-sdk-py
that referenced
this pull request
Sep 18, 2024
### New Features and Improvements * Support Models in `dbutils.fs` operations ([databricks#750](databricks#750)). ### Bug Fixes * Do not specify --tenant flag when fetching managed identity access token from the CLI ([databricks#748](databricks#748)). * Fix deserialization of 401/403 errors ([databricks#758](databricks#758)). * Use correct optional typing in `WorkspaceClient` for `mypy` ([databricks#760](databricks#760)).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
#741 introduced a change to how an error message was modified in
ApiClient._perform. Previously, arguments to the DatabricksError constructor were modified as a dictionary in_perform. After that change,get_api_errorstarted to return aDatabricksErrorinstance whose attributes were modified. Themessageattribute referred to in that change does not exist in the DatabricksError class: there is amessageconstructor parameter, but it is not set as an attribute.This PR refactors the error handling logic slightly to restore the original behavior. In doing this, we decouple all error-parsing and customizing logic out of ApiClient. This also sets us up to allow for further extension of error parsing and customization in the future, a feature that I have seen present in other SDKs.
Fixes #755.
Tests
make testrun locallymake fmtapplied