Skip to content

Commit b98476c

Browse files
committed
addressed coderabbit review feedback
1 parent 0535802 commit b98476c

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

components/databricks/actions/set-sql-warehouse-config/set-sql-warehouse-config.mjs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,22 @@ export default {
112112
const current = await this.databricks.getSQLWarehouseConfig({
113113
$,
114114
});
115-
const payload = {
116-
...current,
117-
};
115+
const allowed = [
116+
"enable_serverless_compute",
117+
"instance_profile_arn",
118+
"google_service_account",
119+
"security_policy",
120+
"channel",
121+
"enabled_warehouse_types",
122+
"config_param",
123+
"global_param",
124+
"sql_configuration_parameters",
125+
"data_access_config",
126+
];
127+
const payload = Object.fromEntries(
128+
Object.entries(current || {}).filter(([k]) => allowed.includes(k)),
129+
);
118130

119-
if (typeof this.enableServerlessCompute === "boolean") {
120-
payload.enable_serverless_compute = this.enableServerlessCompute;
121-
}
122131
if (this.instanceProfileArn !== undefined) {
123132
payload.instance_profile_arn = this.instanceProfileArn;
124133
}

0 commit comments

Comments
 (0)