deepline 0.3.270 → 0.3.272
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/activity-observation.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +11 -9
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +5 -4
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-event-catalog.ts +610 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-event-transport.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-diagnostics.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +80 -67
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +5 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +59 -20
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +19 -9
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +205 -107
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +125 -81
- package/dist/cli/getting-started.d.mts +13 -9
- package/dist/cli/getting-started.d.ts +13 -9
- package/dist/cli/getting-started.js +15 -3
- package/dist/cli/getting-started.mjs +13 -3
- package/dist/cli/index.js +447 -11
- package/dist/cli/index.mjs +447 -11
- package/dist/index.js +420 -1
- package/dist/index.mjs +420 -1
- package/dist/install-integrity.json +1 -0
- 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
package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RUN_EVENT_KIND } from '../run-event-catalog';
|
|
1
2
|
/**
|
|
2
3
|
* Live step/progress ledger reporting for Node runtime workers.
|
|
3
4
|
*
|
|
@@ -426,11 +427,17 @@ export function createPostgresSchedulerProgressReporter(input: {
|
|
|
426
427
|
let totalRows = 0;
|
|
427
428
|
let activeMapNodeId: string | null = null;
|
|
428
429
|
let pendingDatasetLifecycleEvents: Array<
|
|
429
|
-
Extract<
|
|
430
|
+
Extract<
|
|
431
|
+
PlayExecutionEvent,
|
|
432
|
+
{ type: typeof RUN_EVENT_KIND.datasetLifecycle }
|
|
433
|
+
>
|
|
430
434
|
> = [];
|
|
431
435
|
const pendingActivityObservations = new Map<
|
|
432
436
|
string,
|
|
433
|
-
Extract<
|
|
437
|
+
Extract<
|
|
438
|
+
PlayExecutionEvent,
|
|
439
|
+
{ type: typeof RUN_EVENT_KIND.activityObserved }
|
|
440
|
+
>['observation']
|
|
434
441
|
>();
|
|
435
442
|
|
|
436
443
|
type ProgressFlushRequest = {
|
|
@@ -466,7 +473,10 @@ export function createPostgresSchedulerProgressReporter(input: {
|
|
|
466
473
|
const requeueProgressEvents = (input: {
|
|
467
474
|
datasetLifecycleEvents: typeof pendingDatasetLifecycleEvents;
|
|
468
475
|
activityObservations: Array<
|
|
469
|
-
Extract<
|
|
476
|
+
Extract<
|
|
477
|
+
PlayExecutionEvent,
|
|
478
|
+
{ type: typeof RUN_EVENT_KIND.activityObserved }
|
|
479
|
+
>['observation']
|
|
470
480
|
>;
|
|
471
481
|
}): void => {
|
|
472
482
|
pendingDatasetLifecycleEvents = [
|
|
@@ -954,7 +964,7 @@ export function createPostgresSchedulerProgressReporter(input: {
|
|
|
954
964
|
return;
|
|
955
965
|
}
|
|
956
966
|
}
|
|
957
|
-
if (event.type ===
|
|
967
|
+
if (event.type === RUN_EVENT_KIND.activityObserved) {
|
|
958
968
|
pendingActivityObservations.set(
|
|
959
969
|
event.observation.activityId,
|
|
960
970
|
event.observation,
|
|
@@ -962,7 +972,7 @@ export function createPostgresSchedulerProgressReporter(input: {
|
|
|
962
972
|
scheduleFlush(true);
|
|
963
973
|
return;
|
|
964
974
|
}
|
|
965
|
-
if (event.type ===
|
|
975
|
+
if (event.type === RUN_EVENT_KIND.datasetLifecycle) {
|
|
966
976
|
pendingDatasetLifecycleEvents.push(event);
|
|
967
977
|
scheduleFlush(true);
|
|
968
978
|
return;
|
|
@@ -1551,7 +1561,7 @@ export function buildFailedTerminalSettledProgressEvents(input: {
|
|
|
1551
1561
|
const failed = Math.max(0, Math.floor(outcome.failed) || 0);
|
|
1552
1562
|
if (completed <= 0 && failed <= 0) continue;
|
|
1553
1563
|
events.push({
|
|
1554
|
-
type:
|
|
1564
|
+
type: RUN_EVENT_KIND.stepProgress,
|
|
1555
1565
|
runId: input.launch.runId,
|
|
1556
1566
|
source: 'worker',
|
|
1557
1567
|
occurredAt: input.occurredAt,
|
|
@@ -1643,7 +1653,7 @@ export async function collectGatewayRunnerTerminalProgressLedgerEvents(input: {
|
|
|
1643
1653
|
});
|
|
1644
1654
|
if (finalUpdate.workCounters) {
|
|
1645
1655
|
progressEvents.push({
|
|
1646
|
-
type:
|
|
1656
|
+
type: RUN_EVENT_KIND.workCounters,
|
|
1647
1657
|
runId: input.launch.runId,
|
|
1648
1658
|
source: 'worker',
|
|
1649
1659
|
occurredAt: finalUpdate.lastCheckpointAt ?? Date.now(),
|
|
@@ -1653,7 +1663,7 @@ export async function collectGatewayRunnerTerminalProgressLedgerEvents(input: {
|
|
|
1653
1663
|
const datasetEvents: PlayRunLedgerEvent[] = (
|
|
1654
1664
|
finalUpdate.datasetLifecycleEvents ?? []
|
|
1655
1665
|
).map((event) => ({
|
|
1656
|
-
type:
|
|
1666
|
+
type: RUN_EVENT_KIND.datasetLifecycle,
|
|
1657
1667
|
runId: input.launch.runId,
|
|
1658
1668
|
source: 'worker',
|
|
1659
1669
|
occurredAt: event.at,
|
|
@@ -1674,7 +1684,7 @@ export async function collectGatewayRunnerTerminalProgressLedgerEvents(input: {
|
|
|
1674
1684
|
const activityEvents: PlayRunLedgerEvent[] = (
|
|
1675
1685
|
finalUpdate.activityObservations ?? []
|
|
1676
1686
|
).map((observation: PlayActivityObservation) => ({
|
|
1677
|
-
type:
|
|
1687
|
+
type: RUN_EVENT_KIND.activityObserved,
|
|
1678
1688
|
runId: input.launch.runId,
|
|
1679
1689
|
source: 'worker',
|
|
1680
1690
|
occurredAt: observation.observedAt,
|