@dbos-inc/dbos-sdk 0.7.21-preview → 0.7.25-preview
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/cloud-cli/applications/deploy-app-code.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/deploy-app-code.js +1 -0
- package/dist/src/cloud-cli/applications/deploy-app-code.js.map +1 -1
- package/dist/src/context.d.ts +1 -0
- package/dist/src/context.d.ts.map +1 -1
- package/dist/src/context.js.map +1 -1
- package/dist/src/dbos-executor.d.ts +6 -1
- package/dist/src/dbos-executor.d.ts.map +1 -1
- package/dist/src/dbos-executor.js +83 -24
- package/dist/src/dbos-executor.js.map +1 -1
- package/dist/src/dbos-runtime/cli.d.ts +1 -0
- package/dist/src/dbos-runtime/cli.d.ts.map +1 -1
- package/dist/src/dbos-runtime/cli.js +1 -0
- package/dist/src/dbos-runtime/cli.js.map +1 -1
- package/dist/src/dbos-runtime/config.d.ts.map +1 -1
- package/dist/src/dbos-runtime/config.js +1 -0
- package/dist/src/dbos-runtime/config.js.map +1 -1
- package/dist/src/debugger/debug_workflow.d.ts +38 -0
- package/dist/src/debugger/debug_workflow.d.ts.map +1 -0
- package/dist/src/debugger/debug_workflow.js +121 -0
- package/dist/src/debugger/debug_workflow.js.map +1 -0
- package/dist/src/error.d.ts +3 -0
- package/dist/src/error.d.ts.map +1 -1
- package/dist/src/error.js +8 -1
- package/dist/src/error.js.map +1 -1
- package/dist/src/httpServer/handler.d.ts +1 -0
- package/dist/src/httpServer/handler.d.ts.map +1 -1
- package/dist/src/httpServer/handler.js +13 -1
- package/dist/src/httpServer/handler.js.map +1 -1
- package/dist/src/httpServer/server.d.ts.map +1 -1
- package/dist/src/httpServer/server.js +2 -0
- package/dist/src/httpServer/server.js.map +1 -1
- package/dist/src/telemetry/collector.d.ts +2 -2
- package/dist/src/telemetry/collector.d.ts.map +1 -1
- package/dist/src/telemetry/collector.js.map +1 -1
- package/dist/src/telemetry/exporters.d.ts +5 -6
- package/dist/src/telemetry/exporters.d.ts.map +1 -1
- package/dist/src/telemetry/exporters.js +2 -42
- package/dist/src/telemetry/exporters.js.map +1 -1
- package/dist/src/telemetry/signals.d.ts +0 -10
- package/dist/src/telemetry/signals.d.ts.map +1 -1
- package/dist/src/telemetry/signals.js.map +1 -1
- package/dist/src/transaction.d.ts +2 -1
- package/dist/src/transaction.d.ts.map +1 -1
- package/dist/src/transaction.js.map +1 -1
- package/dist/src/workflow.d.ts +1 -1
- package/dist/src/workflow.d.ts.map +1 -1
- package/dist/src/workflow.js +2 -3
- package/dist/src/workflow.js.map +1 -1
- package/package.json +2 -2
- package/dist/src/provenance/provenance_daemon.d.ts +0 -34
- package/dist/src/provenance/provenance_daemon.d.ts.map +0 -1
- package/dist/src/provenance/provenance_daemon.js +0 -86
- package/dist/src/provenance/provenance_daemon.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/workflow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAsB,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAkB,WAAW,EAAE,kBAAkB,EAA0B,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAA2B,MAAM,gBAAgB,CAAC;AAI5F,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGtE,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAG7F,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,IAAI,CAAC,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,CAAC,CAAC,EAAW,YAAY,EAAE,MAAM,EAAW,YAAY,EAAE,MAAM,EAC5I,UAAU,CAAC,oBAAQ,EAAW,gBAAgB,CAAC,oBAAQ;IAElE,eAAe,IAAI,MAAM;IAInB,SAAS,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAI3C,SAAS,IAAI,OAAO,CAAC,CAAC,CAAC;CAG9B;AAED;;GAEG;AACH,qBAAa,eAAe,CAAC,CAAC,CAAE,YAAW,cAAc,CAAC,CAAC,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,cAAc;IAAE,QAAQ,CAAC,YAAY,EAAE,MAAM;IAAE,QAAQ,CAAC,UAAU,CAAC;IAAU,QAAQ,CAAC,gBAAgB,CAAC;gBAAvH,cAAc,EAAE,cAAc,EAAW,YAAY,EAAE,MAAM,EAAW,UAAU,CAAC,oBAAQ,EAAW,gBAAgB,CAAC,oBAAQ;IAEpJ,eAAe,IAAI,MAAM;IAInB,SAAS,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAI3C,SAAS,IAAI,OAAO,CAAC,CAAC,CAAC;CAG9B"}
|
package/dist/src/workflow.js
CHANGED
@@ -43,7 +43,7 @@ class WorkflowContextImpl extends context_1.DBOSContextImpl {
|
|
43
43
|
}
|
44
44
|
/**
|
45
45
|
* Check if an operation has already executed in a workflow.
|
46
|
-
* If it previously executed
|
46
|
+
* If it previously executed successfully, return its output.
|
47
47
|
* If it previously executed and threw an error, throw that error.
|
48
48
|
* Otherwise, return DBOSNull.
|
49
49
|
* Also return the transaction snapshot information of this current transaction.
|
@@ -61,7 +61,7 @@ class WorkflowContextImpl extends context_1.DBOSContextImpl {
|
|
61
61
|
};
|
62
62
|
// recorded=false row will be first because we used ORDER BY.
|
63
63
|
res.txn_snapshot = rows[0].txn_snapshot;
|
64
|
-
if (rows.length
|
64
|
+
if (rows.length === 2) {
|
65
65
|
if (JSON.parse(rows[1].error) !== null) {
|
66
66
|
throw (0, serialize_error_1.deserializeError)(JSON.parse(rows[1].error));
|
67
67
|
}
|
@@ -182,7 +182,6 @@ class WorkflowContextImpl extends context_1.DBOSContextImpl {
|
|
182
182
|
this.#wfe.tracer.endSpan(tCtxt.span);
|
183
183
|
return check.output;
|
184
184
|
}
|
185
|
-
// TODO: record snapshot information in result buffer.
|
186
185
|
// Flush the result buffer, setting a guard to block concurrent executions with the same UUID.
|
187
186
|
this.guardOperation(funcId, check.txn_snapshot);
|
188
187
|
if (!readOnly) {
|
package/dist/src/workflow.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/workflow.ts"],"names":[],"mappings":";;;AAAA,uDAAuD;AACvD,mDAAmE;AAEnE,+CAAwG;AACxG,iDAA4F;AAC5F,mCAA2F;AAC3F,qDAAmE;AACnE,mCAAgC;AAGhC,4CAAoD;AAEpD,uCAAsE;AACtE,6CAAuD;AA2C1C,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACN,CAAC;AAcX,MAAa,mBAAoB,SAAQ,yBAAe;IAU3C;IATX,UAAU,GAAW,CAAC,CAAC;IACd,IAAI,CAAC;IACL,YAAY,GAAgC,IAAI,GAAG,EAA0B,CAAC;IAC9E,cAAc,CAAU;IAEjC,YACE,GAAiB,EACjB,SAAsC,EACtC,YAAoB,EACX,cAA8B,EACvC,YAAoB;QAEpB,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,CAC/B,YAAY,EACZ;YACE,YAAY,EAAE,YAAY;YAC1B,aAAa,EAAE,YAAY;YAC3B,KAAK,EAAE,SAAS,EAAE,iBAAiB,IAAI,EAAE;SAC1C,EACD,SAAS,EAAE,IAAI,CAChB,CAAC;QACF,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAZxC,mBAAc,GAAd,cAAc,C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AAQ;QAAW,eAAU,GAAV,UAAU,CAAS;QAAW,qBAAgB,GAAhB,gBAAgB,CAAS;IAAG,CAAC;IAExJ,eAAe;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,SAAS;QACb,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAChH,CAAC;IAED,KAAK,CAAC,SAAS;QACb,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAI,IAAI,CAAC,YAAY,CAAC,CAAC;IAC3E,CAAC;CACF;AAdD,0CAcC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dbos-inc/dbos-sdk",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.25-preview",
|
4
4
|
"description": "A Typescript framework built on the database",
|
5
5
|
"license": "MIT",
|
6
6
|
"repository": {
|
@@ -16,7 +16,7 @@
|
|
16
16
|
"lint": "eslint --fix --ext .ts --ignore-pattern foundationdb/ .",
|
17
17
|
"lint-fdb": "eslint --fix --ext .ts .",
|
18
18
|
"setversion": "grunt setversion",
|
19
|
-
"test": "npx prisma generate --schema tests/prisma/schema.prisma && npm run build && jest --coverage --collectCoverageFrom='src/**/*' --collectCoverageFrom='!src/foundationdb/**/*' --detectOpenHandles --testPathIgnorePatterns=examples/* --testPathIgnorePatterns=tests/foundationdb/*
|
19
|
+
"test": "npx prisma generate --schema tests/prisma/schema.prisma && npm run build && jest --coverage --collectCoverageFrom='src/**/*' --collectCoverageFrom='!src/foundationdb/**/*' --detectOpenHandles --testPathIgnorePatterns=examples/* --testPathIgnorePatterns=tests/foundationdb/*",
|
20
20
|
"test-fdb": "npx prisma generate --schema tests/prisma/schema.prisma && npm run build-fdb && jest --runInBand --coverage"
|
21
21
|
},
|
22
22
|
"bin": {
|
@@ -1,34 +0,0 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
import { Client } from "pg";
|
3
|
-
import { TelemetryCollector } from "../telemetry/collector";
|
4
|
-
import { DBOSConfig } from "../dbos-executor";
|
5
|
-
/**
|
6
|
-
* A class implementing a daemon which collects and exports provenance information,
|
7
|
-
* specifically a record of all INSERTs, UPDATEs, and DELETEs in the target database.
|
8
|
-
* Only one daemon is needed per database. The daemon need not run in the same process as workflow runtime.
|
9
|
-
* The daemon has three requirements and will fail to launch if any is not met:
|
10
|
-
*
|
11
|
-
* 1. The database must be configured with wal_level=logical.
|
12
|
-
* 2. An open replication slot must be available.
|
13
|
-
* 3. The wal2json Postgres plugin must be installed. It is installed by default on most cloud databases, including RDS.
|
14
|
-
*
|
15
|
-
* Because the daemon depends on Postgres logical replication, it can only export information on updates and deletes in tables
|
16
|
-
* whose rows are uniquely identifiable, either because the table has a primary key or a replica identity.
|
17
|
-
*/
|
18
|
-
export declare class ProvenanceDaemon {
|
19
|
-
readonly slotName: string;
|
20
|
-
readonly client: Client;
|
21
|
-
readonly daemonID: NodeJS.Timeout;
|
22
|
-
readonly recordProvenanceIntervalMs = 1000;
|
23
|
-
readonly telemetryCollector: TelemetryCollector;
|
24
|
-
initialized: boolean;
|
25
|
-
/**
|
26
|
-
* @param dbosConfig An DBOS config defining exporters and database connection information.
|
27
|
-
* @param slotName The name of a logical replication slot. This slot is persistent and must be deleted if the daemon is no longer to be used.
|
28
|
-
*/
|
29
|
-
constructor(dbosConfig: DBOSConfig, slotName: string);
|
30
|
-
start(): Promise<void>;
|
31
|
-
recordProvenance(): Promise<void>;
|
32
|
-
stop(): Promise<void>;
|
33
|
-
}
|
34
|
-
//# sourceMappingURL=provenance_daemon.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"provenance_daemon.d.ts","sourceRoot":"","sources":["../../../src/provenance/provenance_daemon.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAiB,MAAM,IAAI,CAAC;AAE3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAqB9C;;;;;;;;;;;;GAYG;AACH,qBAAa,gBAAgB;IAWS,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAV7D,QAAQ,CAAC,MAAM,SAAC;IAChB,QAAQ,CAAC,QAAQ,iBAAC;IAClB,QAAQ,CAAC,0BAA0B,QAAQ;IAC3C,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChD,WAAW,UAAS;IAEpB;;;OAGG;gBACS,UAAU,EAAE,UAAU,EAAW,QAAQ,EAAE,MAAM;IASvD,KAAK;IAkBL,gBAAgB;IAqBhB,IAAI;CAKX"}
|
@@ -1,86 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ProvenanceDaemon = void 0;
|
4
|
-
const pg_1 = require("pg");
|
5
|
-
const exporters_1 = require("../telemetry/exporters");
|
6
|
-
const collector_1 = require("../telemetry/collector");
|
7
|
-
/**
|
8
|
-
* A class implementing a daemon which collects and exports provenance information,
|
9
|
-
* specifically a record of all INSERTs, UPDATEs, and DELETEs in the target database.
|
10
|
-
* Only one daemon is needed per database. The daemon need not run in the same process as workflow runtime.
|
11
|
-
* The daemon has three requirements and will fail to launch if any is not met:
|
12
|
-
*
|
13
|
-
* 1. The database must be configured with wal_level=logical.
|
14
|
-
* 2. An open replication slot must be available.
|
15
|
-
* 3. The wal2json Postgres plugin must be installed. It is installed by default on most cloud databases, including RDS.
|
16
|
-
*
|
17
|
-
* Because the daemon depends on Postgres logical replication, it can only export information on updates and deletes in tables
|
18
|
-
* whose rows are uniquely identifiable, either because the table has a primary key or a replica identity.
|
19
|
-
*/
|
20
|
-
class ProvenanceDaemon {
|
21
|
-
slotName;
|
22
|
-
client;
|
23
|
-
daemonID;
|
24
|
-
recordProvenanceIntervalMs = 1000;
|
25
|
-
telemetryCollector;
|
26
|
-
initialized = false;
|
27
|
-
/**
|
28
|
-
* @param dbosConfig An DBOS config defining exporters and database connection information.
|
29
|
-
* @param slotName The name of a logical replication slot. This slot is persistent and must be deleted if the daemon is no longer to be used.
|
30
|
-
*/
|
31
|
-
constructor(dbosConfig, slotName) {
|
32
|
-
this.slotName = slotName;
|
33
|
-
this.client = new pg_1.Client(dbosConfig.poolConfig);
|
34
|
-
this.daemonID = setInterval(() => {
|
35
|
-
void this.recordProvenance();
|
36
|
-
}, this.recordProvenanceIntervalMs);
|
37
|
-
const telemetryExporters = [new exporters_1.PostgresExporter(dbosConfig.poolConfig, dbosConfig?.observability_database)];
|
38
|
-
this.telemetryCollector = new collector_1.TelemetryCollector(telemetryExporters);
|
39
|
-
}
|
40
|
-
async start() {
|
41
|
-
await this.client.connect();
|
42
|
-
// Create a logical replication slot with the given name.
|
43
|
-
try { // TODO: Make this robust to daemon crashes, so records are not consumed until they've been exported.
|
44
|
-
await this.client.query("SELECT pg_create_logical_replication_slot($1, 'wal2json');", [this.slotName]);
|
45
|
-
}
|
46
|
-
catch (error) {
|
47
|
-
const err = error;
|
48
|
-
if (err.code === "42710") {
|
49
|
-
// The slot has already been created.
|
50
|
-
}
|
51
|
-
else {
|
52
|
-
console.error(err);
|
53
|
-
throw err;
|
54
|
-
}
|
55
|
-
}
|
56
|
-
await this.telemetryCollector.init();
|
57
|
-
this.initialized = true;
|
58
|
-
}
|
59
|
-
async recordProvenance() {
|
60
|
-
if (this.initialized) {
|
61
|
-
const { rows } = await this.client.query("SELECT CAST(xid AS TEXT), data FROM pg_logical_slot_get_changes($1, NULL, NULL, 'filter-tables', 'dbos.*')", [this.slotName]);
|
62
|
-
for (const row of rows) {
|
63
|
-
const data = JSON.parse(row.data).change;
|
64
|
-
for (const change of data) {
|
65
|
-
const signal = {
|
66
|
-
provTransactionID: row.xid,
|
67
|
-
kind: change.kind,
|
68
|
-
schema: change.schema,
|
69
|
-
table: change.table,
|
70
|
-
columnnames: change.columnnames,
|
71
|
-
columntypes: change.columntypes,
|
72
|
-
columnvalues: change.columnvalues
|
73
|
-
};
|
74
|
-
this.telemetryCollector.push(signal);
|
75
|
-
}
|
76
|
-
}
|
77
|
-
}
|
78
|
-
}
|
79
|
-
async stop() {
|
80
|
-
clearInterval(this.daemonID);
|
81
|
-
await this.client.end();
|
82
|
-
await this.telemetryCollector.destroy();
|
83
|
-
}
|
84
|
-
}
|
85
|
-
exports.ProvenanceDaemon = ProvenanceDaemon;
|
86
|
-
//# sourceMappingURL=provenance_daemon.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"provenance_daemon.js","sourceRoot":"","sources":["../../../src/provenance/provenance_daemon.ts"],"names":[],"mappings":";;;AAAA,2BAA2C;AAC3C,sDAA0D;AAC1D,sDAA4D;AAsB5D;;;;;;;;;;;;GAYG;AACH,MAAa,gBAAgB;IAWkB;IAVpC,MAAM,CAAC;IACP,QAAQ,CAAC;IACT,0BAA0B,GAAG,IAAI,CAAC;IAClC,kBAAkB,CAAqB;IAChD,WAAW,GAAG,KAAK,CAAC;IAEpB;;;OAGG;IACH,YAAY,UAAsB,EAAW,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAC3D,IAAI,CAAC,MAAM,GAAG,IAAI,WAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAChD,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;YAC/B,KAAK,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC/B,CAAC,EAAE,IAAI,CAAC,0BAA0B,CAAC,CAAC;QACpC,MAAM,kBAAkB,GAAG,CAAC,IAAI,4BAAgB,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,sBAAsB,CAAC,CAAC,CAAC;QAC7G,IAAI,CAAC,kBAAkB,GAAG,IAAI,8BAAkB,CAAC,kBAAkB,CAAC,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,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