Skip to content

Commit

Permalink
Revert "feat(base-driver): add an option to skip connection test prob…
Browse files Browse the repository at this point in the history
…es (#8833)" (#8846)

This reverts commit 1fd7a3e.
  • Loading branch information
KSDaemon authored Oct 22, 2024
1 parent e955d9c commit d1698ce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
11 changes: 0 additions & 11 deletions packages/cubejs-backend-shared/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,17 +479,6 @@ const variables: Record<string, (...args: any) => any> = {
return val;
},

/**
* Flag to disable driver's test connection probes
*/
dbDisableTestConnection: ({
dataSource
}: {
dataSource: string,
}) => (
!!process.env[keyByDataSource('CUBEJS_DB_DISABLE_TEST_CONNECTION', dataSource)]
),

/**
* Database max pool size.
*/
Expand Down
12 changes: 0 additions & 12 deletions packages/cubejs-base-driver/src/BaseDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,6 @@ export abstract class BaseDriver implements DriverInterface {

protected logger: any;

protected isTestConnectionDisabledFlag: boolean = false;

/**
* Class constructor.
*/
Expand All @@ -186,14 +184,8 @@ export abstract class BaseDriver implements DriverInterface {
* request before determining it as not valid. Default - 10000 ms.
*/
testConnectionTimeout?: number,

/**
* Flag for serverless DWHs to omit test connection probes.
*/
isTestConnectionDisabled?: boolean,
} = {}) {
this.testConnectionTimeoutValue = _options.testConnectionTimeout || 10000;
this.isTestConnectionDisabledFlag = _options.isTestConnectionDisabled || false;
}

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

public isTestConnectionDisabled(): boolean {
return !!this.isTestConnectionDisabledFlag;
}

/**
* Returns an array of signed AWS S3 URLs of the unloaded csv files.
*/
Expand Down

0 comments on commit d1698ce

Please sign in to comment.