-
Notifications
You must be signed in to change notification settings - Fork 15
[BUG] Installation._unmarshal initializes databricks.sdk.core.Config when the value is None #169
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The following code initiliatizes a databricks.sdk.core.Config when the value inst is None
blueprint/src/databricks/labs/blueprint/installation.py
Lines 626 to 629 in cb1b8f0
| if type_ref == databricks.sdk.core.Config: | |
| if not inst: | |
| inst = {} | |
| return databricks.sdk.core.Config(**inst) # type: ignore[return-value] |
This causes a bug in UCX when we load and save the WorkspaceConfig as that data classes has a databricks.sdk.core.Config attribute which is by default None and after loading it became databricks.sdk.core.Config(**{}). This field causes issues when it the config is used by our RuntimeContext which expects a different config than our cli context.
Reproduce
workspace_context: WorkspaceContext # Created by the Databricks cli
config = workspace_context.installation.load(WorkspaceConfig)
workspace_context.installation.save(config)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working