@dbos-inc/dbos-sdk 1.12.2-preview → 1.12.5-preview

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,6 +34,6 @@ export interface ConfigFile {
34
34
  export declare function substituteEnvVars(content: string): string;
35
35
  export declare function loadConfigFile(configFilePath: string): ConfigFile;
36
36
  export declare function writeConfigFile(configFile: ConfigFile, configFilePath: string): void;
37
- export declare function constructPoolConfig(configFile: ConfigFile, useProxy?: boolean): PoolConfig;
37
+ export declare function constructPoolConfig(configFile: ConfigFile): PoolConfig;
38
38
  export declare function parseConfigFile(cliOptions?: DBOSCLIStartOptions, useProxy?: boolean): [DBOSConfig, DBOSRuntimeConfig];
39
39
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAqB,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAM/C,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AAKrD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,GAAG,CAAC,EAAE,OAAO,CAAC;QACd,MAAM,CAAC,EAA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Q,GAAE,OAAe,GAAG,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAsF5H"}
@@ -61,10 +61,7 @@ function writeConfigFile(configFile, configFilePath) {
61
61
  }
62
62
  }
63
63
  exports.writeConfigFile = writeConfigFile;
64
- function constructPoolConfig(configFile, useProxy = false) {
65
- if (!configFile.database) {
66
- throw new error_1.DBOSInitializationError(`DBOS configuration (dbos-config.yaml) does not contain database config`);
67
- }
64
+ function constructPoolConfig(configFile) {
68
65
  const poolConfig = {
69
66
  host: configFile.database.hostname,
70
67
  port: configFile.database.port,
@@ -76,20 +73,6 @@ function constructPoolConfig(configFile, useProxy = false) {
76
73
  if (!poolConfig.database) {
77
74
  throw new error_1.DBOSInitializationError(`DBOS configuration (dbos-config.yaml) does not contain application database name`);
78
75
  }
79
- if (!poolConfig.password) {
80
- if (useProxy) {
81
- poolConfig.password = "PROXY-MODE"; // Assign a password if not set. We don't need password to authenticate with the local proxy.
82
- }
83
- else {
84
- const pgPassword = process.env.PGPASSWORD;
85
- if (pgPassword) {
86
- poolConfig.password = pgPassword;
87
- }
88
- else {
89
- throw new error_1.DBOSInitializationError(`DBOS configuration (dbos-config.yaml) does not contain database password`);
90
- }
91
- }
92
- }
93
76
  // Details on Postgres SSL/TLS modes: https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-PROTECTION
94
77
  if (configFile.database.ssl === false) {
95
78
  // If SSL is set to false, do not use TLS
@@ -137,6 +120,25 @@ function parseConfigFile(cliOptions, useProxy = false) {
137
120
  if (!configFile) {
138
121
  throw new error_1.DBOSInitializationError(`DBOS configuration file ${configFilePath} is empty`);
139
122
  }
123
+ // Database field must exist
124
+ if (!configFile.database) {
125
+ throw new error_1.DBOSInitializationError(`DBOS configuration (dbos-config.yaml) does not contain database config`);
126
+ }
127
+ // Check for the database password
128
+ if (!configFile.database.password) {
129
+ if (useProxy) {
130
+ configFile.database.password = "PROXY-MODE"; // Assign a password if not set. We don't need password to authenticate with the local proxy.
131
+ }
132
+ else {
133
+ const pgPassword = process.env.PGPASSWORD;
134
+ if (pgPassword) {
135
+ configFile.database.password = pgPassword;
136
+ }
137
+ else {
138
+ throw new error_1.DBOSInitializationError(`DBOS configuration (dbos-config.yaml) does not contain database password`);
139
+ }
140
+ }
141
+ }
140
142
  const validator = ajv.compile(dbosConfigSchema);
141
143
  if (!validator(configFile)) {
142
144
  const errorMessages = prettyPrintAjvErrors(validator);
@@ -146,7 +148,7 @@ function parseConfigFile(cliOptions, useProxy = false) {
146
148
  /*******************************/
147
149
  /* Handle user database config */
148
150
  /*******************************/
149
- const poolConfig = constructPoolConfig(configFile, useProxy);
151
+ const poolConfig = constructPoolConfig(configFile);
150
152
  /***************************/
151
153
  /* Handle telemetry config */
152
154
  /***************************/
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dbos-runtime/config.ts"],"names":[],"mappings":";;;;;;AAAA,oCAAmD;AACnD,oCAAyD;AAGzD,gDAAwB;AACxB,uCAAiE;AACjE,oDAAoD;AAGpD,6DAA6D;AAC7D,2BAAmC;AACnC,8CAA4C;AAC5C,gDAAwB;AAEX,QAAA,kBAAkB,GAAG,kBAAkB,CAAC;AACrD,MAAM,oBAAoB,GAAG,cAAI,CAAC,IAAI,CAAC,IAAA,uBAAe,EAAC,SAAS,CAAC,EAAE,yBAAyB,CAAC,CAAC;AAC9F,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,oBAAY,EAAC,oBAAoB,CAAC,CAAW,CAAC;AAClF,MAAM,GAAG,GAAG,IAAI,aAAG,CAAC,EAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;AA6BtD;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,OAAe;IAC/C,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,gDAAgD;IAC9E,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAU,EAAE,E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GAAG,IAAI,EAAE;QACzB,IAAI,EAAE,UAAU,CAAC,IAAI;KACtB,CAAC;IAEF,uCAAuC;IACvC,uCAAuC;IACvC,uCAAuC;IACvC,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;IACtC,IAAI,UAAU,CAAC,aAAa,EAAE,WAAW,EAAE,CAAC;QAC1C,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAClF,CAAC;SAAM,CAAC;QACN,WAAW,CAAC,GAAG,CAAC,2BAAiB,CAAC,CAAC;IACrC,CAAC;IACD,MAAM,aAAa,GAAsB;QACvC,WAAW,EAAE,CAAC,GAAG,WAAW,CAAC;QAC7B,IAAI,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,IAAI;KACjF,CAAC;IAEF,OAAO,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AACrC,CAAC;AAtFD,0CAsFC"}
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/migrate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAuB,MAAM,UAAU,CAAC;AAK3D,wBAAsB,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,kBA4DzE;AAED,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,oBAarF;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,SAqB7E"}
1
+ {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/migrate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAuB,MAAM,UAAU,CAAC;AAM3D,wBAAsB,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,kBA4DzE;AAED,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,oBAarF;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,SAqB7E"}
@@ -7,6 +7,7 @@ const config_1 = require("./config");
7
7
  const pg_1 = require("pg");
8
8
  const user_db_schema_1 = require("../../schemas/user_db_schema");
9
9
  const system_database_1 = require("../system_database");
10
+ const user_database_1 = require("../user_database");
10
11
  async function migrate(configFile, logger) {
11
12
  if (!configFile.database.password) {
12
13
  logger.error(`DBOS configuration does not contain database password, please check your config file and retry!`);
@@ -117,10 +118,17 @@ async function createDBOSTables(configFile) {
117
118
  const pgUserClient = new pg_1.Client(userPoolConfig);
118
119
  await pgUserClient.connect();
119
120
  // Create DBOS table/schema in user DB.
120
- const schemaExists = await pgUserClient.query(`SELECT EXISTS (SELECT FROM information_schema.schemata WHERE schema_name = 'dbos')`);
121
+ // Always check if the schema/table exists before creating it to avoid locks.
122
+ const schemaExists = await pgUserClient.query(user_database_1.schemaExistsQuery);
121
123
  if (!schemaExists.rows[0].exists) {
122
124
  await pgUserClient.query(user_db_schema_1.createUserDBSchema);
125
+ }
126
+ const txnOutputTableExists = await pgUserClient.query(user_database_1.txnOutputTableExistsQuery);
127
+ if (!txnOutputTableExists.rows[0].exists) {
123
128
  await pgUserClient.query(user_db_schema_1.userDBSchema);
129
+ }
130
+ const txnIndexExists = await pgUserClient.query(user_database_1.txnOutputIndexExistsQuery);
131
+ if (!txnIndexExists.rows[0].exists) {
124
132
  await pgUserClient.query(user_db_schema_1.userDBIndex);
125
133
  }
126
134
  // Create the DBOS system database.
@@ -1 +1 @@
1
- {"version":3,"file":"migr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ACD,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC;YACrB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -25,6 +25,9 @@ export declare const UserDatabaseName: {
25
25
  readonly KNEX: "knex";
26
26
  };
27
27
  export type UserDatabaseName = ValuesOf<typeof UserDatabaseName>;
28
+ export declare const schemaExistsQuery = "SELECT EXISTS (SELECT FROM information_schema.schemata WHERE schema_name = 'dbos')";
29
+ export declare const txnOutputTableExistsQuery = "SELECT EXISTS (SELECT FROM information_schema.tables WHERE table_schema = 'dbos' AND table_name = 'transaction_outputs')";
30
+ export declare const txnOutputIndexExistsQuery = "SELECT EXISTS (SELECT FROM pg_indexes WHERE schemaname='dbos' AND tablename = 'transaction_outputs' AND indexname = 'transaction_outputs_idx')";
28
31
  /**
29
32
  * node-postgres user data access interface
30
33
  */
@@ -1 +1 @@
1
- {"version":3,"file":"user_database.d.ts","sourceRoot":"","sources":["../../src/user_database.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAoD,MAAM,IAAI,CAAC;AAEpG,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,OAAO,IAAI,gBAAgB,CAAC;IAG5B,WAAW,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE,EAAE,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"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KnexUserDatabase = exports.TypeORMDatabase = exports.PrismaUserDatabase = exports.PGNodeUserDatabase = exports.UserDatabaseName = void 0;
3
+ exports.KnexUserDatabase = exports.TypeORMDatabase = exports.PrismaUserDatabase = exports.PGNodeUserDatabase = exports.txnOutputIndexExistsQuery = exports.txnOutputTableExistsQuery = exports.schemaExistsQuery = exports.UserDatabaseName = void 0;
4
4
  /* eslint-disable @typescript-eslint/no-explicit-any */
5
5
  const pg_1 = require("pg");
6
6
  const user_db_schema_1 = require("../schemas/user_db_schema");
@@ -11,6 +11,9 @@ exports.UserDatabaseName = {
11
11
  TYPEORM: "typeorm",
12
12
  KNEX: "knex",
13
13
  };
14
+ exports.schemaExistsQuery = `SELECT EXISTS (SELECT FROM information_schema.schemata WHERE schema_name = 'dbos')`;
15
+ exports.txnOutputTableExistsQuery = `SELECT EXISTS (SELECT FROM information_schema.tables WHERE table_schema = 'dbos' AND table_name = 'transaction_outputs')`;
16
+ exports.txnOutputIndexExistsQuery = `SELECT EXISTS (SELECT FROM pg_indexes WHERE schemaname='dbos' AND tablename = 'transaction_outputs' AND indexname = 'transaction_outputs_idx')`;
14
17
  /**
15
18
  * node-postgres user data access interface
16
19
  */
@@ -23,9 +26,18 @@ class PGNodeUserDatabase {
23
26
  }
24
27
  async init(debugMode = false) {
25
28
  if (!debugMode) {
26
- await this.pool.query(user_db_schema_1.createUserDBSchema);
27
- await this.pool.query(user_db_schema_1.userDBSchema);
28
- await this.pool.query(user_db_schema_1.userDBIndex);
29
+ const schemaExists = await this.pool.query(exports.schemaExistsQuery);
30
+ if (!schemaExists.rows[0].exists) {
31
+ await this.pool.query(user_db_schema_1.createUserDBSchema);
32
+ }
33
+ const txnOutputTableExists = await this.pool.query(exports.txnOutputTableExistsQuery);
34
+ if (!txnOutputTableExists.rows[0].exists) {
35
+ await this.pool.query(user_db_schema_1.userDBSchema);
36
+ }
37
+ const txnIndexExists = await this.pool.query(exports.txnOutputIndexExistsQuery);
38
+ if (!txnIndexExists.rows[0].exists) {
39
+ await this.pool.query(user_db_schema_1.userDBIndex);
40
+ }
29
41
  }
30
42
  }
31
43
  async destroy() {
@@ -113,9 +125,18 @@ class PrismaUserDatabase {
113
125
  }
114
126
  async init(debugMode = false) {
115
127
  if (!debugMode) {
116
- await this.prisma.$queryRawUnsafe(user_db_schema_1.createUserDBSchema);
117
- await this.prisma.$queryRawUnsafe(user_db_schema_1.userDBSchema);
118
- await this.prisma.$queryRawUnsafe(user_db_schema_1.userDBIndex);
128
+ const schemaExists = await this.prisma.$queryRawUnsafe(exports.schemaExistsQuery);
129
+ if (!schemaExists[0].exists) {
130
+ await this.prisma.$queryRawUnsafe(user_db_schema_1.createUserDBSchema);
131
+ }
132
+ const txnOutputTableExists = await this.prisma.$queryRawUnsafe(exports.txnOutputTableExistsQuery);
133
+ if (!txnOutputTableExists[0].exists) {
134
+ await this.prisma.$queryRawUnsafe(user_db_schema_1.userDBSchema);
135
+ }
136
+ const txnIndexExists = await this.prisma.$queryRawUnsafe(exports.txnOutputIndexExistsQuery);
137
+ if (!txnIndexExists[0].exists) {
138
+ await this.prisma.$queryRawUnsafe(user_db_schema_1.userDBIndex);
139
+ }
119
140
  }
120
141
  }
121
142
  async destroy() {
@@ -187,9 +208,18 @@ class TypeORMDatabase {
187
208
  await this.dataSource.initialize(); // Need to initialize datasource even in debug mode.
188
209
  }
189
210
  if (!debugMode) {
190
- await this.dataSource.query(user_db_schema_1.createUserDBSchema);
191
- await this.dataSource.query(user_db_schema_1.userDBSchema);
192
- await this.dataSource.query(user_db_schema_1.userDBIndex);
211
+ const schemaExists = await this.dataSource.query(exports.schemaExistsQuery);
212
+ if (!schemaExists[0].exists) {
213
+ await this.dataSource.query(user_db_schema_1.createUserDBSchema);
214
+ }
215
+ const txnOutputTableExists = await this.dataSource.query(exports.txnOutputTableExistsQuery);
216
+ if (!txnOutputTableExists[0].exists) {
217
+ await this.dataSource.query(user_db_schema_1.userDBSchema);
218
+ }
219
+ const txnIndexExists = await this.dataSource.query(exports.txnOutputIndexExistsQuery);
220
+ if (!txnIndexExists[0].exists) {
221
+ await this.dataSource.query(user_db_schema_1.userDBIndex);
222
+ }
193
223
  }
194
224
  }
195
225
  async destroy() {
@@ -256,9 +286,18 @@ class KnexUserDatabase {
256
286
  }
257
287
  async init(debugMode = false) {
258
288
  if (!debugMode) {
259
- await this.knex.raw(user_db_schema_1.createUserDBSchema);
260
- await this.knex.raw(user_db_schema_1.userDBSchema);
261
- await this.knex.raw(user_db_schema_1.userDBIndex);
289
+ const schemaExists = await this.knex.raw(exports.schemaExistsQuery);
290
+ if (!schemaExists.rows[0].exists) {
291
+ await this.knex.raw(user_db_schema_1.createUserDBSchema);
292
+ }
293
+ const txnOutputTableExists = await this.knex.raw(exports.txnOutputIndexExistsQuery);
294
+ if (!txnOutputTableExists.rows[0].exists) {
295
+ await this.knex.raw(user_db_schema_1.userDBSchema);
296
+ }
297
+ const txnIndexExists = await this.knex.raw(exports.txnOutputIndexExistsQuery);
298
+ if (!txnIndexExists.rows[0].exists) {
299
+ await this.knex.raw(user_db_schema_1.userDBIndex);
300
+ }
262
301
  }
263
302
  }
264
303
  async destroy() {
@@ -1 +1 @@
1
- {"version":3,"file":"user_database.js","sourceRoot":"","sources":["../../src/user_database.ts"],"names":[],"mappings":";;;AAAA,uDAAuD;AACvD,2BAAoG;AACpG,8DAA0F;AAC1F,+CAAkE;AAmCrD,QAAA,gBAAgB,GAAG;IAC9B,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACJ,CAAC;AAGX;;GAEG;AACH,MAAa,kBAAkB;IAGR;IAFZ,IAAI,CAAO;IAEpB,YAAqB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,SAAI,CAAC,UAAU,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