deepline 0.3.451 → 0.3.452
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/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +5 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +49 -11
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +17 -2
- package/dist/cli/auth-36DQP46D.js +40 -0
- package/dist/cli/{auth-YLBWEMRW.mjs → auth-DKZLB6GN.mjs} +4 -4
- package/dist/cli/{billing-GWG5D3P6.js → billing-CN3XSVER.js} +73 -73
- package/dist/cli/{billing-DUFOEOPT.mjs → billing-DOFXWAZR.mjs} +4 -4
- package/dist/cli/{chunk-OKTCLFKM.mjs → chunk-2GMAPSJU.mjs} +5 -5
- package/dist/cli/{chunk-LPPAJJJN.mjs → chunk-2SICEJBN.mjs} +1 -1
- package/dist/cli/{chunk-6TFACCXN.js → chunk-2VERHTKO.js} +2 -2
- package/dist/cli/{chunk-HSKLAPMD.js → chunk-5DRGDSJL.js} +26 -26
- package/dist/cli/{chunk-F2DW7DFE.js → chunk-74BPYDDG.js} +8 -8
- package/dist/cli/{chunk-L2IUGWV5.js → chunk-7JSZOUNU.js} +1 -1
- package/dist/cli/{chunk-EJ6YI46S.js → chunk-7OI33KE5.js} +2 -2
- package/dist/cli/{chunk-JUCEEIEC.mjs → chunk-ELULDUX3.mjs} +1 -1
- package/dist/cli/{chunk-WDOWAOYB.js → chunk-ETFVH7PO.js} +4 -4
- package/dist/cli/{chunk-WLVGRU5A.mjs → chunk-FIQ2F5LA.mjs} +2 -2
- package/dist/cli/{chunk-Z3DBS4IB.js → chunk-G5BMPTZD.js} +81 -81
- package/dist/cli/{chunk-7VRWERTM.js → chunk-J5O4AXSO.js} +10 -10
- package/dist/cli/{chunk-4C7HPD57.mjs → chunk-JJOSUZMS.mjs} +1 -1
- package/dist/cli/{chunk-ZNDE2BTH.js → chunk-JT4ZSWBK.js} +16 -16
- package/dist/cli/{chunk-BJOVX7EB.mjs → chunk-KQUDU3ZE.mjs} +2 -2
- package/dist/cli/{chunk-O3KVUHCG.js → chunk-L2GATUZK.js} +20 -20
- package/dist/cli/{chunk-JRPNCMMN.js → chunk-L6YCGSL4.js} +35 -35
- package/dist/cli/{chunk-5DUMNKQG.js → chunk-M4FFNUF4.js} +50 -50
- package/dist/cli/{chunk-XLOXUW5Y.mjs → chunk-PBQSX6ES.mjs} +1 -1
- package/dist/cli/{chunk-YXXIFMXI.mjs → chunk-POSAVPQZ.mjs} +2 -2
- package/dist/cli/{chunk-E7V5CRA2.mjs → chunk-QK65KBWN.mjs} +8 -8
- package/dist/cli/{chunk-37CPEQBE.mjs → chunk-R7YZKHN5.mjs} +3 -3
- package/dist/cli/{chunk-ZPV7DMAA.mjs → chunk-RFDIXLRX.mjs} +1 -1
- package/dist/cli/{chunk-RFPP4Q66.mjs → chunk-RNM4HG3W.mjs} +3 -3
- package/dist/cli/{chunk-PJYTV24I.mjs → chunk-SM5RZ5JC.mjs} +1 -1
- package/dist/cli/{chunk-3HT47QPJ.mjs → chunk-TXN27XQQ.mjs} +2 -2
- package/dist/cli/{chunk-33EM4SMH.mjs → chunk-UGPGB4C6.mjs} +3 -3
- package/dist/cli/{chunk-TFCLUWDQ.js → chunk-WW63S4RC.js} +6 -6
- package/dist/cli/{chunk-BQQLTSGC.mjs → chunk-X4IMX5AO.mjs} +4 -4
- package/dist/cli/{chunk-C4NPWUZY.js → chunk-YWL4ULLT.js} +52 -52
- package/dist/cli/{chunk-CH2WDSBC.js → chunk-ZH6HFV7Y.js} +8 -8
- package/dist/cli/{chunk-6G6KX7I7.js → chunk-ZKGK2JU3.js} +6 -6
- package/dist/cli/{csv-4CHXZQXO.js → csv-N25FMDZQ.js} +12 -12
- package/dist/cli/{csv-RL7WQD6Y.mjs → csv-QUNUQZYC.mjs} +3 -3
- package/dist/cli/{db-MRI5IM2A.js → db-2SGG56WR.js} +25 -25
- package/dist/cli/{db-ZDBAWV7B.mjs → db-WYWDUYXS.mjs} +4 -4
- package/dist/cli/{describe-RRQUUJQ3.mjs → describe-4RBUIHR7.mjs} +12 -12
- package/dist/cli/{describe-2FYKXM5B.js → describe-QQ2XL6PV.js} +16 -16
- package/dist/cli/{executions-RJL76TJS.mjs → executions-WOBIMQ7H.mjs} +4 -4
- package/dist/cli/{executions-KDBD47A5.js → executions-YLJHAHHX.js} +6 -6
- package/dist/cli/{feedback-2CE24NHD.js → feedback-D653FAXY.js} +7 -7
- package/dist/cli/{feedback-KOYLXHYE.mjs → feedback-VCGVROTY.mjs} +3 -3
- package/dist/cli/{git-RDUHU6L6.mjs → git-SZ6RSLFN.mjs} +4 -4
- package/dist/cli/git-T6LBJEY6.js +24 -0
- package/dist/cli/index.js +131 -131
- package/dist/cli/index.mjs +36 -36
- package/dist/cli/{legacy-noops-7FOMGBMN.js → legacy-noops-TXZ75CWS.js} +7 -7
- package/dist/cli/{legacy-noops-4HS2LYP6.mjs → legacy-noops-UGLTI2ZY.mjs} +4 -4
- package/dist/cli/{monitors-JLBTNBVU.mjs → monitors-HLIW4AIL.mjs} +4 -4
- package/dist/cli/{monitors-IJXNK5BL.js → monitors-VC6YSBYX.js} +84 -84
- package/dist/cli/{org-JL7SW6VY.js → org-I3VQDIGZ.js} +66 -66
- package/dist/cli/{org-OWP6K4AA.mjs → org-X4MVTSKM.mjs} +4 -4
- package/dist/cli/{play-LLNZWHT6.js → play-7TLGGN66.js} +283 -283
- package/dist/cli/{play-FNOVKU74.mjs → play-EAYGEAMI.mjs} +10 -10
- package/dist/cli/{providers-E4XIEUC7.js → providers-IZ3YWZ4E.js} +7 -7
- package/dist/cli/{providers-WBOEOKE7.mjs → providers-MBTMUEGX.mjs} +4 -4
- package/dist/cli/{quickstart-3FUHKGEY.js → quickstart-MBDEV4RJ.js} +5 -5
- package/dist/cli/{quickstart-6G5G3BVA.mjs → quickstart-MDW2NMAS.mjs} +3 -3
- package/dist/cli/{search-CNMB4Z6M.mjs → search-4PQZYRQO.mjs} +5 -5
- package/dist/cli/search-5B4ZM7VS.js +30 -0
- package/dist/cli/{secrets-BDSWOYAT.js → secrets-3S7KUS2H.js} +13 -13
- package/dist/cli/{secrets-5FY5APVK.mjs → secrets-S55UCYYR.mjs} +4 -4
- package/dist/cli/{sessions-PMIKVPQN.mjs → sessions-T6XVN737.mjs} +4 -4
- package/dist/cli/{sessions-B7T2CHYK.js → sessions-UEHVIB6W.js} +5 -5
- package/dist/cli/{settings-4TAYLTPR.mjs → settings-CGP7XMJZ.mjs} +8 -8
- package/dist/cli/{settings-RXQJRRLR.js → settings-MYAUWNTF.js} +75 -75
- package/dist/cli/{setup-ZTMETGSO.js → setup-5Z5HAWEG.js} +42 -42
- package/dist/cli/{setup-LVUISLVO.mjs → setup-U66NZQXB.mjs} +7 -7
- package/dist/cli/{skills-NSJ43Z5Q.mjs → skills-2JS3SNFA.mjs} +5 -5
- package/dist/cli/skills-JXPQFJAJ.js +29 -0
- package/dist/cli/{tools-CFCKIGDY.mjs → tools-G3VYZKTO.mjs} +12 -12
- package/dist/cli/tools-RHRJ4SLY.js +44 -0
- package/dist/cli/update-5YBPJ3EQ.js +31 -0
- package/dist/cli/{update-HYOCBXJO.mjs → update-C7CLWWIW.mjs} +7 -7
- package/dist/cli/{workflow-RKX45RJ4.mjs → workflow-EUMRVXU7.mjs} +5 -5
- package/dist/cli/{workflow-U6S4SWTF.js → workflow-TBKVIN4S.js} +15 -15
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +78 -78
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-WPQBEOES.js +0 -40
- package/dist/cli/git-DZ5GROPH.js +0 -24
- package/dist/cli/search-4ECC773X.js +0 -30
- package/dist/cli/skills-MIENPTOD.js +0 -29
- package/dist/cli/tools-CXJO5XSH.js +0 -44
- package/dist/cli/update-B2LQGEXF.js +0 -31
|
@@ -205,7 +205,7 @@ export const SDK_RELEASE = {
|
|
|
205
205
|
// getters keep their established compatibility behavior.
|
|
206
206
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
207
207
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
208
|
-
version: '0.3.
|
|
208
|
+
version: '0.3.452',
|
|
209
209
|
updateSummary: {
|
|
210
210
|
introducedIn: '0.3.90',
|
|
211
211
|
summary:
|
|
@@ -303,7 +303,11 @@ function createPlayRuntimeRequire(): ReturnType<typeof createRequire> {
|
|
|
303
303
|
}
|
|
304
304
|
const WAIT_CONFIG_POLL_MS = 25;
|
|
305
305
|
const WAIT_CONFIG_TIMEOUT_MS = 120_000;
|
|
306
|
-
|
|
306
|
+
// Outlasts the claim lease, because an unanswered heartbeat says nothing about
|
|
307
|
+
// the park. A stall shorter than the lease keeps this sandbox, and a longer one
|
|
308
|
+
// reaches the heartbeat loop's own guard and is reported as an outage.
|
|
309
|
+
export const RUNNER_EXECUTION_ACK_TIMEOUT_MS =
|
|
310
|
+
(RUNTIME_RELIABILITY_POLICY.worker.claimLeaseSeconds + 30) * 1_000;
|
|
307
311
|
const RUNNER_RUNTIME_CONTROL_MAX_ATTEMPTS =
|
|
308
312
|
RUNTIME_RELIABILITY_POLICY.gateway.runnerControlMaxAttempts;
|
|
309
313
|
const RUNNER_RUNTIME_CONTROL_RETRY_DELAYS_MS = [100, 250] as const;
|
package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts
CHANGED
|
@@ -37,6 +37,12 @@ const DAYTONA_CREATE_RETRY_DELAYS_MS = [0, 500, 1_500] as const;
|
|
|
37
37
|
const DAYTONA_TIMED_OUT_CREATE_RECONCILE_DELAYS_MS = [
|
|
38
38
|
0, 1_000, 3_000, 6_000, 12_000, 24_000, 36_000,
|
|
39
39
|
] as const;
|
|
40
|
+
// A reservation can outlive a create that was refused, or one never sent because
|
|
41
|
+
// the scheduler stalled between committing the reservation and acknowledging it.
|
|
42
|
+
// This delay lets a healthy owner finish its create and reconcile ladder first.
|
|
43
|
+
// It is not a fence: a stalled owner can outlast it, so name uniqueness and the
|
|
44
|
+
// attempt fences on abandon and promotion keep custody safe.
|
|
45
|
+
const DAYTONA_ABSENT_OPERATION_RECREATE_AFTER_MS = 3 * 60_000;
|
|
40
46
|
// Explicit runner deadline + scheduler GC own the normal lifecycle. Daytona's
|
|
41
47
|
// inactivity stop is a wider crash backstop measured from sandbox creation, so
|
|
42
48
|
// setup time cannot consume the terminal-flush grace.
|
|
@@ -671,6 +677,7 @@ async function createRetriedOneShotDaytonaSandbox(input: {
|
|
|
671
677
|
leaseId: string;
|
|
672
678
|
providerOperationToken: string | null;
|
|
673
679
|
resumeExistingProviderOperation?: boolean;
|
|
680
|
+
existingProviderOperationAgeMs?: number;
|
|
674
681
|
}>;
|
|
675
682
|
releaseSandboxCapacity?: (leaseId: string) => Promise<void>;
|
|
676
683
|
nextProviderAttempt: () => number;
|
|
@@ -700,6 +707,7 @@ async function createRetriedOneShotDaytonaSandbox(input: {
|
|
|
700
707
|
});
|
|
701
708
|
const reservation = await input.reserveSandboxCapacity?.(attempt);
|
|
702
709
|
const sandboxName = daytonaSandboxName(reservation?.providerOperationToken);
|
|
710
|
+
let recreatedAfter: TimedOutDaytonaSandboxReconcileObserved | null = null;
|
|
703
711
|
if (reservation?.resumeExistingProviderOperation) {
|
|
704
712
|
if (!reservation.providerOperationToken) {
|
|
705
713
|
throw new DaytonaSandboxTransitionPendingError(sandboxName);
|
|
@@ -740,17 +748,32 @@ async function createRetriedOneShotDaytonaSandbox(input: {
|
|
|
740
748
|
);
|
|
741
749
|
}
|
|
742
750
|
// Neither absence nor an ongoing transition proves that create cannot
|
|
743
|
-
// commit
|
|
744
|
-
// detail only records which of the two
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
751
|
+
// commit, so inside the create window retain the durable identity and
|
|
752
|
+
// its capacity reservation. The detail only records which of the two
|
|
753
|
+
// Daytona reported, for the log.
|
|
754
|
+
const operationAgeMs = reservation.existingProviderOperationAgeMs ?? 0;
|
|
755
|
+
if (
|
|
756
|
+
reconciliation.observed.last.lookup !== 'not_found' ||
|
|
757
|
+
operationAgeMs < DAYTONA_ABSENT_OPERATION_RECREATE_AFTER_MS
|
|
758
|
+
) {
|
|
759
|
+
throw new DaytonaSandboxTransitionPendingError(
|
|
760
|
+
sandboxName,
|
|
761
|
+
daytonaTransitionPendingLogDetail({
|
|
762
|
+
phase: 'resume',
|
|
763
|
+
observed: reconciliation.observed,
|
|
764
|
+
providerAttempt: attempt,
|
|
765
|
+
launchOutcome: null,
|
|
766
|
+
}),
|
|
767
|
+
);
|
|
768
|
+
}
|
|
769
|
+
// Daytona's own name uniqueness fences this: the same identity under the
|
|
770
|
+
// same reservation cannot become a second sandbox. A create that lands
|
|
771
|
+
// first surfaces as a conflict, which the reconcile below adopts by name.
|
|
772
|
+
input.emitStage('create:recreate_absent_operation', {
|
|
773
|
+
attempt,
|
|
774
|
+
operationAgeMs,
|
|
775
|
+
});
|
|
776
|
+
recreatedAfter = reconciliation.observed;
|
|
754
777
|
}
|
|
755
778
|
let sandbox: DaytonaSandbox;
|
|
756
779
|
try {
|
|
@@ -895,6 +918,20 @@ async function createRetriedOneShotDaytonaSandbox(input: {
|
|
|
895
918
|
{ cause: error },
|
|
896
919
|
);
|
|
897
920
|
}
|
|
921
|
+
if (recreatedAfter) {
|
|
922
|
+
// Refusing this send says nothing about an earlier send of the identity,
|
|
923
|
+
// so keep its reservation and resume the same name.
|
|
924
|
+
await recordCreateFailure();
|
|
925
|
+
throw new DaytonaSandboxTransitionPendingError(
|
|
926
|
+
sandboxName,
|
|
927
|
+
daytonaTransitionPendingLogDetail({
|
|
928
|
+
phase: 'resume',
|
|
929
|
+
observed: recreatedAfter,
|
|
930
|
+
providerAttempt: attempt,
|
|
931
|
+
launchOutcome: null,
|
|
932
|
+
}),
|
|
933
|
+
);
|
|
934
|
+
}
|
|
898
935
|
if (reservation) {
|
|
899
936
|
await input.releaseSandboxCapacity?.(reservation.leaseId);
|
|
900
937
|
}
|
|
@@ -1098,6 +1135,7 @@ export function createOneShotDaytonaSandboxLifecycle(input: {
|
|
|
1098
1135
|
leaseId: string;
|
|
1099
1136
|
providerOperationToken: string | null;
|
|
1100
1137
|
resumeExistingProviderOperation?: boolean;
|
|
1138
|
+
existingProviderOperationAgeMs?: number;
|
|
1101
1139
|
}>;
|
|
1102
1140
|
releaseSandboxCapacity?: (leaseId: string) => Promise<void>;
|
|
1103
1141
|
startAdmission?: DaytonaSandboxStartAdmission;
|
|
@@ -245,6 +245,8 @@ export type SandboxExecutionAdmission = {
|
|
|
245
245
|
providerOperationToken?: string | null;
|
|
246
246
|
/** Resume the existing durable provider operation before any new create. */
|
|
247
247
|
resumeExistingProviderOperation?: boolean;
|
|
248
|
+
/** Scheduler-clock age of the operation being resumed. */
|
|
249
|
+
existingProviderOperationAgeMs?: number;
|
|
248
250
|
}
|
|
249
251
|
| { kind: 'pre_code_deferred'; reason: SandboxPreCodeDeferralReason }
|
|
250
252
|
>;
|
|
@@ -310,6 +312,8 @@ export type SandboxExecutionLifecycle = {
|
|
|
310
312
|
providerOperationToken?: string | null;
|
|
311
313
|
/** Resume the existing durable provider operation before any new create. */
|
|
312
314
|
resumeExistingProviderOperation?: boolean;
|
|
315
|
+
/** Scheduler-clock age of the operation being resumed. */
|
|
316
|
+
existingProviderOperationAgeMs?: number;
|
|
313
317
|
}
|
|
314
318
|
| { kind: 'pre_code_deferred'; reason: SandboxPreCodeDeferralReason }
|
|
315
319
|
>;
|
package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts
CHANGED
|
@@ -188,6 +188,12 @@ function createRunnerCallbacks(input: {
|
|
|
188
188
|
...(outcome.resumeExistingProviderOperation === true
|
|
189
189
|
? { resumeExistingProviderOperation: true }
|
|
190
190
|
: {}),
|
|
191
|
+
...(outcome.existingProviderOperationAgeMs === undefined
|
|
192
|
+
? {}
|
|
193
|
+
: {
|
|
194
|
+
existingProviderOperationAgeMs:
|
|
195
|
+
outcome.existingProviderOperationAgeMs,
|
|
196
|
+
}),
|
|
191
197
|
};
|
|
192
198
|
},
|
|
193
199
|
releaseSandboxCapacity: async (leaseId) => {
|
package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts
CHANGED
|
@@ -4338,13 +4338,15 @@ async function executeAssignedAbsurdAttempt(input: {
|
|
|
4338
4338
|
providerOperationToken: reserved.providerOperationToken,
|
|
4339
4339
|
resumeExistingProviderOperation:
|
|
4340
4340
|
reserved.resumeExistingProviderOperation,
|
|
4341
|
+
existingProviderOperationAgeMs:
|
|
4342
|
+
reserved.existingProviderOperationAgeMs,
|
|
4341
4343
|
};
|
|
4342
4344
|
},
|
|
4343
4345
|
async releaseCapacity({ leaseId }) {
|
|
4344
4346
|
await deps.runWithClient((client) =>
|
|
4345
4347
|
abandonRuntimeSandboxOperationReservation(
|
|
4346
4348
|
client,
|
|
4347
|
-
{ operationKey: leaseId },
|
|
4349
|
+
{ operationKey: leaseId, attempt: generation },
|
|
4348
4350
|
options,
|
|
4349
4351
|
),
|
|
4350
4352
|
);
|
|
@@ -286,6 +286,11 @@ export async function reserveRuntimeSandboxCapacityLease(
|
|
|
286
286
|
activeLeases: number;
|
|
287
287
|
wouldDefer: boolean;
|
|
288
288
|
resumeExistingProviderOperation: boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Database-clock age of a resumed operation. Absent on a same-key race and
|
|
291
|
+
* once the lease expires, when a new sandbox could no longer be promoted.
|
|
292
|
+
*/
|
|
293
|
+
existingProviderOperationAgeMs?: number;
|
|
289
294
|
}
|
|
290
295
|
| { granted: false; limit: number; activeLeases: number }
|
|
291
296
|
> {
|
|
@@ -316,6 +321,7 @@ export async function reserveRuntimeSandboxCapacityLease(
|
|
|
316
321
|
provider_operation_token: string | null;
|
|
317
322
|
attempt: number;
|
|
318
323
|
environment: 'preview' | 'production';
|
|
324
|
+
age_ms: number | null;
|
|
319
325
|
}>;
|
|
320
326
|
existing_operation: {
|
|
321
327
|
org_id: string;
|
|
@@ -361,7 +367,10 @@ export async function reserveRuntimeSandboxCapacityLease(
|
|
|
361
367
|
SELECT jsonb_agg(pending)
|
|
362
368
|
FROM (
|
|
363
369
|
SELECT lease.lease_id, operation.provider_operation_token,
|
|
364
|
-
operation.attempt, operation.environment
|
|
370
|
+
operation.attempt, operation.environment,
|
|
371
|
+
CASE WHEN lease.expires_at > clock_timestamp() THEN
|
|
372
|
+
extract(epoch FROM clock_timestamp() - operation.created_at) * 1000
|
|
373
|
+
END AS age_ms
|
|
365
374
|
FROM ${operations} AS operation
|
|
366
375
|
JOIN ${leases} AS lease ON lease.lease_id = operation.operation_key
|
|
367
376
|
WHERE $6::boolean
|
|
@@ -503,6 +512,9 @@ export async function reserveRuntimeSandboxCapacityLease(
|
|
|
503
512
|
activeLeases,
|
|
504
513
|
wouldDefer,
|
|
505
514
|
resumeExistingProviderOperation: true,
|
|
515
|
+
...(pendingOperation.age_ms === null
|
|
516
|
+
? {}
|
|
517
|
+
: { existingProviderOperationAgeMs: Number(pendingOperation.age_ms) }),
|
|
506
518
|
};
|
|
507
519
|
}
|
|
508
520
|
}
|
|
@@ -874,7 +886,8 @@ export async function releaseRuntimeSandboxCapacityLease(
|
|
|
874
886
|
*/
|
|
875
887
|
export async function abandonRuntimeSandboxOperationReservation(
|
|
876
888
|
client: PostgresSchedulerQueryClient,
|
|
877
|
-
|
|
889
|
+
/** With `attempt`, an operation a newer attempt has adopted is left alone. */
|
|
890
|
+
input: { operationKey: string; attempt?: number },
|
|
878
891
|
options?: Pick<PostgresSchedulerOptions, 'schema'>,
|
|
879
892
|
): Promise<boolean> {
|
|
880
893
|
const { leases, operations, runs } = schemaTables(options);
|
|
@@ -899,6 +912,7 @@ export async function abandonRuntimeSandboxOperationReservation(
|
|
|
899
912
|
updated_at = clock_timestamp()
|
|
900
913
|
WHERE operation.operation_key = $1
|
|
901
914
|
AND operation.state = $3
|
|
915
|
+
AND ($4::integer IS NULL OR operation.attempt <= $4)
|
|
902
916
|
AND EXISTS (SELECT 1 FROM eligible_lease)
|
|
903
917
|
RETURNING operation.operation_key
|
|
904
918
|
), released AS (
|
|
@@ -915,6 +929,7 @@ export async function abandonRuntimeSandboxOperationReservation(
|
|
|
915
929
|
assertId(input.operationKey, 'operationKey'),
|
|
916
930
|
RuntimeSandboxOperationState.Abandoned,
|
|
917
931
|
RuntimeSandboxOperationState.Reserved,
|
|
932
|
+
input.attempt ?? null,
|
|
918
933
|
],
|
|
919
934
|
);
|
|
920
935
|
return result.rows.length === 1;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunkM4FFNUF4js = require('./chunk-M4FFNUF4.js');
|
|
17
|
+
require('./chunk-ZKGK2JU3.js');
|
|
18
|
+
require('./chunk-ETFVH7PO.js');
|
|
19
|
+
require('./chunk-ALJJRZNJ.js');
|
|
20
|
+
require('./chunk-XNYIZMNQ.js');
|
|
21
|
+
require('./chunk-DIAWYWT5.js');
|
|
22
|
+
require('./chunk-7JSZOUNU.js');
|
|
23
|
+
require('./chunk-OG64RBAC.js');
|
|
24
|
+
require('./chunk-COGTRVWW.js');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkM4FFNUF4js.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkM4FFNUF4js.authStatusLine; exports.clearPendingClaim = _chunkM4FFNUF4js.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkM4FFNUF4js.clearSatisfiedPendingClaim; exports.handleRegister = _chunkM4FFNUF4js.handleRegister; exports.handleStatus = _chunkM4FFNUF4js.handleStatus; exports.handleWait = _chunkM4FFNUF4js.handleWait; exports.httpJson = _chunkM4FFNUF4js.httpJson; exports.readPendingAuthClaim = _chunkM4FFNUF4js.readPendingAuthClaim; exports.readStatusBanner = _chunkM4FFNUF4js.readStatusBanner; exports.registerAuthCommands = _chunkM4FFNUF4js.registerAuthCommands; exports.reportSetupCompleted = _chunkM4FFNUF4js.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkM4FFNUF4js.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkM4FFNUF4js.statusBannerLine;
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
reportSetupCompleted,
|
|
14
14
|
resolvePendingAuthClaimForResume,
|
|
15
15
|
statusBannerLine
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-KQUDU3ZE.mjs";
|
|
17
|
+
import "./chunk-PBQSX6ES.mjs";
|
|
18
|
+
import "./chunk-SM5RZ5JC.mjs";
|
|
19
19
|
import "./chunk-4QF2K7TM.mjs";
|
|
20
20
|
import "./chunk-DLIRSHV6.mjs";
|
|
21
21
|
import "./chunk-HBL4PM5Q.mjs";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-RFDIXLRX.mjs";
|
|
23
23
|
import "./chunk-WZYKRD7T.mjs";
|
|
24
24
|
import "./chunk-KRD6H754.mjs";
|
|
25
25
|
export {
|