@skedulo/integration-sdk 0.11.3 → 0.12.1
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/CHANGELOG.md +40 -0
- package/README.md +6 -2
- package/dist/actions/sync/run-flow.action.js +1 -1
- package/dist/actions/sync/run-flow.action.js.map +1 -1
- package/dist/actions/sync/run-job.action.d.ts +6 -3
- package/dist/actions/sync/run-job.action.d.ts.map +1 -1
- package/dist/actions/sync/run-job.action.js +105 -14
- package/dist/actions/sync/run-job.action.js.map +1 -1
- package/dist/actions/utils/action-names.d.ts +3 -0
- package/dist/actions/utils/action-names.d.ts.map +1 -1
- package/dist/actions/utils/action-names.js +4 -1
- package/dist/actions/utils/action-names.js.map +1 -1
- package/dist/browser.d.ts +4 -3
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +7 -1
- package/dist/browser.js.map +1 -1
- package/dist/clients/dataflow.client.d.ts +5 -1
- package/dist/clients/dataflow.client.d.ts.map +1 -1
- package/dist/clients/dataflow.client.js +11 -1
- package/dist/clients/dataflow.client.js.map +1 -1
- package/dist/constants.d.ts +8 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +15 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/interfaces/adapter.interface.d.ts +27 -0
- package/dist/interfaces/adapter.interface.d.ts.map +1 -1
- package/dist/interfaces/data-flow-spec.interface.d.ts +28 -1
- package/dist/interfaces/data-flow-spec.interface.d.ts.map +1 -1
- package/dist/interfaces/sync-flow-strategy.interface.d.ts +2 -0
- package/dist/interfaces/sync-flow-strategy.interface.d.ts.map +1 -1
- package/dist/interfaces/sync-result.interface.d.ts +5 -1
- package/dist/interfaces/sync-result.interface.d.ts.map +1 -1
- package/dist/services/dataflow.service.d.ts +5 -1
- package/dist/services/dataflow.service.d.ts.map +1 -1
- package/dist/services/dataflow.service.js +3 -0
- package/dist/services/dataflow.service.js.map +1 -1
- package/dist/services/id-mapping-sync.strategy.d.ts.map +1 -1
- package/dist/services/id-mapping-sync.strategy.js +2 -1
- package/dist/services/id-mapping-sync.strategy.js.map +1 -1
- package/dist/services/run-log-builder.d.ts +23 -1
- package/dist/services/run-log-builder.d.ts.map +1 -1
- package/dist/services/run-log-builder.js +84 -2
- package/dist/services/run-log-builder.js.map +1 -1
- package/dist/services/sync-runner.d.ts +3 -0
- package/dist/services/sync-runner.d.ts.map +1 -1
- package/dist/services/sync-runner.js +434 -60
- package/dist/services/sync-runner.js.map +1 -1
- package/dist/services/sync.service.d.ts +13 -2
- package/dist/services/sync.service.d.ts.map +1 -1
- package/dist/services/sync.service.js +133 -51
- package/dist/services/sync.service.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/artifact-builder.d.ts +1 -0
- package/dist/utils/artifact-builder.d.ts.map +1 -1
- package/dist/utils/artifact-builder.js +1 -0
- package/dist/utils/artifact-builder.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MAX_MESSAGE_LEN = exports.MAX_RECORD_ERRORS = void 0;
|
|
4
|
+
exports.stoppedEarlyNote = stoppedEarlyNote;
|
|
5
|
+
exports.heldCursorNote = heldCursorNote;
|
|
6
|
+
exports.droppedNote = droppedNote;
|
|
7
|
+
exports.unrecordableNote = unrecordableNote;
|
|
4
8
|
exports.buildRunLogEntries = buildRunLogEntries;
|
|
9
|
+
exports.flushRunLog = flushRunLog;
|
|
5
10
|
const integration_log_interface_1 = require("../interfaces/integration-log.interface");
|
|
6
11
|
const helpers_1 = require("../utils/helpers");
|
|
12
|
+
const constants_1 = require("../constants");
|
|
7
13
|
// Cap embedded errors per run so an adapter that returns many per-record outcomes
|
|
8
14
|
// (rather than failing the batch as a whole) can't write a huge jsonb blob.
|
|
9
15
|
// errorCount/errorsTruncated still report the true total vs what was stored.
|
|
@@ -21,6 +27,71 @@ function capRecord(data) {
|
|
|
21
27
|
return data;
|
|
22
28
|
return { truncated: true, preview: (0, helpers_1.truncate)(json, helpers_1.MAX_LOG_TEXT) };
|
|
23
29
|
}
|
|
30
|
+
function stoppedEarlyNote(args) {
|
|
31
|
+
if (args.stoppedEarly === 'checkpoint_held') {
|
|
32
|
+
if (args.heldTries) {
|
|
33
|
+
return `sync held on one page, ${holdTries(args.heldTries, 'moves past the page')}`;
|
|
34
|
+
}
|
|
35
|
+
if (args.backfill) {
|
|
36
|
+
return `${args.fullResync ? 'full resync' : 'backfill'} held on a page that looks like an outage, re-run it after the outage`;
|
|
37
|
+
}
|
|
38
|
+
return args.saved
|
|
39
|
+
? 'sync held on one page, it retries next run from the last saved checkpoint'
|
|
40
|
+
: 'sync held on one page and saved no progress, it retries next run';
|
|
41
|
+
}
|
|
42
|
+
if (args.stoppedEarly === 'checkpoint_failed' && !args.backfill) {
|
|
43
|
+
return args.saved
|
|
44
|
+
? "failed records couldn't be saved, the next run retries from the last saved checkpoint"
|
|
45
|
+
: "failed records couldn't be saved and no progress is saved, the next run starts the load over";
|
|
46
|
+
}
|
|
47
|
+
if (args.fullResync)
|
|
48
|
+
return 'full resync stopped early, it starts over on every run; to load a flow this big, reset its cursor instead';
|
|
49
|
+
if (args.backfill)
|
|
50
|
+
return `backfill stopped early and saved no progress; a backfill that needs more than ${constants_1.DEFAULT_RUN_BUDGET_MS / 60000} minutes can't finish, reset the cursor instead`;
|
|
51
|
+
if (args.tooLarge && !args.saved) {
|
|
52
|
+
return 'sync stopped early, no progress saved: resume token too large';
|
|
53
|
+
}
|
|
54
|
+
if (args.tooLarge) {
|
|
55
|
+
return 'sync stopped early, a resume token was too large to save: it continues next run from the last one that fit';
|
|
56
|
+
}
|
|
57
|
+
return 'sync in progress, continues next run';
|
|
58
|
+
}
|
|
59
|
+
function heldCursorNote(args) {
|
|
60
|
+
if (args.backfill) {
|
|
61
|
+
const run = args.fullResync ? 'full resync' : 'backfill';
|
|
62
|
+
if (args.reason === 'unrecorded_failures') {
|
|
63
|
+
const cause = "a record can't be recorded (no source id, or id too long)";
|
|
64
|
+
if (args.writeFailed) {
|
|
65
|
+
return `${run} held the cursor (${args.reason}), ${cause} and the failed-record write failed, re-run it to retry`;
|
|
66
|
+
}
|
|
67
|
+
return (`${run} held the cursor (${args.reason}), ${cause} so a re-run won't help` +
|
|
68
|
+
(args.rowsSaved ? ', the rows that could be recorded were saved' : ''));
|
|
69
|
+
}
|
|
70
|
+
return `${run} held the cursor (${args.reason}), re-run it to retry`;
|
|
71
|
+
}
|
|
72
|
+
if (args.heldTries) {
|
|
73
|
+
return `window retries next run (${args.reason}), sync held on the last page, ${holdTries(args.heldTries, 'moves on')}`;
|
|
74
|
+
}
|
|
75
|
+
return `window retries next run (${args.reason})`;
|
|
76
|
+
}
|
|
77
|
+
function holdTries(tries, moveOn) {
|
|
78
|
+
return (`try ${tries} — after ${constants_1.MAX_CHECKPOINT_HOLDS} tries over at least ${constants_1.FAILED_RESUME_MIN_MS / 60000} min` +
|
|
79
|
+
` it records what it can and ${moveOn}`);
|
|
80
|
+
}
|
|
81
|
+
function droppedNote(dropped) {
|
|
82
|
+
return `${dropped} failure${dropped === 1 ? '' : 's'} not recorded, a run records at most ${exports.MAX_RECORD_ERRORS}`;
|
|
83
|
+
}
|
|
84
|
+
function unrecordableNote(afterHolds, atOnce) {
|
|
85
|
+
const failures = (n) => `${n} failure${n === 1 ? '' : 's'}`;
|
|
86
|
+
const why = '(no source id, or id too long)';
|
|
87
|
+
const notes = [
|
|
88
|
+
afterHolds > 0
|
|
89
|
+
? `moved past a held page, ${failures(afterHolds)} could not be recorded ${why}`
|
|
90
|
+
: '',
|
|
91
|
+
atOnce > 0 ? `skipped ${failures(atOnce)} that could not be recorded ${why}` : '',
|
|
92
|
+
];
|
|
93
|
+
return notes.filter(Boolean).join('; ') || undefined;
|
|
94
|
+
}
|
|
24
95
|
/**
|
|
25
96
|
* Pure translation of a run's outcome into a SINGLE run_summary log entry. Per-record
|
|
26
97
|
* failures are their own rows in the failed-record store now; this summary carries the
|
|
@@ -38,7 +109,11 @@ function buildRunLogEntries(args) {
|
|
|
38
109
|
`${summary.filtered} filtered, ${summary.skipped} skipped` +
|
|
39
110
|
(summary.deleted != null ? `, ${summary.deleted} deleted` : '') +
|
|
40
111
|
// The held-window outcome must be tenant-visible, not just a log line + metric.
|
|
41
|
-
(summary.holdCursor
|
|
112
|
+
(summary.holdCursor && !args.note
|
|
113
|
+
? ` — window retries next run (${summary.holdCursor})`
|
|
114
|
+
: '') +
|
|
115
|
+
(args.note ? ` — ${args.note}` : '') +
|
|
116
|
+
(summary.stoppedEarly ? ` (${summary.stoppedEarly})` : '');
|
|
42
117
|
const embeddedErrors = errors.slice(0, exports.MAX_RECORD_ERRORS).map((e) => (Object.assign(Object.assign({ stage: e.stage, message: clampMessage(e.message) }, (e.recordIndex !== undefined ? { recordIndex: e.recordIndex } : {})), (e.data ? { record: capRecord(e.data) } : {}))));
|
|
43
118
|
return [
|
|
44
119
|
{
|
|
@@ -50,7 +125,7 @@ function buildRunLogEntries(args) {
|
|
|
50
125
|
level,
|
|
51
126
|
kind: integration_log_interface_1.LogKind.RUN_SUMMARY,
|
|
52
127
|
message: clampMessage(message),
|
|
53
|
-
data: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ succeeded: summary.succeeded, failed: summary.failed, filtered: summary.filtered, skipped: summary.skipped, dlqWrites: summary.dlqWrites }, (summary.deleted != null ? { deleted: summary.deleted } : {})), (summary.holdCursor ? { cursorHeld: summary.holdCursor } : {})), { durationMs }), (jobRunId ? { jobRunId } : {})), (args.windowTo
|
|
128
|
+
data: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ succeeded: summary.succeeded, failed: summary.failed, filtered: summary.filtered, skipped: summary.skipped, dlqWrites: summary.dlqWrites }, (summary.deleted != null ? { deleted: summary.deleted } : {})), (summary.holdCursor ? { cursorHeld: summary.holdCursor } : {})), (summary.stoppedEarly ? { stoppedEarly: summary.stoppedEarly } : {})), { durationMs }), (jobRunId ? { jobRunId } : {})), (args.windowTo
|
|
54
129
|
? {
|
|
55
130
|
windowFrom: args.windowFrom ? args.windowFrom.toISOString() : null,
|
|
56
131
|
windowTo: args.windowTo.toISOString(),
|
|
@@ -61,4 +136,11 @@ function buildRunLogEntries(args) {
|
|
|
61
136
|
},
|
|
62
137
|
];
|
|
63
138
|
}
|
|
139
|
+
// Logging must never break a sync, so a failed flush only counts a metric and logs.
|
|
140
|
+
async function flushRunLog(ctx, entries, flowId) {
|
|
141
|
+
await ctx.integrationLogClient.create(entries).catch((err) => {
|
|
142
|
+
ctx.metrics.counter('run_log.flush_failed', 1, { integrationType: ctx.integrationType });
|
|
143
|
+
ctx.logger.error(`run_log_flush_failed: flowId=${flowId} error="${err instanceof Error ? err.message : String(err)}"`);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
64
146
|
//# sourceMappingURL=run-log-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-log-builder.js","sourceRoot":"","sources":["../../src/services/run-log-builder.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"run-log-builder.js","sourceRoot":"","sources":["../../src/services/run-log-builder.ts"],"names":[],"mappings":";;;AAwDA,4CAmCC;AAED,wCA0BC;AASD,kCAEC;AAED,4CAUC;AAQD,gDA8DC;AAGD,kCAWC;AAlOD,uFAKiD;AAGjD,8CAA0D;AAC1D,4CAAiG;AAGjG,kFAAkF;AAClF,4EAA4E;AAC5E,6EAA6E;AAChE,QAAA,iBAAiB,GAAG,GAAG,CAAC;AAErC,oFAAoF;AACpF,6DAA6D;AAChD,QAAA,eAAe,GAAG,sBAAY,CAAC;AAE5C,MAAM,YAAY,GAAG,CAA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CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GACpD,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GACzD,CAAC,WAAW,GAAG,yBAAiB;gBACjC,CAAC,CAAC,EAAE,eAAe,EAAE,WAAW,GAAG,yBAAiB,EAAE;gBACtD,CAAC,CAAC,EAAE,CAAC,CACR;SACF;KACF,CAAC;AACJ,CAAC;AAED,oFAAoF;AAC7E,KAAK,UAAU,WAAW,CAC/B,GAAuB,EACvB,OAA8B,EAC9B,MAAc;IAEd,MAAM,GAAG,CAAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QAC3D,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,sBAAsB,EAAE,CAAC,EAAE,EAAE,eAAe,EAAE,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC;QACzF,GAAG,CAAC,MAAM,CAAC,KAAK,CACd,gCAAgC,MAAM,WAAW,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CACrG,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IntegrationContext } from '../context';
|
|
2
2
|
import { AdapterRole } from '../constants';
|
|
3
3
|
import type { Adapter } from '../interfaces/adapter.interface';
|
|
4
|
+
import type { DataFlow } from '../interfaces/data-flow-spec.interface';
|
|
4
5
|
import type { MappedEvent } from '../interfaces/mapped-event.interface';
|
|
5
6
|
import type { BatchResult, SyncResult } from '../interfaces/sync-result.interface';
|
|
6
7
|
import type { SyncRunOptions } from '../interfaces/sync-flow-strategy.interface';
|
|
@@ -25,6 +26,7 @@ export declare class SyncRunner {
|
|
|
25
26
|
allowInactive?: boolean;
|
|
26
27
|
options?: SyncRunOptions;
|
|
27
28
|
}, ctx: IntegrationContext): Promise<BatchResult>;
|
|
29
|
+
private _countFailedResume;
|
|
28
30
|
private _emitRunLog;
|
|
29
31
|
handleEventBatch(args: {
|
|
30
32
|
events: MappedEvent[];
|
|
@@ -52,4 +54,5 @@ export declare function decideCursor(result: BatchResult, failures: FailedRecord
|
|
|
52
54
|
advance: boolean;
|
|
53
55
|
reason?: string;
|
|
54
56
|
};
|
|
57
|
+
export declare function syncScope(flow: DataFlow): string;
|
|
55
58
|
//# sourceMappingURL=sync-runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-runner.d.ts","sourceRoot":"","sources":["../../src/services/sync-runner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EACL,WAAW,
|
|
1
|
+
{"version":3,"file":"sync-runner.d.ts","sourceRoot":"","sources":["../../src/services/sync-runner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EACL,WAAW,EAUZ,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,wCAAwC,CAAC;AACrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAkB,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAGnG,OAAO,KAAK,EAAoB,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAWnG,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AA2BzE,qBAAa,gBAAiB,SAAQ,KAAK;gBA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