deepline 0.1.141 → 0.1.142
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 +54 -15
- package/dist/bundling-sources/apps/play-runner-workers/src/durable-object-deploy-handoff.ts +24 -0
- package/dist/bundling-sources/sdk/src/release.ts +2 -2
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.mjs +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
|
@@ -65,6 +65,11 @@ import {
|
|
|
65
65
|
} from './workflow-retry-state';
|
|
66
66
|
import { createOrAttachWorkflowInstance } from './workflow-instance-create';
|
|
67
67
|
import { sanitizeLiveLogLines } from './runtime/live-progress';
|
|
68
|
+
import {
|
|
69
|
+
DURABLE_OBJECT_DEPLOY_HANDOFF_RETRY_DELAYS_MS,
|
|
70
|
+
durableObjectDeployHandoffMessage,
|
|
71
|
+
sleepForDurableObjectDeployHandoffRetry,
|
|
72
|
+
} from './durable-object-deploy-handoff';
|
|
68
73
|
|
|
69
74
|
export { DynamicWorkflowBinding };
|
|
70
75
|
|
|
@@ -784,24 +789,58 @@ async function callRunScopedControl<T>(
|
|
|
784
789
|
path: string,
|
|
785
790
|
init?: RequestInit,
|
|
786
791
|
): Promise<T> {
|
|
787
|
-
const
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
792
|
+
const maxAttempts = DURABLE_OBJECT_DEPLOY_HANDOFF_RETRY_DELAYS_MS.length + 1;
|
|
793
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
|
794
|
+
let response: Response;
|
|
795
|
+
try {
|
|
796
|
+
response = await runScopedDurableObject(env, runId).fetch(
|
|
797
|
+
`https://deepline.run-state.internal${path}`,
|
|
798
|
+
{
|
|
799
|
+
...(init ?? {}),
|
|
800
|
+
headers: {
|
|
801
|
+
'content-type': 'application/json',
|
|
802
|
+
...(init?.headers ?? {}),
|
|
803
|
+
},
|
|
804
|
+
},
|
|
805
|
+
);
|
|
806
|
+
} catch (error) {
|
|
807
|
+
const handoffMessage = durableObjectDeployHandoffMessage(error);
|
|
808
|
+
if (handoffMessage && attempt < maxAttempts) {
|
|
809
|
+
console.warn('[coordinator] run state DO deploy handoff retry', {
|
|
810
|
+
runId,
|
|
811
|
+
path,
|
|
812
|
+
attempt,
|
|
813
|
+
error: handoffMessage,
|
|
814
|
+
});
|
|
815
|
+
await sleepForDurableObjectDeployHandoffRetry(attempt - 1);
|
|
816
|
+
continue;
|
|
817
|
+
}
|
|
818
|
+
throw error;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
if (response.ok) {
|
|
822
|
+
return (await response.json()) as T;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
const responseText = (await response.text().catch(() => '')).slice(0, 400);
|
|
826
|
+
const handoffMessage = durableObjectDeployHandoffMessage(responseText);
|
|
827
|
+
if (handoffMessage && attempt < maxAttempts) {
|
|
828
|
+
console.warn('[coordinator] run state DO deploy handoff retry', {
|
|
829
|
+
runId,
|
|
830
|
+
path,
|
|
831
|
+
attempt,
|
|
832
|
+
status: response.status,
|
|
833
|
+
error: handoffMessage,
|
|
834
|
+
});
|
|
835
|
+
await sleepForDurableObjectDeployHandoffRetry(attempt - 1);
|
|
836
|
+
continue;
|
|
837
|
+
}
|
|
838
|
+
|
|
798
839
|
throw new Error(
|
|
799
|
-
`run state ${path} failed ${response.status}: ${
|
|
800
|
-
await response.text().catch(() => '')
|
|
801
|
-
).slice(0, 400)}`,
|
|
840
|
+
`run state ${path} failed ${response.status}: ${responseText}`,
|
|
802
841
|
);
|
|
803
842
|
}
|
|
804
|
-
|
|
843
|
+
throw new Error(`run state ${path} failed after deploy handoff retries`);
|
|
805
844
|
}
|
|
806
845
|
|
|
807
846
|
async function recordWorkflowInstanceId(input: {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const DURABLE_OBJECT_DEPLOY_HANDOFF_STORAGE_ERROR =
|
|
2
|
+
"The Durable Object's code has been updated, this version can no longer access storage";
|
|
3
|
+
|
|
4
|
+
export const DURABLE_OBJECT_DEPLOY_HANDOFF_RETRY_DELAYS_MS = [50, 150, 350];
|
|
5
|
+
|
|
6
|
+
export function durableObjectDeployHandoffMessage(
|
|
7
|
+
value: unknown,
|
|
8
|
+
): string | null {
|
|
9
|
+
const message = value instanceof Error ? value.message : String(value ?? '');
|
|
10
|
+
return message.includes(DURABLE_OBJECT_DEPLOY_HANDOFF_STORAGE_ERROR)
|
|
11
|
+
? message
|
|
12
|
+
: null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export async function sleepForDurableObjectDeployHandoffRetry(
|
|
16
|
+
attemptIndex: number,
|
|
17
|
+
): Promise<void> {
|
|
18
|
+
const delayMs =
|
|
19
|
+
DURABLE_OBJECT_DEPLOY_HANDOFF_RETRY_DELAYS_MS[attemptIndex] ??
|
|
20
|
+
DURABLE_OBJECT_DEPLOY_HANDOFF_RETRY_DELAYS_MS[
|
|
21
|
+
DURABLE_OBJECT_DEPLOY_HANDOFF_RETRY_DELAYS_MS.length - 1
|
|
22
|
+
];
|
|
23
|
+
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
24
|
+
}
|
|
@@ -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.142',
|
|
105
105
|
apiContract: '2026-06-dataset-column-cell-stale-hard-cutover',
|
|
106
106
|
supportPolicy: {
|
|
107
|
-
latest: '0.1.
|
|
107
|
+
latest: '0.1.142',
|
|
108
108
|
minimumSupported: '0.1.53',
|
|
109
109
|
deprecatedBelow: '0.1.53',
|
|
110
110
|
commandMinimumSupported: [
|
package/dist/cli/index.js
CHANGED
|
@@ -413,10 +413,10 @@ var SDK_RELEASE = {
|
|
|
413
413
|
// 0.1.108 ships explicit dataset column/tool recompute policy and removes
|
|
414
414
|
// the SDK enrich generator's one-second stale policy.
|
|
415
415
|
// 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
|
|
416
|
-
version: "0.1.
|
|
416
|
+
version: "0.1.142",
|
|
417
417
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
418
418
|
supportPolicy: {
|
|
419
|
-
latest: "0.1.
|
|
419
|
+
latest: "0.1.142",
|
|
420
420
|
minimumSupported: "0.1.53",
|
|
421
421
|
deprecatedBelow: "0.1.53",
|
|
422
422
|
commandMinimumSupported: [
|
package/dist/cli/index.mjs
CHANGED
|
@@ -390,10 +390,10 @@ var SDK_RELEASE = {
|
|
|
390
390
|
// 0.1.108 ships explicit dataset column/tool recompute policy and removes
|
|
391
391
|
// the SDK enrich generator's one-second stale policy.
|
|
392
392
|
// 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
|
|
393
|
-
version: "0.1.
|
|
393
|
+
version: "0.1.142",
|
|
394
394
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
395
395
|
supportPolicy: {
|
|
396
|
-
latest: "0.1.
|
|
396
|
+
latest: "0.1.142",
|
|
397
397
|
minimumSupported: "0.1.53",
|
|
398
398
|
deprecatedBelow: "0.1.53",
|
|
399
399
|
commandMinimumSupported: [
|
package/dist/index.js
CHANGED
|
@@ -284,10 +284,10 @@ var SDK_RELEASE = {
|
|
|
284
284
|
// 0.1.108 ships explicit dataset column/tool recompute policy and removes
|
|
285
285
|
// the SDK enrich generator's one-second stale policy.
|
|
286
286
|
// 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
|
|
287
|
-
version: "0.1.
|
|
287
|
+
version: "0.1.142",
|
|
288
288
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
289
289
|
supportPolicy: {
|
|
290
|
-
latest: "0.1.
|
|
290
|
+
latest: "0.1.142",
|
|
291
291
|
minimumSupported: "0.1.53",
|
|
292
292
|
deprecatedBelow: "0.1.53",
|
|
293
293
|
commandMinimumSupported: [
|
package/dist/index.mjs
CHANGED
|
@@ -206,10 +206,10 @@ var SDK_RELEASE = {
|
|
|
206
206
|
// 0.1.108 ships explicit dataset column/tool recompute policy and removes
|
|
207
207
|
// the SDK enrich generator's one-second stale policy.
|
|
208
208
|
// 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
|
|
209
|
-
version: "0.1.
|
|
209
|
+
version: "0.1.142",
|
|
210
210
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
211
211
|
supportPolicy: {
|
|
212
|
-
latest: "0.1.
|
|
212
|
+
latest: "0.1.142",
|
|
213
213
|
minimumSupported: "0.1.53",
|
|
214
214
|
deprecatedBelow: "0.1.53",
|
|
215
215
|
commandMinimumSupported: [
|