Skip to content

Commit d107ebd

Browse files
committed
fix: #OBS-I406 plural envs
1 parent 0f5197d commit d107ebd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

api-service/src/configs/Config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,5 @@ export const config = {
119119
"enable": process.env.otel_enable || "false",
120120
"collector_endpoint": process.env.otel_collector_endpoint || "http://localhost:4318"
121121
},
122-
"storage_support": process.env.storage_type || 'lakehouse,druid'
122+
"storage_types": process.env.storage_types || 'druid,datalake'
123123
}

api-service/src/services/DatasetService.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,14 +412,14 @@ export const getV1Connectors = async (datasetId: string) => {
412412
return modifiedV1Connectors;
413413
}
414414

415-
const storageSupport = _.split(config.storage_support, ",")
415+
const storageTypes = _.split(config.storage_types, ",")
416416
export const validateStorageSupport = (dataset: Record<string, any>) => {
417417
const { olap_store_enabled, lakehouse_enabled } = _.get(dataset, ["dataset_config", "indexing_config"]) || {}
418-
if (olap_store_enabled && !_.includes(storageSupport, "druid")) {
419-
throw obsrvError("", "DATASET_UNSUPPORTED_STORAGE_TYPE", `The storage type "olap_store" is not available. Please use one of the available storage types: ${storageSupport}`, "BAD_REQUEST", 400)
418+
if (olap_store_enabled && !_.includes(storageTypes, "druid")) {
419+
throw obsrvError("", "DATASET_UNSUPPORTED_STORAGE_TYPE", `The storage type "olap_store" is not available. Please use one of the available storage types: ${storageTypes}`, "BAD_REQUEST", 400)
420420
}
421-
if (lakehouse_enabled && !_.includes(storageSupport, "lakehouse")) {
422-
throw obsrvError("", "DATASET_UNSUPPORTED_STORAGE_TYPE", `The storage type "lakehouse" is not available. Please use one of the available storage types: ${storageSupport}`, "BAD_REQUEST", 400)
421+
if (lakehouse_enabled && !_.includes(storageTypes, "datalake")) {
422+
throw obsrvError("", "DATASET_UNSUPPORTED_STORAGE_TYPE", `The storage type "datalake" is not available. Please use one of the available storage types: ${storageTypes}`, "BAD_REQUEST", 400)
423423
}
424424
}
425425

0 commit comments

Comments
 (0)