@dbos-inc/knex-datasource 3.0.6-preview
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +170 -0
- package/dist/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.ts +230 -0
- package/jest.config.js +8 -0
- package/package.json +31 -0
- package/tests/config.test.ts +31 -0
- package/tests/datasource.test.ts +310 -0
- package/tests/test-helpers.ts +12 -0
- package/tsconfig.json +9 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DBOSDataSource } from '@dbos-inc/dbos-sdk/datasource';
|
|
2
|
+
import { type Knex } from 'knex';
|
|
3
|
+
export type TransactionConfig = Pick<Knex.TransactionConfig, 'isolationLevel' | 'readOnly'>;
|
|
4
|
+
export declare class KnexDataSource implements DBOSDataSource<TransactionConfig> {
|
|
5
|
+
#private;
|
|
6
|
+
static get client(): Knex.Transaction;
|
|
7
|
+
static initializeInternalSchema(config: Knex.Config): Promise<void>;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
constructor(name: string, config: Knex.Config);
|
|
10
|
+
runTransaction<T>(callback: () => Promise<T>, funcName: string, config?: TransactionConfig): Promise<T>;
|
|
11
|
+
registerTransaction<This, Args extends unknown[], Return>(func: (this: This, ...args: Args) => Promise<Return>, name: string, config?: TransactionConfig): (this: This, ...args: Args) => Promise<Return>;
|
|
12
|
+
transaction(config?: TransactionConfig): <This, Args extends unknown[], Return>(_target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"m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|
+
// using https://github.com/knex/knex
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.KnexDataSource = void 0;
|
|
8
|
+
const dbos_sdk_1 = require("@dbos-inc/dbos-sdk");
|
|
9
|
+
const datasource_1 = require("@dbos-inc/dbos-sdk/datasource");
|
|
10
|
+
const async_hooks_1 = require("async_hooks");
|
|
11
|
+
const knex_1 = __importDefault(require("knex"));
|
|
12
|
+
const superjson_1 = require("superjson");
|
|
13
|
+
const asyncLocalCtx = new async_hooks_1.AsyncLocalStorage();
|
|
14
|
+
class KnexDSTH {
|
|
15
|
+
name;
|
|
16
|
+
dsType = 'KnexDataSource';
|
|
17
|
+
#knexDB;
|
|
18
|
+
constructor(name, config) {
|
|
19
|
+
this.name = name;
|
|
20
|
+
this.#knexDB = (0, knex_1.default)(config);
|
|
21
|
+
}
|
|
22
|
+
initialize() {
|
|
23
|
+
return Promise.resolve();
|
|
24
|
+
}
|
|
25
|
+
destroy() {
|
|
26
|
+
return this.#knexDB.destroy();
|
|
27
|
+
}
|
|
28
|
+
static async #checkExecution(client, workflowID, functionNum) {
|
|
29
|
+
const result = await client('transaction_completion')
|
|
30
|
+
.withSchema('dbos')
|
|
31
|
+
.select('output')
|
|
32
|
+
.where({
|
|
33
|
+
workflow_id: workflowID,
|
|
34
|
+
function_num: functionNum,
|
|
35
|
+
})
|
|
36
|
+
.first();
|
|
37
|
+
return result === undefined ? undefined : { output: result.output };
|
|
38
|
+
}
|
|
39
|
+
static async #recordOutput(client, workflowID, functionNum, output) {
|
|
40
|
+
try {
|
|
41
|
+
await client('transaction_completion').withSchema('dbos').insert({
|
|
42
|
+
workflow_id: workflowID,
|
|
43
|
+
function_num: functionNum,
|
|
44
|
+
output,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
if ((0, datasource_1.isPGKeyConflictError)(error)) {
|
|
49
|
+
throw new dbos_sdk_1.DBOSWorkflowConflictError(workflowID);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async invokeTransactionFunction(config, target, func, ...args) {
|
|
57
|
+
const workflowID = dbos_sdk_1.DBOS.workflowID;
|
|
58
|
+
if (workflowID === undefined) {
|
|
59
|
+
throw new Error('Workflow ID is not set.');
|
|
60
|
+
}
|
|
61
|
+
const functionNum = dbos_sdk_1.DBOS.stepID;
|
|
62
|
+
if (functionNum === undefined) {
|
|
63
|
+
throw new Error('Function Number is not set.');
|
|
64
|
+
}
|
|
65
|
+
const readOnly = config?.readOnly ?? false;
|
|
66
|
+
let retryWaitMS = 1;
|
|
67
|
+
const backoffFactor = 1.5;
|
|
68
|
+
const maxRetryWaitMS = 2000;
|
|
69
|
+
while (true) {
|
|
70
|
+
try {
|
|
71
|
+
const result = await this.#knexDB.transaction(async (client) => {
|
|
72
|
+
// Check to see if this tx has already been executed
|
|
73
|
+
const previousResult = readOnly || !workflowID ? undefined : await KnexDSTH.#checkExecution(client, workflowID, functionNum);
|
|
74
|
+
if (previousResult) {
|
|
75
|
+
return (previousResult.output ? superjson_1.SuperJSON.parse(previousResult.output) : null);
|
|
76
|
+
}
|
|
77
|
+
// execute user's transaction function
|
|
78
|
+
const result = await asyncLocalCtx.run({ client }, async () => {
|
|
79
|
+
return (await func.call(target, ...args));
|
|
80
|
+
});
|
|
81
|
+
// save the output of read/write transactions
|
|
82
|
+
if (!readOnly && workflowID) {
|
|
83
|
+
await KnexDSTH.#recordOutput(client, workflowID, functionNum, superjson_1.SuperJSON.stringify(result));
|
|
84
|
+
// Note, existing code wraps #recordOutput call in a try/catch block that
|
|
85
|
+
// converts DB error with code 25P02 to DBOSFailedSqlTransactionError.
|
|
86
|
+
// However, existing code doesn't make any logic decisions based on that error type.
|
|
87
|
+
// DBOSFailedSqlTransactionError does stored WF ID and function name, so I assume that info is logged out somewhere
|
|
88
|
+
}
|
|
89
|
+
return result;
|
|
90
|
+
}, { isolationLevel: config?.isolationLevel, readOnly: config?.readOnly });
|
|
91
|
+
// TODO: span.setStatus({ code: SpanStatusCode.OK });
|
|
92
|
+
// TODO: this.tracer.endSpan(span);
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
if ((0, datasource_1.isPGRetriableTransactionError)(error)) {
|
|
97
|
+
// TODO: span.addEvent('TXN SERIALIZATION FAILURE', { retryWaitMillis: retryWaitMillis }, performance.now());
|
|
98
|
+
await new Promise((resolve) => setTimeout(resolve, retryWaitMS));
|
|
99
|
+
retryWaitMS = Math.min(retryWaitMS * backoffFactor, maxRetryWaitMS);
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
// TODO: span.setStatus({ code: SpanStatusCode.ERROR, message: e.message });
|
|
104
|
+
// TODO: this.tracer.endSpan(span);
|
|
105
|
+
// TODO: currently, we are *not* recording errors in the txOutput table.
|
|
106
|
+
// For normal execution, this is fine because we also store tx step results (output and error) in the sysdb operation output table.
|
|
107
|
+
// However, I'm concerned that we have a dueling execution hole where one tx fails while another succeeds.
|
|
108
|
+
// This implies that we can end up in a situation where the step output records an error but the txOutput table records success.
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
class KnexDataSource {
|
|
116
|
+
static get client() {
|
|
117
|
+
if (!dbos_sdk_1.DBOS.isInTransaction()) {
|
|
118
|
+
throw new Error('invalid use of KnexDataSource.client outside of a DBOS transaction.');
|
|
119
|
+
}
|
|
120
|
+
const ctx = asyncLocalCtx.getStore();
|
|
121
|
+
if (!ctx) {
|
|
122
|
+
throw new Error('No async local context found.');
|
|
123
|
+
}
|
|
124
|
+
return ctx.client;
|
|
125
|
+
}
|
|
126
|
+
static async initializeInternalSchema(config) {
|
|
127
|
+
const knexDB = (0, knex_1.default)(config);
|
|
128
|
+
try {
|
|
129
|
+
await knexDB.schema.createSchemaIfNotExists('dbos');
|
|
130
|
+
const exists = await knexDB.schema.withSchema('dbos').hasTable('transaction_completion');
|
|
131
|
+
if (!exists) {
|
|
132
|
+
await knexDB.schema.withSchema('dbos').createTable('transaction_completion', (table) => {
|
|
133
|
+
table.string('workflow_id').notNullable();
|
|
134
|
+
table.integer('function_num').notNullable();
|
|
135
|
+
table.string('output').nullable();
|
|
136
|
+
table.primary(['workflow_id', 'function_num']);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
await knexDB.destroy();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
name;
|
|
145
|
+
#provider;
|
|
146
|
+
constructor(name, config) {
|
|
147
|
+
this.name = name;
|
|
148
|
+
this.#provider = new KnexDSTH(name, config);
|
|
149
|
+
(0, datasource_1.registerDataSource)(this.#provider);
|
|
150
|
+
}
|
|
151
|
+
async runTransaction(callback, funcName, config) {
|
|
152
|
+
return await (0, datasource_1.runTransaction)(callback, funcName, { dsName: this.name, config });
|
|
153
|
+
}
|
|
154
|
+
registerTransaction(func, name, config) {
|
|
155
|
+
return (0, datasource_1.registerTransaction)(this.name, func, { name }, config);
|
|
156
|
+
}
|
|
157
|
+
transaction(config) {
|
|
158
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
159
|
+
const ds = this;
|
|
160
|
+
return function decorator(_target, propertyKey, descriptor) {
|
|
161
|
+
if (!descriptor.value) {
|
|
162
|
+
throw Error('Use of decorator when original method is undefined');
|
|
163
|
+
}
|
|
164
|
+
descriptor.value = ds.registerTransaction(descriptor.value, propertyKey.toString(), config);
|
|
165
|
+
return descriptor;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
exports.KnexDataSource = KnexDataSource;
|
|
170
|
+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