From d1698cebbb017059ec1e7c11397fbdf73d072e49 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Tue, 22 Oct 2024 11:01:42 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"feat(base-driver):=20add=20an=20optio?= =?UTF-8?q?n=20to=C2=A0skip=20connection=20test=20probes=20(#8833)"=20(#88?= =?UTF-8?q?46)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 1fd7a3e6920d47d391c776ac2c926f7410fb68d2. --- packages/cubejs-backend-shared/src/env.ts | 11 ----------- packages/cubejs-base-driver/src/BaseDriver.ts | 12 ------------ 2 files changed, 23 deletions(-) diff --git a/packages/cubejs-backend-shared/src/env.ts b/packages/cubejs-backend-shared/src/env.ts index 35876c2c92590..2940fabf1beeb 100644 --- a/packages/cubejs-backend-shared/src/env.ts +++ b/packages/cubejs-backend-shared/src/env.ts @@ -479,17 +479,6 @@ const variables: Record 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. */ diff --git a/packages/cubejs-base-driver/src/BaseDriver.ts b/packages/cubejs-base-driver/src/BaseDriver.ts index aa9fac1228270..987484b5b9378 100644 --- a/packages/cubejs-base-driver/src/BaseDriver.ts +++ b/packages/cubejs-base-driver/src/BaseDriver.ts @@ -175,8 +175,6 @@ export abstract class BaseDriver implements DriverInterface { protected logger: any; - protected isTestConnectionDisabledFlag: boolean = false; - /** * Class constructor. */ @@ -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() { @@ -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. */