@diia-inhouse/workflow 1.15.2 → 1.16.0
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/cli/checkWorkflowDeterminism.js +145 -303
- package/dist/cli/checkWorkflowDeterminism.js.map +1 -1
- package/dist/cli/determinism/errorClassifier.js +65 -0
- package/dist/cli/determinism/errorClassifier.js.map +1 -0
- package/dist/cli/determinism/historyFiles.js +107 -0
- package/dist/cli/determinism/historyFiles.js.map +1 -0
- package/dist/cli/determinism/index.js +19 -0
- package/dist/cli/determinism/index.js.map +1 -0
- package/dist/cli/determinism/replayExecutor.js +139 -0
- package/dist/cli/determinism/replayExecutor.js.map +1 -0
- package/dist/cli/determinism/replayOptions.js +26 -0
- package/dist/cli/determinism/replayOptions.js.map +1 -0
- package/dist/cli/determinism/report.js +45 -0
- package/dist/cli/determinism/report.js.map +1 -0
- package/dist/cli/determinism/reportPrinter.js +152 -0
- package/dist/cli/determinism/reportPrinter.js.map +1 -0
- package/dist/cli/determinism/types.js +3 -0
- package/dist/cli/determinism/types.js.map +1 -0
- package/dist/cli/index.js +13 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/types/cli/checkWorkflowDeterminism.d.ts +5 -8
- package/dist/types/cli/determinism/errorClassifier.d.ts +15 -0
- package/dist/types/cli/determinism/historyFiles.d.ts +18 -0
- package/dist/types/cli/determinism/index.d.ts +10 -0
- package/dist/types/cli/determinism/replayExecutor.d.ts +9 -0
- package/dist/types/cli/determinism/replayOptions.d.ts +7 -0
- package/dist/types/cli/determinism/report.d.ts +16 -0
- package/dist/types/cli/determinism/reportPrinter.d.ts +5 -0
- package/dist/types/cli/determinism/types.d.ts +44 -0
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isNewStepsAdded = isNewStepsAdded;
|
|
4
|
+
exports.classifyReplayError = classifyReplayError;
|
|
5
|
+
const workflow_1 = require("@temporalio/workflow");
|
|
6
|
+
const activityMismatchRegex = /Activity type of scheduled event '(.+?)' does not match activity type of activity command '(.+?)'/;
|
|
7
|
+
function isNewStepsAdded(error) {
|
|
8
|
+
return error.errorType === 'DeterminismViolation' && error.errorMessage.includes('WorkflowExecutionCompleted');
|
|
9
|
+
}
|
|
10
|
+
function classifyReplayError(workflowId, error) {
|
|
11
|
+
if (error instanceof workflow_1.DeterminismViolationError) {
|
|
12
|
+
const message = error.message || '';
|
|
13
|
+
const match = message.match(activityMismatchRegex);
|
|
14
|
+
if (match) {
|
|
15
|
+
const [, scheduledEvent, activityCommand] = match;
|
|
16
|
+
return {
|
|
17
|
+
type: 'determinism-violation',
|
|
18
|
+
subtype: 'activity-mismatch',
|
|
19
|
+
entry: {
|
|
20
|
+
workflowId,
|
|
21
|
+
errorType: 'DeterminismViolation',
|
|
22
|
+
errorMessage: message,
|
|
23
|
+
details: {
|
|
24
|
+
issue: 'Activity Type Mismatch',
|
|
25
|
+
explanation: `The workflow history expected activity '${scheduledEvent}' but the code attempted to execute '${activityCommand}'`,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
if (message.includes('WorkflowExecutionCompleted')) {
|
|
31
|
+
return {
|
|
32
|
+
type: 'determinism-violation',
|
|
33
|
+
subtype: 'new-steps-added',
|
|
34
|
+
entry: {
|
|
35
|
+
workflowId,
|
|
36
|
+
errorType: 'DeterminismViolation',
|
|
37
|
+
errorMessage: message,
|
|
38
|
+
details: {
|
|
39
|
+
issue: 'New Steps Added',
|
|
40
|
+
explanation: 'This workflow has been modified to add new steps after the point where it previously completed. This is safe to ignore as it does not affect existing history.',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
type: 'determinism-violation',
|
|
47
|
+
subtype: 'other',
|
|
48
|
+
entry: {
|
|
49
|
+
workflowId,
|
|
50
|
+
errorType: 'DeterminismViolation',
|
|
51
|
+
errorMessage: message,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
type: 'replay-failure',
|
|
57
|
+
subtype: undefined,
|
|
58
|
+
entry: {
|
|
59
|
+
workflowId,
|
|
60
|
+
errorType: 'ReplayFailure',
|
|
61
|
+
errorMessage: error.message,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=errorClassifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorClassifier.js","sourceRoot":"","sources":["../../../src/cli/determinism/errorClassifier.ts"],"names":[],"mappings":";;AAoBA,0CAEC;AAED,kDA4DC;AApFD,mDAAgE;AAkBhE,MAAM,qBAAqB,GAAG,mGAAmG,CAAA;AAEjI,SAAgB,eAAe,CAAC,KAA+B;IAC3D,OAAO,KAAK,CAAC,SAAS,KAAK,sBAAsB,IAAI,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,4BAA4B,CAAC,CAAA;AAClH,CAAC;AAED,SAAgB,mBAAmB,CAAC,UAAkB,EAAE,KAAY;IAChE,IAAI,KAAK,YAAY,oCAAyB,EAAE,CAAC;QAC7C,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,EAAE,CAAA;QACnC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAA;QAElD,IAAI,KAAK,EAAE,CAAC;YACR,MAAM,CAAC,EAAE,cAAc,EAAE,eAAe,CAAC,GAAG,KAAK,CAAA;YAEjD,OAAO;gBACH,IAAI,EAAE,uBAAuB;gBAC7B,OAAO,EAAE,mBAAmB;gBAC5B,KAAK,EAAE;oBACH,UAAU;oBACV,SAAS,EAAE,sBAAsB;oBACjC,YAAY,EAAE,OAAO;oBACrB,OAAO,EAAE;wBACL,KAAK,EAAE,wBAAwB;wBAC/B,WAAW,EAAE,2CAA2C,cAAc,wCAAwC,eAAe,GAAG;qBACnI;iBACJ;aACJ,CAAA;QACL,CAAC;QAED,IAAI,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAAC,EAAE,CAAC;YACjD,OAAO;gBACH,IAAI,EAAE,uBAAuB;gBAC7B,OAAO,EAAE,iBAAiB;gBAC1B,KAAK,EAAE;oBACH,UAAU;oBACV,SAAS,EAAE,sBAAsB;oBACjC,YAAY,EAAE,OAAO;oBACrB,OAAO,EAAE;wBACL,KAAK,EAAE,iBAAiB;wBACxB,WAAW,EACP,gKAAgK;qBACvK;iBACJ;aACJ,CAAA;QACL,CAAC;QAED,OAAO;YACH,IAAI,EAAE,uBAAuB;YAC7B,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE;gBACH,UAAU;gBACV,SAAS,EAAE,sBAAsB;gBACjC,YAAY,EAAE,OAAO;aACxB;SACJ,CAAA;IACL,CAAC;IAED,OAAO;QACH,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE;YACH,UAAU;YACV,SAAS,EAAE,eAAe;YAC1B,YAAY,EAAE,KAAK,CAAC,OAAO;SAC9B;KACJ,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.collectHistoryFiles = collectHistoryFiles;
|
|
7
|
+
exports.parseHistoryFile = parseHistoryFile;
|
|
8
|
+
exports.loadHistoryEntries = loadHistoryEntries;
|
|
9
|
+
const node_fs_1 = require("node:fs");
|
|
10
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
11
|
+
const ENCRYPTED_ENCODING = 'YmluYXJ5L2VuY3J5cHRlZA=='; // base64 of 'binary/encrypted'
|
|
12
|
+
function collectHistoryFiles(dir) {
|
|
13
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
14
|
+
const dirExists = (0, node_fs_1.existsSync)(dir); // nosemgrep: eslint.detect-non-literal-fs-filename
|
|
15
|
+
if (!dirExists) {
|
|
16
|
+
throw new Error(`History directory does not exist: ${dir}`);
|
|
17
|
+
}
|
|
18
|
+
const files = [];
|
|
19
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
20
|
+
const entries = (0, node_fs_1.readdirSync)(dir, { withFileTypes: true }); // nosemgrep: eslint.detect-non-literal-fs-filename
|
|
21
|
+
for (const entry of entries) {
|
|
22
|
+
const fullPath = node_path_1.default.join(dir, entry.name);
|
|
23
|
+
if (entry.isDirectory()) {
|
|
24
|
+
files.push(...collectHistoryFiles(fullPath));
|
|
25
|
+
}
|
|
26
|
+
else if (entry.name.endsWith('.json')) {
|
|
27
|
+
files.push(fullPath);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return files;
|
|
31
|
+
}
|
|
32
|
+
const TERMINAL_EVENT_TYPES = new Set([
|
|
33
|
+
'EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED',
|
|
34
|
+
'EVENT_TYPE_WORKFLOW_EXECUTION_FAILED',
|
|
35
|
+
'EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT',
|
|
36
|
+
'EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED',
|
|
37
|
+
'EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED',
|
|
38
|
+
]);
|
|
39
|
+
function parseHistoryFile(filePath) {
|
|
40
|
+
const workflowId = node_path_1.default.basename(filePath, '.json');
|
|
41
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
42
|
+
const content = JSON.parse((0, node_fs_1.readFileSync)(filePath, 'utf8')); // nosemgrep: eslint.detect-non-literal-fs-filename
|
|
43
|
+
const history = content.history ?? content;
|
|
44
|
+
const events = history.events ?? [];
|
|
45
|
+
const startEvent = events.find((e) => e.eventType === 'EVENT_TYPE_WORKFLOW_EXECUTION_STARTED');
|
|
46
|
+
const workflowType = startEvent?.workflowExecutionStartedEventAttributes?.workflowType?.name ?? 'unknown';
|
|
47
|
+
const encrypted = hasEncryptedPayloads(events);
|
|
48
|
+
const running = !events.some((e) => TERMINAL_EVENT_TYPES.has(e.eventType ?? ''));
|
|
49
|
+
return { workflowId, workflowType, history, encrypted, running };
|
|
50
|
+
}
|
|
51
|
+
function hasEncryptedPayloads(events) {
|
|
52
|
+
for (const event of events) {
|
|
53
|
+
for (const [key, val] of Object.entries(event)) {
|
|
54
|
+
if (!key.includes('Attributes') || typeof val !== 'object' || val === null) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
for (const nested of Object.values(val)) {
|
|
58
|
+
if (typeof nested !== 'object' || nested === null) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const payloads = nested.payloads;
|
|
62
|
+
if (!Array.isArray(payloads)) {
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
for (const payload of payloads) {
|
|
66
|
+
if (payload.metadata?.encoding === ENCRYPTED_ENCODING) {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
function loadHistoryEntries(historyDir, workflows, options = {}) {
|
|
76
|
+
const { limit, encryptionEnabled = false, logger } = options;
|
|
77
|
+
let historyFiles = collectHistoryFiles(historyDir);
|
|
78
|
+
if (limit && limit > 0 && historyFiles.length > limit) {
|
|
79
|
+
historyFiles = historyFiles.slice(0, limit);
|
|
80
|
+
}
|
|
81
|
+
const entries = [];
|
|
82
|
+
let encryptedCount = 0;
|
|
83
|
+
let runningCount = 0;
|
|
84
|
+
for (const filePath of historyFiles) {
|
|
85
|
+
try {
|
|
86
|
+
const entry = parseHistoryFile(filePath);
|
|
87
|
+
if (entry.workflowType !== 'unknown' && !workflows[entry.workflowType]) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
if (entry.running) {
|
|
91
|
+
runningCount++;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if (entry.encrypted && !encryptionEnabled) {
|
|
95
|
+
encryptedCount++;
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
entries.push(entry);
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
const workflowId = node_path_1.default.basename(filePath, '.json');
|
|
102
|
+
logger?.warn(`Skipping ${workflowId} — failed to parse: ${err.message}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return { entries, encryptedCount, runningCount };
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=historyFiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"historyFiles.js","sourceRoot":"","sources":["../../../src/cli/determinism/historyFiles.ts"],"names":[],"mappings":";;;;;AAOA,kDAsBC;AAUD,4CAYC;AAsCD,gDA2CC;AApID,qCAA+D;AAC/D,0DAA4B;AAI5B,MAAM,kBAAkB,GAAG,0BAA0B,CAAA,CAAC,+BAA+B;AAErF,SAAgB,mBAAmB,CAAC,GAAW;IAC3C,mEAAmE;IACnE,MAAM,SAAS,GAAG,IAAA,oBAAU,EAAC,GAAG,CAAC,CAAA,CAAC,mDAAmD;IAErF,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qCAAqC,GAAG,EAAE,CAAC,CAAA;IAC/D,CAAC;IAED,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,mEAAmE;IACnE,MAAM,OAAO,GAAG,IAAA,qBAAW,EAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA,CAAC,mDAAmD;IAE7G,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC1B,MAAM,QAAQ,GAAG,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE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exports.printReport = exports.replaySingle = exports.replayBatch = exports.resolveWorkflowsPath = exports.buildReplayOptions = exports.DeterminismReportBuilder = exports.loadHistoryEntries = exports.isNewStepsAdded = exports.classifyReplayError = void 0;
|
|
4
|
+
var errorClassifier_1 = require("./errorClassifier");
|
|
5
|
+
Object.defineProperty(exports, "classifyReplayError", { enumerable: true, get: function () { return errorClassifier_1.classifyReplayError; } });
|
|
6
|
+
Object.defineProperty(exports, "isNewStepsAdded", { enumerable: true, get: function () { return errorClassifier_1.isNewStepsAdded; } });
|
|
7
|
+
var historyFiles_1 = require("./historyFiles");
|
|
8
|
+
Object.defineProperty(exports, "loadHistoryEntries", { enumerable: true, get: function () { return historyFiles_1.loadHistoryEntries; } });
|
|
9
|
+
var report_1 = require("./report");
|
|
10
|
+
Object.defineProperty(exports, "DeterminismReportBuilder", { enumerable: true, get: function () { return report_1.DeterminismReportBuilder; } });
|
|
11
|
+
var replayOptions_1 = require("./replayOptions");
|
|
12
|
+
Object.defineProperty(exports, "buildReplayOptions", { enumerable: true, get: function () { return replayOptions_1.buildReplayOptions; } });
|
|
13
|
+
Object.defineProperty(exports, "resolveWorkflowsPath", { enumerable: true, get: function () { return replayOptions_1.resolveWorkflowsPath; } });
|
|
14
|
+
var replayExecutor_1 = require("./replayExecutor");
|
|
15
|
+
Object.defineProperty(exports, "replayBatch", { enumerable: true, get: function () { return replayExecutor_1.replayBatch; } });
|
|
16
|
+
Object.defineProperty(exports, "replaySingle", { enumerable: true, get: function () { return replayExecutor_1.replaySingle; } });
|
|
17
|
+
var reportPrinter_1 = require("./reportPrinter");
|
|
18
|
+
Object.defineProperty(exports, "printReport", { enumerable: true, get: function () { return reportPrinter_1.printReport; } });
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/determinism/index.ts"],"names":[],"mappings":";;;AAAA,qDAAwE;AAA/D,sHAAA,mBAAmB,OAAA;AAAE,kHAAA,eAAe,OAAA;AAI7C,+CAAmD;AAA1C,kHAAA,kBAAkB,OAAA;AAI3B,mCAAmD;AAA1C,kHAAA,wBAAwB,OAAA;AAEjC,iDAA0E;AAAjE,mHAAA,kBAAkB,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AAEjD,mDAA4D;AAAnD,6GAAA,WAAW,OAAA;AAAE,8GAAA,YAAY,OAAA;AAElC,iDAA6C;AAApC,4GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.replaySingle = replaySingle;
|
|
4
|
+
exports.replayBatch = replayBatch;
|
|
5
|
+
const worker_1 = require("@temporalio/worker");
|
|
6
|
+
const workflow_1 = require("@temporalio/workflow");
|
|
7
|
+
const errorClassifier_1 = require("./errorClassifier");
|
|
8
|
+
class TimeoutError extends Error {
|
|
9
|
+
timeoutMs;
|
|
10
|
+
name = 'TimeoutError';
|
|
11
|
+
constructor(timeoutMs) {
|
|
12
|
+
super(`Replay timed out after ${timeoutMs / 1000}s`);
|
|
13
|
+
this.timeoutMs = timeoutMs;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function runWithTimeout(options, history, workflowId, timeoutMs) {
|
|
17
|
+
return new Promise((resolve, reject) => {
|
|
18
|
+
const timer = setTimeout(() => reject(new TimeoutError(timeoutMs)), timeoutMs);
|
|
19
|
+
void worker_1.Worker.runReplayHistory(options, history, workflowId)
|
|
20
|
+
.then(resolve, reject)
|
|
21
|
+
.finally(() => clearTimeout(timer));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
async function replaySingle(options, history, workflowId, workflowType, config) {
|
|
25
|
+
let failedAttempts = 0;
|
|
26
|
+
const originalErrors = [];
|
|
27
|
+
for (let attempt = 1; attempt <= config.maxRetries; attempt++) {
|
|
28
|
+
try {
|
|
29
|
+
if (attempt > 1) {
|
|
30
|
+
const delay = Math.min(config.retryDelayMs * Math.pow(2, attempt - 2), 4000);
|
|
31
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
32
|
+
}
|
|
33
|
+
await runWithTimeout(options, history, workflowId, config.timeoutMs);
|
|
34
|
+
return {
|
|
35
|
+
status: 'success',
|
|
36
|
+
workflowId,
|
|
37
|
+
workflowType,
|
|
38
|
+
recoveredOnRetry: attempt > 1,
|
|
39
|
+
failedAttempts,
|
|
40
|
+
originalErrors,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
if (err instanceof workflow_1.DeterminismViolationError) {
|
|
45
|
+
const classification = (0, errorClassifier_1.classifyReplayError)(workflowId, err);
|
|
46
|
+
return { status: 'failure', workflowId, workflowType, error: classification.entry };
|
|
47
|
+
}
|
|
48
|
+
if (err instanceof TimeoutError) {
|
|
49
|
+
return { status: 'timeout', workflowId, workflowType, timeoutMs: err.timeoutMs };
|
|
50
|
+
}
|
|
51
|
+
failedAttempts++;
|
|
52
|
+
originalErrors.push(`Attempt ${attempt}: ${err instanceof Error ? err.message : String(err)}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
status: 'failure',
|
|
57
|
+
workflowId,
|
|
58
|
+
workflowType,
|
|
59
|
+
error: {
|
|
60
|
+
workflowId,
|
|
61
|
+
errorType: 'ReplayFailure',
|
|
62
|
+
errorMessage: `Replay failed after ${config.maxRetries} attempts`,
|
|
63
|
+
details: { originalErrors },
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const DEFAULT_BATCH_TIMEOUT_MS = 30_000;
|
|
68
|
+
async function* replayBatch(options, entries, timeoutMs = DEFAULT_BATCH_TIMEOUT_MS) {
|
|
69
|
+
const entryMap = new Map(entries.map((e) => [e.workflowId, e]));
|
|
70
|
+
const entryOrder = entries.map((e) => e.workflowId);
|
|
71
|
+
let nextExpectedIndex = 0;
|
|
72
|
+
async function* historyIterator() {
|
|
73
|
+
for (const entry of entries) {
|
|
74
|
+
yield { history: entry.history, workflowId: entry.workflowId };
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const iterator = worker_1.Worker.runReplayHistories(options, historyIterator())[Symbol.asyncIterator]();
|
|
78
|
+
while (true) {
|
|
79
|
+
const nextResult = await Promise.race([
|
|
80
|
+
iterator.next(),
|
|
81
|
+
new Promise((resolve) => setTimeout(() => resolve('timeout'), timeoutMs)),
|
|
82
|
+
]);
|
|
83
|
+
if (nextResult === 'timeout') {
|
|
84
|
+
// The replay stream is stuck — emit timeout for the current expected workflow and abort
|
|
85
|
+
const stuckWorkflowId = entryOrder[nextExpectedIndex];
|
|
86
|
+
if (stuckWorkflowId) {
|
|
87
|
+
const entry = entryMap.get(stuckWorkflowId);
|
|
88
|
+
yield {
|
|
89
|
+
status: 'timeout',
|
|
90
|
+
workflowId: stuckWorkflowId,
|
|
91
|
+
workflowType: entry?.workflowType ?? 'unknown',
|
|
92
|
+
timeoutMs,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
// Cannot continue — the worker is stuck, remaining workflows won't be processed
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
if (nextResult.done) {
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
const result = nextResult.value;
|
|
102
|
+
const entry = entryMap.get(result.workflowId);
|
|
103
|
+
const workflowType = entry?.workflowType ?? 'unknown';
|
|
104
|
+
// Track progress for timeout detection
|
|
105
|
+
const resultIndex = entryOrder.indexOf(result.workflowId);
|
|
106
|
+
if (resultIndex >= nextExpectedIndex) {
|
|
107
|
+
nextExpectedIndex = resultIndex + 1;
|
|
108
|
+
}
|
|
109
|
+
if (result.error) {
|
|
110
|
+
if (result.error instanceof workflow_1.DeterminismViolationError) {
|
|
111
|
+
const classification = (0, errorClassifier_1.classifyReplayError)(result.workflowId, result.error);
|
|
112
|
+
yield { status: 'failure', workflowId: result.workflowId, workflowType, error: classification.entry };
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
yield {
|
|
116
|
+
status: 'failure',
|
|
117
|
+
workflowId: result.workflowId,
|
|
118
|
+
workflowType,
|
|
119
|
+
error: {
|
|
120
|
+
workflowId: result.workflowId,
|
|
121
|
+
errorType: 'ReplayFailure',
|
|
122
|
+
errorMessage: result.error.message,
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
yield {
|
|
129
|
+
status: 'success',
|
|
130
|
+
workflowId: result.workflowId,
|
|
131
|
+
workflowType,
|
|
132
|
+
recoveredOnRetry: false,
|
|
133
|
+
failedAttempts: 0,
|
|
134
|
+
originalErrors: [],
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=replayExecutor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replayExecutor.js","sourceRoot":"","sources":["../../../src/cli/determinism/replayExecutor.ts"],"names":[],"mappings":";;AA8BA,oCAuDC;AAID,kCAoFC;AA7KD,+CAAgE;AAChE,mDAAgE;AAEhE,uDAAuD;AASvD,MAAM,YAAa,SAAQ,KAAK;IAGP;IAFZ,IAAI,GAAG,cAAc,CAAA;IAE9B,YAAqB,SAAiB;QAClC,KAAK,CAAC,0BAA0B,SAAS,GAAG,IAAI,GAAG,CAAC,CAAA;QADnC,cAAS,GAAT,SAAS,CAAQ;IAEtC,CAAC;CACJ;AAED,SAAS,cAAc,CAAC,OAA4B,EAAE,OAAgB,EAAE,UAAkB,EAAE,SAAiB;IACzG,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACzC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;QAE9E,KAAK,eAAM,CAAC,gBAAgB,CAAC,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I,WAAW,IAAI,iBAAiB,EAAE,CAAC;YACnC,iBAAiB,GAAG,WAAW,GAAG,CAAC,CAAA;QACvC,CAAC;QAED,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,IAAI,MAAM,CAAC,KAAK,YAAY,oCAAyB,EAAE,CAAC;gBACpD,MAAM,cAAc,GAAG,IAAA,qCAAmB,EAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;gBAE3E,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,CAAC,KAAK,EAAE,CAAA;YACzG,CAAC;iBAAM,CAAC;gBACJ,MAAM;oBACF,MAAM,EAAE,SAAS;oBACjB,UAAU,EAAE,MAAM,CAAC,UAAU;oBAC7B,YAAY;oBACZ,KAAK,EAAE;wBACH,UAAU,EAAE,MAAM,CAAC,UAAU;wBAC7B,SAAS,EAAE,eAAe;wBAC1B,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO;qBACrC;iBACJ,CAAA;YACL,CAAC;QACL,CAAC;aAAM,CAAC;YACJ,MAAM;gBACF,MAAM,EAAE,SAAS;gBACjB,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,YAAY;gBACZ,gBAAgB,EAAE,KAAK;gBACvB,cAAc,EAAE,CAAC;gBACjB,cAAc,EAAE,EAAE;aACrB,CAAA;QACL,CAAC;IACL,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.resolveWorkflowsPath = resolveWorkflowsPath;
|
|
7
|
+
exports.buildReplayOptions = buildReplayOptions;
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const encryption_1 = require("../../encryption");
|
|
10
|
+
function resolveWorkflowsPath(workflowsPath) {
|
|
11
|
+
const baseDir = node_path_1.default.resolve('./dist');
|
|
12
|
+
const fullPath = node_path_1.default.resolve(baseDir, workflowsPath, 'index.js');
|
|
13
|
+
if (!fullPath.startsWith(baseDir + node_path_1.default.sep)) {
|
|
14
|
+
throw new Error(`Invalid workflows path: path traversal detected in '${workflowsPath}'`);
|
|
15
|
+
}
|
|
16
|
+
return fullPath;
|
|
17
|
+
}
|
|
18
|
+
async function buildReplayOptions(workflowsPath, encryption, envService) {
|
|
19
|
+
const fullPath = resolveWorkflowsPath(workflowsPath);
|
|
20
|
+
const options = { workflowsPath: fullPath };
|
|
21
|
+
if (encryption.enabled && envService) {
|
|
22
|
+
options.dataConverter = await (0, encryption_1.getDataConverter)(encryption.keyId, envService);
|
|
23
|
+
}
|
|
24
|
+
return options;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=replayOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replayOptions.js","sourceRoot":"","sources":["../../../src/cli/determinism/replayOptions.ts"],"names":[],"mappings":";;;;;AAQA,oDASC;AAED,gDAaC;AAhCD,0DAA4B;AAM5B,iDAAmD;AAEnD,SAAgB,oBAAoB,CAAC,aAAqB;IACtD,MAAM,OAAO,GAAG,mBAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;IACtC,MAAM,QAAQ,GAAG,mBAAI,CAAC,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,UAAU,CAAC,CAAA;IAEjE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,OAAO,GAAG,mBAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3C,MAAM,IAAI,KAAK,CAAC,uDAAuD,aAAa,GAAG,CAAC,CAAA;IAC5F,CAAC;IAED,OAAO,QAAQ,CAAA;AACnB,CAAC;AAEM,KAAK,UAAU,kBAAkB,CACpC,aAAqB,EACrB,UAA+C,EAC/C,UAAuB;IAEvB,MAAM,QAAQ,GAAG,oBAAoB,CAAC,aAAa,CAAC,CAAA;IACpD,MAAM,OAAO,GAAwB,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAA;IAEhE,IAAI,UAAU,CAAC,OAAO,IAAI,UAAU,EAAE,CAAC;QACnC,OAAO,CAAC,aAAa,GAAG,MAAM,IAAA,6BAAgB,EAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,CAAA;IAChF,CAAC;IAED,OAAO,OAAO,CAAA;AAClB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeterminismReportBuilder = void 0;
|
|
4
|
+
class DeterminismReportBuilder {
|
|
5
|
+
successCount = 0;
|
|
6
|
+
failureCount = 0;
|
|
7
|
+
timeoutCount = 0;
|
|
8
|
+
skippedCount = 0;
|
|
9
|
+
errors = [];
|
|
10
|
+
warnings = [];
|
|
11
|
+
checkedWorkflows = [];
|
|
12
|
+
addSuccess(workflowId, workflowType) {
|
|
13
|
+
this.successCount++;
|
|
14
|
+
this.checkedWorkflows.push({ name: workflowType, id: workflowId, status: 'success' });
|
|
15
|
+
}
|
|
16
|
+
addFailure(workflowId, workflowType, error) {
|
|
17
|
+
this.failureCount++;
|
|
18
|
+
this.errors.push(error);
|
|
19
|
+
this.checkedWorkflows.push({ name: workflowType, id: workflowId, status: 'failure' });
|
|
20
|
+
}
|
|
21
|
+
addTimeout(workflowId, workflowType, warning) {
|
|
22
|
+
this.timeoutCount++;
|
|
23
|
+
this.warnings.push(warning);
|
|
24
|
+
this.checkedWorkflows.push({ name: workflowType, id: workflowId, status: 'timeout' });
|
|
25
|
+
}
|
|
26
|
+
setSkippedCount(count) {
|
|
27
|
+
this.skippedCount = count;
|
|
28
|
+
}
|
|
29
|
+
addWarning(warning) {
|
|
30
|
+
this.warnings.push(warning);
|
|
31
|
+
}
|
|
32
|
+
build() {
|
|
33
|
+
return {
|
|
34
|
+
successCount: this.successCount,
|
|
35
|
+
failureCount: this.failureCount,
|
|
36
|
+
timeoutCount: this.timeoutCount,
|
|
37
|
+
skippedCount: this.skippedCount,
|
|
38
|
+
errors: [...this.errors],
|
|
39
|
+
warnings: [...this.warnings],
|
|
40
|
+
checkedWorkflows: [...this.checkedWorkflows],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.DeterminismReportBuilder = DeterminismReportBuilder;
|
|
45
|
+
//# sourceMappingURL=report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../src/cli/determinism/report.ts"],"names":[],"mappings":";;;AAEA,MAAa,wBAAwB;IACzB,YAAY,GAAG,CAAC,CAAA;IAChB,YAAY,GAAG,CAAC,CAAA;IAChB,YAAY,GAAG,CAAC,CAAA;IAChB,YAAY,GAAG,CAAC,CAAA;IACP,MAAM,GAA+B,EAAE,CAAA;IACvC,QAAQ,GAA+B,EAAE,CAAA;IACzC,gBAAgB,GAAkE,EAAE,CAAA;IAErG,UAAU,CAAC,UAAkB,EAAE,YAAoB;QAC/C,IAAI,CAAC,YAAY,EAAE,CAAA;QACnB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAA;IACzF,CAAC;IAED,UAAU,CAAC,UAAkB,EAAE,YAAoB,EAAE,KAA+B;QAChF,IAAI,CAAC,YAAY,EAAE,CAAA;QACnB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACvB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAA;IACzF,CAAC;IAED,UAAU,CAAC,UAAkB,EAAE,YAAoB,EAAE,OAAiC;QAClF,IAAI,CAAC,YAAY,EAAE,CAAA;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC3B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAA;IACzF,CAAC;IAED,eAAe,CAAC,KAAa;QACzB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAA;IAC7B,CAAC;IAED,UAAU,CAAC,OAAiC;QACxC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC/B,CAAC;IAED,KAAK;QACD,OAAO;YACH,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;YACxB,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC5B,gBAAgB,EAAE,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC;SAC/C,CAAA;IACL,CAAC;CACJ;AA7CD,4DA6CC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.printReport = printReport;
|
|
4
|
+
const node_util_1 = require("node:util");
|
|
5
|
+
const reset = '\u001B[0m';
|
|
6
|
+
const bold = '\u001B[1m';
|
|
7
|
+
const green = '\u001B[32m';
|
|
8
|
+
const red = '\u001B[31m';
|
|
9
|
+
const yellow = '\u001B[33m';
|
|
10
|
+
const magenta = '\u001B[35m';
|
|
11
|
+
const cyan = '\u001B[36m';
|
|
12
|
+
const white = '\u001B[37m';
|
|
13
|
+
const bgRed = '\u001B[41m';
|
|
14
|
+
const bgGreen = '\u001B[42m';
|
|
15
|
+
const bgYellow = '\u001B[43m';
|
|
16
|
+
const bgBlue = '\u001B[44m';
|
|
17
|
+
const dim = '\u001B[2m';
|
|
18
|
+
function collectTypeStats(report) {
|
|
19
|
+
const map = new Map();
|
|
20
|
+
for (const wf of report.checkedWorkflows) {
|
|
21
|
+
let stats = map.get(wf.name);
|
|
22
|
+
if (!stats) {
|
|
23
|
+
stats = { passed: 0, failed: 0, timedOut: 0 };
|
|
24
|
+
map.set(wf.name, stats);
|
|
25
|
+
}
|
|
26
|
+
const statusMap = {
|
|
27
|
+
success: 'passed',
|
|
28
|
+
failure: 'failed',
|
|
29
|
+
timeout: 'timedOut',
|
|
30
|
+
};
|
|
31
|
+
stats[statusMap[wf.status]]++;
|
|
32
|
+
}
|
|
33
|
+
return map;
|
|
34
|
+
}
|
|
35
|
+
function formatTypeDetail(stats) {
|
|
36
|
+
const total = stats.passed + stats.failed + stats.timedOut;
|
|
37
|
+
const parts = [];
|
|
38
|
+
if (stats.failed > 0) {
|
|
39
|
+
parts.push(`${red}${stats.failed} failing${reset}`);
|
|
40
|
+
}
|
|
41
|
+
if (stats.timedOut > 0) {
|
|
42
|
+
parts.push(`${yellow}${stats.timedOut} timed out${reset}`);
|
|
43
|
+
}
|
|
44
|
+
if (parts.length === 0) {
|
|
45
|
+
return `${total} instance${total === 1 ? '' : 's'}`;
|
|
46
|
+
}
|
|
47
|
+
return `${parts.join(', ')} out of ${total}`;
|
|
48
|
+
}
|
|
49
|
+
function printWorkflowTypes(report, w) {
|
|
50
|
+
const typeStats = collectTypeStats(report);
|
|
51
|
+
if (typeStats.size === 0) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const sorted = Array.from(typeStats.entries()).toSorted((a, b) => a[0].localeCompare(b[0]));
|
|
55
|
+
const deterministic = sorted.filter(([, s]) => s.failed === 0);
|
|
56
|
+
const nonDeterministic = sorted.filter(([, s]) => s.failed > 0);
|
|
57
|
+
if (deterministic.length > 0) {
|
|
58
|
+
w.write(`\n ${bgGreen}${white}${bold} DETERMINISTIC ${reset}\n\n`);
|
|
59
|
+
for (const [name, stats] of deterministic) {
|
|
60
|
+
w.write(` ${green}✓${reset} ${bold}${name}${reset} ${dim}(${formatTypeDetail(stats)})${reset}\n`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (nonDeterministic.length > 0) {
|
|
64
|
+
w.write(`\n ${bgRed}${white}${bold} NON-DETERMINISTIC ${reset}\n\n`);
|
|
65
|
+
for (const [name, stats] of nonDeterministic) {
|
|
66
|
+
w.write(` ${red}✗${reset} ${bold}${name}${reset} (${formatTypeDetail(stats)})\n`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function printErrors(report, w) {
|
|
71
|
+
if (report.errors.length === 0) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
w.write(`\n ${bgRed}${white}${bold} ${report.errors.length} ERROR${report.errors.length > 1 ? 'S' : ''} ${reset}\n\n`);
|
|
75
|
+
for (const [index, error] of report.errors.entries()) {
|
|
76
|
+
const errorTypeColor = error.errorType === 'DeterminismViolation' ? red : yellow;
|
|
77
|
+
w.write(` ${bold}${index + 1}.${reset} ${cyan}${error.workflowId}${reset}\n`);
|
|
78
|
+
w.write(` ${errorTypeColor}${error.errorMessage}${reset}\n`);
|
|
79
|
+
if (error.details) {
|
|
80
|
+
for (const [key, value] of Object.entries(error.details)) {
|
|
81
|
+
const formattedValue = typeof value === 'string' ? value : (0, node_util_1.format)('%o', value);
|
|
82
|
+
w.write(` ${magenta}${key}:${reset} ${formattedValue}\n`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (index < report.errors.length - 1) {
|
|
86
|
+
w.write('\n');
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function printWarnings(report, w) {
|
|
91
|
+
const encryptionWarnings = report.warnings.filter((x) => x.errorMessage.includes('Encrypted payloads'));
|
|
92
|
+
const timeoutWarnings = report.warnings.filter((x) => x.errorMessage.includes('timed out'));
|
|
93
|
+
const otherWarnings = report.warnings.filter((x) => !x.errorMessage.includes('Encrypted payloads') && !x.errorMessage.includes('timed out'));
|
|
94
|
+
const totalWarnings = encryptionWarnings.length + timeoutWarnings.length + otherWarnings.length;
|
|
95
|
+
if (totalWarnings === 0) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
w.write(`\n ${bgYellow}${white}${bold} ${totalWarnings} WARNING${totalWarnings > 1 ? 'S' : ''} ${reset}\n\n`);
|
|
99
|
+
if (encryptionWarnings.length > 0) {
|
|
100
|
+
w.write(` ${yellow}⊘${reset} ${bold}${encryptionWarnings.length}${reset} workflow(s) with encrypted payloads — decrypt or provide encryption keys\n`);
|
|
101
|
+
}
|
|
102
|
+
if (timeoutWarnings.length > 0) {
|
|
103
|
+
w.write(` ${yellow}⏰${reset} ${bold}${timeoutWarnings.length}${reset} workflow(s) timed out during replay\n`);
|
|
104
|
+
if (timeoutWarnings.length <= 5) {
|
|
105
|
+
for (const tw of timeoutWarnings) {
|
|
106
|
+
w.write(` ${dim}${tw.workflowId}${reset}\n`);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
for (const warning of otherWarnings) {
|
|
111
|
+
w.write(` ${yellow}⚠${reset} ${cyan}${warning.workflowId}${reset}: ${warning.errorMessage}\n`);
|
|
112
|
+
if (warning.details) {
|
|
113
|
+
for (const [key, value] of Object.entries(warning.details)) {
|
|
114
|
+
const formattedValue = typeof value === 'string' ? value : (0, node_util_1.format)('%o', value);
|
|
115
|
+
w.write(` ${magenta}${key}:${reset} ${formattedValue}\n`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function printSummaryBanner(report, w) {
|
|
121
|
+
w.write('\n');
|
|
122
|
+
if (report.failureCount === 0 && report.successCount > 0) {
|
|
123
|
+
w.write(` ${bgGreen}${white}${bold} PASS ${reset} ${green}All workflows are deterministic${reset}`);
|
|
124
|
+
}
|
|
125
|
+
else if (report.failureCount > 0) {
|
|
126
|
+
w.write(` ${bgRed}${white}${bold} FAIL ${reset} ${red}${report.failureCount} workflow(s) have determinism issues${reset}`);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
w.write(` ${bgYellow}${white}${bold} SKIP ${reset} ${yellow}No workflows were checked${reset}`);
|
|
130
|
+
}
|
|
131
|
+
const parts = [`${green}${report.successCount}${reset} passed`];
|
|
132
|
+
if (report.failureCount > 0) {
|
|
133
|
+
parts.push(`${red}${report.failureCount}${reset} failed`);
|
|
134
|
+
}
|
|
135
|
+
if (report.timeoutCount > 0) {
|
|
136
|
+
parts.push(`${yellow}${report.timeoutCount}${reset} timed out`);
|
|
137
|
+
}
|
|
138
|
+
if (report.skippedCount > 0) {
|
|
139
|
+
parts.push(`${dim}${report.skippedCount}${reset} skipped`);
|
|
140
|
+
}
|
|
141
|
+
const total = report.successCount + report.failureCount + report.timeoutCount + report.skippedCount;
|
|
142
|
+
w.write(` ${dim}(${parts.join(', ')}, ${bold}${total}${reset}${dim} total)${reset}\n\n`);
|
|
143
|
+
}
|
|
144
|
+
function printReport(report, writer = process.stdout) {
|
|
145
|
+
writer.write('\n');
|
|
146
|
+
writer.write(` ${bgBlue}${bold}${white} WORKFLOW DETERMINISM CHECK ${reset}\n`);
|
|
147
|
+
printWorkflowTypes(report, writer);
|
|
148
|
+
printErrors(report, writer);
|
|
149
|
+
printWarnings(report, writer);
|
|
150
|
+
printSummaryBanner(report, writer);
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=reportPrinter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reportPrinter.js","sourceRoot":"","sources":["../../../src/cli/determinism/reportPrinter.ts"],"names":[],"mappings":";;AAoMA,kCAQC;AA5MD,yCAAkC;AAQlC,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