deepline 0.1.144 → 0.1.146
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/bundling-sources/apps/play-runner-workers/src/coordinator-entry.ts +36 -4
- package/dist/bundling-sources/apps/play-runner-workers/src/entry.ts +5 -2
- package/dist/bundling-sources/sdk/src/client.ts +5 -0
- package/dist/bundling-sources/sdk/src/release.ts +2 -2
- package/dist/bundling-sources/shared_libs/temporal/constants.ts +4 -3
- package/dist/cli/index.js +492 -43
- package/dist/cli/index.mjs +492 -43
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -2
- package/dist/index.mjs +5 -2
- package/package.json +1 -1
|
@@ -640,6 +640,8 @@ type DynamicWorkflowMetadata = {
|
|
|
640
640
|
const SUBMIT_INITIAL_STATE_MAX_WAIT_MS = 0;
|
|
641
641
|
const SUBMIT_INITIAL_STATE_POLL_MS = 50;
|
|
642
642
|
const WORKFLOW_RETRY_STATE_TTL_MS = 60 * 60 * 1000;
|
|
643
|
+
const COORDINATOR_WORKER_MEMORY_LIMIT_MESSAGE =
|
|
644
|
+
'Worker memory limit hit before the run could finish. For CSV enrich, use --output or --in-place for automatic batches; otherwise rerun smaller --rows ranges.';
|
|
643
645
|
|
|
644
646
|
function buildDynamicWorkflowMetadata(
|
|
645
647
|
params: PlayWorkflowParams,
|
|
@@ -1052,6 +1054,27 @@ function readWorkflowPayload(event: unknown): Record<string, unknown> | null {
|
|
|
1052
1054
|
return isRecord(payload.params) ? payload.params : payload;
|
|
1053
1055
|
}
|
|
1054
1056
|
|
|
1057
|
+
function isCoordinatorWorkerMemoryLimitError(error: unknown): boolean {
|
|
1058
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1059
|
+
return message.toLowerCase().includes('worker exceeded memory limit');
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
function normalizeCoordinatorWorkflowRuntimeFailure(
|
|
1063
|
+
error: unknown,
|
|
1064
|
+
): ReturnType<typeof normalizePlayRunFailure> {
|
|
1065
|
+
const failure = normalizePlayRunFailure(error);
|
|
1066
|
+
if (!isCoordinatorWorkerMemoryLimitError(error)) {
|
|
1067
|
+
return failure;
|
|
1068
|
+
}
|
|
1069
|
+
return {
|
|
1070
|
+
...failure,
|
|
1071
|
+
code: 'WORKER_MEMORY_LIMIT_EXCEEDED',
|
|
1072
|
+
message: COORDINATOR_WORKER_MEMORY_LIMIT_MESSAGE,
|
|
1073
|
+
retryable: false,
|
|
1074
|
+
cause: failure.message,
|
|
1075
|
+
};
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1055
1078
|
async function markWorkflowRuntimeFailure(input: {
|
|
1056
1079
|
env: CoordinatorEnv;
|
|
1057
1080
|
event: unknown;
|
|
@@ -1074,6 +1097,16 @@ async function markWorkflowRuntimeFailure(input: {
|
|
|
1074
1097
|
input.error instanceof Error && typeof input.error.stack === 'string'
|
|
1075
1098
|
? input.error.stack.split('\n').slice(0, 12).join('\n')
|
|
1076
1099
|
: null;
|
|
1100
|
+
const failure = normalizeCoordinatorWorkflowRuntimeFailure(input.error);
|
|
1101
|
+
const shouldPreserveRawError =
|
|
1102
|
+
failure.code === 'RUN_FAILED' ||
|
|
1103
|
+
(failure.cause !== undefined && failure.message === failure.cause);
|
|
1104
|
+
const normalizedError =
|
|
1105
|
+
shouldPreserveRawError
|
|
1106
|
+
? `DynamicWorkflow runner failed: ${errorName}: ${errorMessage}${
|
|
1107
|
+
errorStack ? `\n${errorStack}` : ''
|
|
1108
|
+
}`
|
|
1109
|
+
: `DynamicWorkflow runner failed: ${failure.message}`;
|
|
1077
1110
|
const headers = new Headers({
|
|
1078
1111
|
authorization: `Bearer ${executorToken}`,
|
|
1079
1112
|
'content-type': 'application/json',
|
|
@@ -1089,9 +1122,7 @@ async function markWorkflowRuntimeFailure(input: {
|
|
|
1089
1122
|
runId,
|
|
1090
1123
|
source: 'coordinator',
|
|
1091
1124
|
occurredAt: Date.now(),
|
|
1092
|
-
error:
|
|
1093
|
-
errorStack ? `\n${errorStack}` : ''
|
|
1094
|
-
}`,
|
|
1125
|
+
error: normalizedError,
|
|
1095
1126
|
} satisfies PlayRunLedgerEvent,
|
|
1096
1127
|
],
|
|
1097
1128
|
});
|
|
@@ -3062,7 +3093,8 @@ export class DynamicWorkflow extends WorkflowEntrypoint<
|
|
|
3062
3093
|
});
|
|
3063
3094
|
return result;
|
|
3064
3095
|
} catch (innerError) {
|
|
3065
|
-
const failure =
|
|
3096
|
+
const failure =
|
|
3097
|
+
normalizeCoordinatorWorkflowRuntimeFailure(innerError);
|
|
3066
3098
|
console.error(
|
|
3067
3099
|
'[coordinator] DynamicWorkflow runner.run threw',
|
|
3068
3100
|
{
|
|
@@ -43,7 +43,10 @@ import {
|
|
|
43
43
|
type ChunkExecutionResult,
|
|
44
44
|
} from '../../../shared_libs/play-runtime/batch-runtime';
|
|
45
45
|
import { getPlayRuntimeBatchStrategy } from '../../../shared_libs/play-runtime/play-runtime-batching-registry';
|
|
46
|
-
import {
|
|
46
|
+
import {
|
|
47
|
+
STANDARD_PLAY_RUNTIME_LIMIT_LABEL,
|
|
48
|
+
STANDARD_PLAY_RUNTIME_LIMIT_SECONDS,
|
|
49
|
+
} from '../../../shared_libs/temporal/constants';
|
|
47
50
|
import {
|
|
48
51
|
createPlayExecutionGovernor,
|
|
49
52
|
type GovernanceSnapshot,
|
|
@@ -6341,7 +6344,7 @@ async function executeRunRequest(
|
|
|
6341
6344
|
runtimeLimitExceeded = true;
|
|
6342
6345
|
if (!abortSignal.aborted) {
|
|
6343
6346
|
abortController.abort(
|
|
6344
|
-
`
|
|
6347
|
+
`Based on this plan, max runtime is ${STANDARD_PLAY_RUNTIME_LIMIT_LABEL}. Use smaller batches; ask for runtime.`,
|
|
6345
6348
|
);
|
|
6346
6349
|
}
|
|
6347
6350
|
}, STANDARD_PLAY_RUNTIME_LIMIT_SECONDS * 1000);
|
|
@@ -320,6 +320,7 @@ export type RunsNamespace = {
|
|
|
320
320
|
runId?: string;
|
|
321
321
|
limit?: number;
|
|
322
322
|
offset?: number;
|
|
323
|
+
rowMode?: 'output' | 'all';
|
|
323
324
|
}) => Promise<PlaySheetRowsResult>;
|
|
324
325
|
/** Stop a running/waiting run. */
|
|
325
326
|
stop: (
|
|
@@ -2434,6 +2435,7 @@ export class DeeplineClient {
|
|
|
2434
2435
|
runId?: string;
|
|
2435
2436
|
limit?: number;
|
|
2436
2437
|
offset?: number;
|
|
2438
|
+
rowMode?: 'output' | 'all';
|
|
2437
2439
|
}): Promise<PlaySheetRowsResult> {
|
|
2438
2440
|
const params = new URLSearchParams({
|
|
2439
2441
|
tableNamespace: input.tableNamespace,
|
|
@@ -2443,6 +2445,9 @@ export class DeeplineClient {
|
|
|
2443
2445
|
if (input.runId?.trim()) {
|
|
2444
2446
|
params.set('runId', input.runId.trim());
|
|
2445
2447
|
}
|
|
2448
|
+
if (input.rowMode === 'all') {
|
|
2449
|
+
params.set('rowMode', 'all');
|
|
2450
|
+
}
|
|
2446
2451
|
return await this.http.get<PlaySheetRowsResult>(
|
|
2447
2452
|
`/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
|
|
2448
2453
|
);
|
|
@@ -101,10 +101,10 @@ export const SDK_RELEASE = {
|
|
|
101
101
|
// 0.1.108 ships explicit dataset column/tool recompute policy and removes
|
|
102
102
|
// the SDK enrich generator's one-second stale policy.
|
|
103
103
|
// 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
|
|
104
|
-
version: '0.1.
|
|
104
|
+
version: '0.1.146',
|
|
105
105
|
apiContract: '2026-06-dataset-column-cell-stale-hard-cutover',
|
|
106
106
|
supportPolicy: {
|
|
107
|
-
latest: '0.1.
|
|
107
|
+
latest: '0.1.146',
|
|
108
108
|
minimumSupported: '0.1.53',
|
|
109
109
|
deprecatedBelow: '0.1.53',
|
|
110
110
|
commandMinimumSupported: [
|
|
@@ -18,13 +18,14 @@ export const LOCAL_TEMPORAL_ADDRESS = `127.0.0.1:${LOCAL_TEMPORAL_FRONTEND_PORT}
|
|
|
18
18
|
export const LOCAL_TEMPORAL_UI_URL = `http://127.0.0.1:${LOCAL_TEMPORAL_UI_PORT}`;
|
|
19
19
|
|
|
20
20
|
/** Maximum active user-code runtime for a standard play, in seconds. */
|
|
21
|
-
export const STANDARD_PLAY_RUNTIME_LIMIT_SECONDS =
|
|
21
|
+
export const STANDARD_PLAY_RUNTIME_LIMIT_SECONDS = 20 * 60; // 20 minutes
|
|
22
|
+
export const STANDARD_PLAY_RUNTIME_LIMIT_LABEL = '20 minutes';
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
|
-
* Activity timeout includes cleanup
|
|
25
|
+
* Activity timeout includes setup, cleanup, and billing headroom after the 20 minute
|
|
25
26
|
* user-code runtime cap. Keep this higher than STANDARD_PLAY_RUNTIME_LIMIT_SECONDS.
|
|
26
27
|
*/
|
|
27
|
-
export const PLAY_ACTIVITY_TIMEOUT_SECONDS =
|
|
28
|
+
export const PLAY_ACTIVITY_TIMEOUT_SECONDS = 30 * 60; // 30 minutes
|
|
28
29
|
|
|
29
30
|
/** Heartbeat cadence for the long-running play execution activity. */
|
|
30
31
|
export const PLAY_EXECUTE_ACTIVITY_HEARTBEAT_INTERVAL_SECONDS = 15;
|