deepline 0.3.253 → 0.3.254
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/scheduler-backends/postgres.ts +31 -22
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +1 -1
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
|
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
|
|
|
200
200
|
// getters keep their established compatibility behavior.
|
|
201
201
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
202
202
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
203
|
-
version: '0.3.
|
|
203
|
+
version: '0.3.254',
|
|
204
204
|
updateSummary:
|
|
205
205
|
'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
|
|
206
206
|
packageCapabilities: {
|
|
@@ -7037,7 +7037,7 @@ export async function resumePostgresSchedulerDetachedRunnerAttempt(
|
|
|
7037
7037
|
SELECT 1 FROM ${tableName('control', options)} AS control
|
|
7038
7038
|
WHERE control.key = 'runtime_cancel:' || $1
|
|
7039
7039
|
)
|
|
7040
|
-
FOR UPDATE
|
|
7040
|
+
FOR NO KEY UPDATE
|
|
7041
7041
|
), detached_attempt AS MATERIALIZED (
|
|
7042
7042
|
SELECT attempt.run_id, attempt.attempt, attempt.status, attempt.lease_token
|
|
7043
7043
|
FROM ${tableName('attempts', options)} AS attempt
|
|
@@ -7060,7 +7060,7 @@ export async function resumePostgresSchedulerDetachedRunnerAttempt(
|
|
|
7060
7060
|
WHERE target.run_id = detached_attempt.run_id
|
|
7061
7061
|
AND target.attempt = detached_attempt.attempt
|
|
7062
7062
|
AND target.lease_token = detached_attempt.lease_token
|
|
7063
|
-
AND
|
|
7063
|
+
AND detached_attempt.status = 'running'
|
|
7064
7064
|
RETURNING target.run_id
|
|
7065
7065
|
), restored_run AS (
|
|
7066
7066
|
UPDATE ${tableName('runs', options)} AS target
|
|
@@ -7073,8 +7073,12 @@ export async function resumePostgresSchedulerDetachedRunnerAttempt(
|
|
|
7073
7073
|
(target.suspension_json ->> 'ceilingMs')::double precision) / 1000
|
|
7074
7074
|
) ELSE target.wait_deadline END,
|
|
7075
7075
|
updated_at = now()
|
|
7076
|
-
|
|
7077
|
-
|
|
7076
|
+
-- The locked CTE may have followed a concurrent resume's new version.
|
|
7077
|
+
-- Qualify by that version, not the UPDATE scan's earlier snapshot.
|
|
7078
|
+
FROM detached_run
|
|
7079
|
+
WHERE target.run_id = detached_run.run_id
|
|
7080
|
+
AND target.run_id IN (SELECT run_id FROM detached_attempt)
|
|
7081
|
+
AND detached_run.status = 'running'
|
|
7078
7082
|
RETURNING target.run_id
|
|
7079
7083
|
), restored_outbox AS (
|
|
7080
7084
|
INSERT INTO ${tableName('outbox', options)} (
|
|
@@ -7290,7 +7294,15 @@ export async function markPostgresSchedulerAttemptRunning(
|
|
|
7290
7294
|
const outboxEventId = `run-resumed:${input.runId}:${randomUUID()}`;
|
|
7291
7295
|
const running = await client.query<{ run_id: string; event_id: string }>(
|
|
7292
7296
|
`
|
|
7293
|
-
WITH
|
|
7297
|
+
WITH waiting_run AS MATERIALIZED (
|
|
7298
|
+
SELECT target.run_id, target.suspension_json
|
|
7299
|
+
FROM ${tableName('runs', options)} AS target
|
|
7300
|
+
WHERE target.run_id = $1 AND target.status = 'waiting'
|
|
7301
|
+
-- Match detached restore's Run -> attempt order. NO KEY UPDATE also
|
|
7302
|
+
-- allows the outbox reference while its trigger owns the log mutex.
|
|
7303
|
+
FOR NO KEY UPDATE
|
|
7304
|
+
),
|
|
7305
|
+
running_attempt AS (
|
|
7294
7306
|
UPDATE ${tableName('attempts', options)} AS target
|
|
7295
7307
|
SET status = 'running',
|
|
7296
7308
|
heartbeat_at = CASE WHEN $5::boolean THEN heartbeat_at ELSE now() END,
|
|
@@ -7299,6 +7311,7 @@ export async function markPostgresSchedulerAttemptRunning(
|
|
|
7299
7311
|
AND target.attempt = $2
|
|
7300
7312
|
AND target.status = 'waiting'
|
|
7301
7313
|
AND target.lease_token = $3
|
|
7314
|
+
AND target.run_id IN (SELECT run_id FROM waiting_run)
|
|
7302
7315
|
AND NOT EXISTS (
|
|
7303
7316
|
SELECT 1
|
|
7304
7317
|
FROM ${tableName('attempts', options)} AS newer
|
|
@@ -7308,13 +7321,6 @@ export async function markPostgresSchedulerAttemptRunning(
|
|
|
7308
7321
|
)
|
|
7309
7322
|
RETURNING run_id
|
|
7310
7323
|
),
|
|
7311
|
-
waiting_run AS (
|
|
7312
|
-
SELECT target.run_id, target.suspension_json
|
|
7313
|
-
FROM ${tableName('runs', options)} AS target
|
|
7314
|
-
WHERE target.run_id IN (SELECT run_id FROM running_attempt)
|
|
7315
|
-
AND target.status = 'waiting'
|
|
7316
|
-
FOR UPDATE
|
|
7317
|
-
),
|
|
7318
7324
|
running_run AS (
|
|
7319
7325
|
UPDATE ${tableName('runs', options)} AS target
|
|
7320
7326
|
SET status = 'running',
|
|
@@ -7325,6 +7331,7 @@ export async function markPostgresSchedulerAttemptRunning(
|
|
|
7325
7331
|
updated_at = now()
|
|
7326
7332
|
FROM waiting_run
|
|
7327
7333
|
WHERE target.run_id = waiting_run.run_id
|
|
7334
|
+
AND target.run_id IN (SELECT run_id FROM running_attempt)
|
|
7328
7335
|
RETURNING target.run_id, waiting_run.suspension_json
|
|
7329
7336
|
),
|
|
7330
7337
|
resumed_outbox AS (
|
|
@@ -7392,7 +7399,7 @@ export async function claimPostgresSchedulerCompletedDetachedRunnerTerminal(
|
|
|
7392
7399
|
AND status = 'waiting'
|
|
7393
7400
|
AND suspension_json ->> 'kind' = 'detached_runner'
|
|
7394
7401
|
AND suspension_json -> 'runnerAttempt' = to_jsonb($2::integer)
|
|
7395
|
-
FOR UPDATE
|
|
7402
|
+
FOR NO KEY UPDATE
|
|
7396
7403
|
),
|
|
7397
7404
|
running_attempt AS (
|
|
7398
7405
|
UPDATE ${tableName('attempts', options)} AS target
|
|
@@ -7540,7 +7547,8 @@ export async function claimPostgresSchedulerOverdueDetachedRunnerCeilings(
|
|
|
7540
7547
|
END
|
|
7541
7548
|
) ASC, runs.run_id ASC
|
|
7542
7549
|
LIMIT $2
|
|
7543
|
-
FOR UPDATE OF runs
|
|
7550
|
+
FOR NO KEY UPDATE OF runs SKIP LOCKED
|
|
7551
|
+
FOR UPDATE OF attempts SKIP LOCKED
|
|
7544
7552
|
),
|
|
7545
7553
|
running_attempts AS (
|
|
7546
7554
|
UPDATE ${tableName('attempts', options)} AS target
|
|
@@ -8277,7 +8285,13 @@ export async function handoffPostgresSchedulerAttemptContinuation(
|
|
|
8277
8285
|
const outboxEventId = `run-resumed:${input.runId}:${randomUUID()}`;
|
|
8278
8286
|
const handedOff = await client.query<{ run_id: string; event_id: string }>(
|
|
8279
8287
|
`
|
|
8280
|
-
WITH
|
|
8288
|
+
WITH waiting_run AS MATERIALIZED (
|
|
8289
|
+
SELECT target.run_id, target.suspension_json
|
|
8290
|
+
FROM ${tableName('runs', options)} AS target
|
|
8291
|
+
WHERE target.run_id = $1 AND target.status = 'waiting'
|
|
8292
|
+
FOR NO KEY UPDATE
|
|
8293
|
+
),
|
|
8294
|
+
continuation_attempt AS (
|
|
8281
8295
|
UPDATE ${tableName('attempts', options)}
|
|
8282
8296
|
SET status = 'stale',
|
|
8283
8297
|
lease_expires_at = NULL,
|
|
@@ -8287,15 +8301,9 @@ export async function handoffPostgresSchedulerAttemptContinuation(
|
|
|
8287
8301
|
AND attempt = $2
|
|
8288
8302
|
AND status = 'waiting'
|
|
8289
8303
|
AND lease_token = $3
|
|
8304
|
+
AND run_id IN (SELECT run_id FROM waiting_run)
|
|
8290
8305
|
RETURNING run_id
|
|
8291
8306
|
),
|
|
8292
|
-
waiting_run AS (
|
|
8293
|
-
SELECT target.run_id, target.suspension_json
|
|
8294
|
-
FROM ${tableName('runs', options)} AS target
|
|
8295
|
-
WHERE target.run_id IN (SELECT run_id FROM continuation_attempt)
|
|
8296
|
-
AND target.status = 'waiting'
|
|
8297
|
-
FOR UPDATE
|
|
8298
|
-
),
|
|
8299
8307
|
continuation_run AS (
|
|
8300
8308
|
UPDATE ${tableName('runs', options)} AS target
|
|
8301
8309
|
SET status = 'queued',
|
|
@@ -8305,6 +8313,7 @@ export async function handoffPostgresSchedulerAttemptContinuation(
|
|
|
8305
8313
|
updated_at = now()
|
|
8306
8314
|
FROM waiting_run
|
|
8307
8315
|
WHERE target.run_id = waiting_run.run_id
|
|
8316
|
+
AND target.run_id IN (SELECT run_id FROM continuation_attempt)
|
|
8308
8317
|
RETURNING target.run_id, waiting_run.suspension_json
|
|
8309
8318
|
),
|
|
8310
8319
|
resumed_outbox AS (
|
package/dist/cli/index.js
CHANGED
|
@@ -3507,7 +3507,7 @@ var SDK_RELEASE = {
|
|
|
3507
3507
|
// getters keep their established compatibility behavior.
|
|
3508
3508
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
3509
3509
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
3510
|
-
version: "0.3.
|
|
3510
|
+
version: "0.3.254",
|
|
3511
3511
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
3512
3512
|
packageCapabilities: {
|
|
3513
3513
|
updatePreferences: 1
|
package/dist/cli/index.mjs
CHANGED
|
@@ -3502,7 +3502,7 @@ var SDK_RELEASE = {
|
|
|
3502
3502
|
// getters keep their established compatibility behavior.
|
|
3503
3503
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
3504
3504
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
3505
|
-
version: "0.3.
|
|
3505
|
+
version: "0.3.254",
|
|
3506
3506
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
3507
3507
|
packageCapabilities: {
|
|
3508
3508
|
updatePreferences: 1
|
package/dist/index.js
CHANGED
|
@@ -1320,7 +1320,7 @@ var SDK_RELEASE = {
|
|
|
1320
1320
|
// getters keep their established compatibility behavior.
|
|
1321
1321
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
1322
1322
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
1323
|
-
version: "0.3.
|
|
1323
|
+
version: "0.3.254",
|
|
1324
1324
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
1325
1325
|
packageCapabilities: {
|
|
1326
1326
|
updatePreferences: 1
|
package/dist/index.mjs
CHANGED
|
@@ -1224,7 +1224,7 @@ var SDK_RELEASE = {
|
|
|
1224
1224
|
// getters keep their established compatibility behavior.
|
|
1225
1225
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
1226
1226
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
1227
|
-
version: "0.3.
|
|
1227
|
+
version: "0.3.254",
|
|
1228
1228
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
1229
1229
|
packageCapabilities: {
|
|
1230
1230
|
updatePreferences: 1
|
package/dist/release.d.mts
CHANGED
|
@@ -149,7 +149,7 @@ type SdkRelease = {
|
|
|
149
149
|
supportPolicy: SdkSupportPolicy;
|
|
150
150
|
};
|
|
151
151
|
declare const SDK_RELEASE: {
|
|
152
|
-
readonly version: "0.3.
|
|
152
|
+
readonly version: "0.3.254";
|
|
153
153
|
readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
|
|
154
154
|
readonly packageCapabilities: {
|
|
155
155
|
readonly updatePreferences: 1;
|
package/dist/release.d.ts
CHANGED
|
@@ -149,7 +149,7 @@ type SdkRelease = {
|
|
|
149
149
|
supportPolicy: SdkSupportPolicy;
|
|
150
150
|
};
|
|
151
151
|
declare const SDK_RELEASE: {
|
|
152
|
-
readonly version: "0.3.
|
|
152
|
+
readonly version: "0.3.254";
|
|
153
153
|
readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
|
|
154
154
|
readonly packageCapabilities: {
|
|
155
155
|
readonly updatePreferences: 1;
|
package/dist/release.js
CHANGED
|
@@ -74,7 +74,7 @@ var SDK_RELEASE = {
|
|
|
74
74
|
// getters keep their established compatibility behavior.
|
|
75
75
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
76
76
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
77
|
-
version: "0.3.
|
|
77
|
+
version: "0.3.254",
|
|
78
78
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
79
79
|
packageCapabilities: {
|
|
80
80
|
updatePreferences: 1
|
package/dist/release.mjs
CHANGED
|
@@ -48,7 +48,7 @@ var SDK_RELEASE = {
|
|
|
48
48
|
// getters keep their established compatibility behavior.
|
|
49
49
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
50
50
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
51
|
-
version: "0.3.
|
|
51
|
+
version: "0.3.254",
|
|
52
52
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
53
53
|
packageCapabilities: {
|
|
54
54
|
updatePreferences: 1
|