Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

skip knex's postgres version check so sql dynamic secrets work with cockroachdb

Dimitris Staratzis9c86e6cc5580
diff --git a/backend/src/ee/services/dynamic-secret/providers/sql-database.ts b/backend/src/ee/services/dynamic-secret/providers/sql-database.ts
index 730dc5bbdd..6f4ab72f44 100644
--- a/backend/src/ee/services/dynamic-secret/providers/sql-database.ts
+++ b/backend/src/ee/services/dynamic-secret/providers/sql-database.ts
@@ -206,7 +206,9 @@ export const SqlDatabaseProvider = ({
: undefined
},
acquireConnectionTimeout: EXTERNAL_REQUEST_TIMEOUT,
- pool: { min: 0, max: 7 }
+ pool: { min: 0, max: 7 },
+ // knex's Postgres client can't parse CockroachDB's version() and hangs on connect. It only needs the version for DDL we never run.
+ ...(providerInputs.client === SqlProviders.Postgres ? { version: "9.6.0" } : {})
});
return db;
};