Skip to content

Commit 224aa77

Browse files
committed
Revert "feat(base-driver): add an option to skip connection test probes (#8833)"
This reverts commit 1fd7a3e.
1 parent 5cfc5a9 commit 224aa77

File tree

2 files changed

+4
-27
lines changed

2 files changed

+4
-27
lines changed

packages/cubejs-backend-shared/src/env.ts

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -479,17 +479,6 @@ const variables: Record<string, (...args: any) => any> = {
479479
return val;
480480
},
481481

482-
/**
483-
* Flag to disable driver's test connection probes
484-
*/
485-
dbDisableTestConnection: ({
486-
dataSource
487-
}: {
488-
dataSource: string,
489-
}) => (
490-
!!process.env[keyByDataSource('CUBEJS_DB_DISABLE_TEST_CONNECTION', dataSource)]
491-
),
492-
493482
/**
494483
* Database max pool size.
495484
*/
@@ -511,7 +500,7 @@ const variables: Record<string, (...args: any) => any> = {
511500
),
512501

513502
/**
514-
* Max polling interval. Currently used in BigQuery and Databricks.
503+
* Max polling interval. Currenly used in BigQuery and Databricks.
515504
* TODO: clarify this env.
516505
*/
517506
dbPollMaxInterval: ({
@@ -525,7 +514,7 @@ const variables: Record<string, (...args: any) => any> = {
525514
},
526515

527516
/**
528-
* Polling timeout. Currently used in BigQuery, Dremio and Athena.
517+
* Polling timeout. Currenly used in BigQuery, Dremio and Athena.
529518
* TODO: clarify this env.
530519
*/
531520
dbPollTimeout: ({
@@ -543,7 +532,7 @@ const variables: Record<string, (...args: any) => any> = {
543532
},
544533

545534
/**
546-
* Query timeout. Currently used in BigQuery, Dremio, Postgres, Snowflake
535+
* Query timeout. Currenly used in BigQuery, Dremio, Postgres, Snowflake
547536
* and Athena drivers and the orchestrator (queues, pre-aggs). For the
548537
* orchestrator this variable did not split by the datasource.
549538
*

packages/cubejs-base-driver/src/BaseDriver.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,10 @@ const DbTypeValueMatcher: Record<string, ((v: any) => boolean)> = {
171171
* Base driver class.
172172
*/
173173
export abstract class BaseDriver implements DriverInterface {
174-
private readonly testConnectionTimeoutValue: number = 10000;
174+
private testConnectionTimeoutValue = 10000;
175175

176176
protected logger: any;
177177

178-
protected isTestConnectionDisabledFlag: boolean = false;
179-
180178
/**
181179
* Class constructor.
182180
*/
@@ -186,14 +184,8 @@ export abstract class BaseDriver implements DriverInterface {
186184
* request before determining it as not valid. Default - 10000 ms.
187185
*/
188186
testConnectionTimeout?: number,
189-
190-
/**
191-
* Flag for serverless DWHs to omit test connection probes.
192-
*/
193-
isTestConnectionDisabled?: boolean,
194187
} = {}) {
195188
this.testConnectionTimeoutValue = _options.testConnectionTimeout || 10000;
196-
this.isTestConnectionDisabledFlag = _options.isTestConnectionDisabled || false;
197189
}
198190

199191
protected informationSchemaQuery() {
@@ -688,10 +680,6 @@ export abstract class BaseDriver implements DriverInterface {
688680
query.query = `SELECT * FROM (${query.query}) AS t LIMIT ${query.limit}`;
689681
}
690682

691-
public isTestConnectionDisabled(): boolean {
692-
return !!this.isTestConnectionDisabledFlag;
693-
}
694-
695683
/**
696684
* Returns an array of signed AWS S3 URLs of the unloaded csv files.
697685
*/

0 commit comments

Comments
 (0)