Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace Conf fails to get status #128

Closed
jaydm26 opened this issue May 23, 2023 · 2 comments · Fixed by #525
Closed

Workspace Conf fails to get status #128

jaydm26 opened this issue May 23, 2023 · 2 comments · Fixed by #525
Assignees
Labels
codegen issues related to generated code

Comments

@jaydm26
Copy link

jaydm26 commented May 23, 2023

Hello,

When using the workspace_conf.get_status() in the WorkspaceClient, the method does not work and returns an AttributeError: type object 'dict' has no attribute 'from_dict'. I believe WorkspaceConf is just a dictionary and thus, it is raising an Attribute Error. Could you please verify and confirm if this is correct.

e.g. workspace_client.workspace_conf.get_status(keys="enableTokensConfig") does not work

Thank you.

@jaydm26
Copy link
Author

jaydm26 commented May 24, 2023

Related to get_status, set_status returns Bad Request. e.g. to enable EBS SSD GP3, I used workspace_client .workspace_conf.set_status(request={"enableGP3": True}).

If this is not the right place for it, I apologize and will open a new issue.

Thank you.

@dbbnicole
Copy link

Running into the same issue here as we use SDK to develop a customer-facing product enablement notebook which sets and gets workspace confs. cc @bchiang2

@tanmay-db tanmay-db self-assigned this Nov 27, 2023
@mgyucht mgyucht linked a pull request Feb 1, 2024 that will close this issue
github-merge-queue bot pushed a commit that referenced this issue Feb 1, 2024
## Changes
WorkspaceConf's APIs are unique in Databricks as they are the only
methods that accept a map for the request body (all other methods with
request bodies require a struct). This is incompatible with the Python
SDK, which generally has all fields of the request as method parameters.

This PR changes the behavior of methods that get and return maps. On the
set pathway, autogenerated code will include a field `contents` with a
map type corresponding to the type of the request body. This parameter
will be passed directly into the `do()` method of `ApiClient`. On the
get pathway, we'll return the deserialized response directly (which is
already a dictionary), rather than calling an imaginary
`WorkspaceConf.from_dict()` method.

Closes #500 and #128. Relates to #458, #455, #345, #211, and #167.

## Tests
New integration test for workspace conf passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen issues related to generated code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants