@xeonr/pipelines-sdk 0.2.0 → 0.4.0
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/README.md +231 -22
- package/dist/auth.d.ts +1 -1
- package/dist/client.d.ts +73 -10
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +47 -4
- package/dist/client.js.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.d.ts +179 -16
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.js +45 -28
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.d.ts +136 -17
- package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.js +42 -35
- package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.d.ts +224 -8
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.js +43 -9
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/common_pb.d.ts +64 -8
- package/dist/gen/xeonr/pipelines/v1/common_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/common_pb.js +62 -5
- package/dist/gen/xeonr/pipelines/v1/common_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/definition_pb.d.ts +312 -9
- package/dist/gen/xeonr/pipelines/v1/definition_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/definition_pb.js +100 -7
- package/dist/gen/xeonr/pipelines/v1/definition_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.d.ts +1072 -0
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.js +299 -0
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/pools_pb.d.ts +103 -8
- package/dist/gen/xeonr/pipelines/v1/pools_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/pools_pb.js +32 -24
- package/dist/gen/xeonr/pipelines/v1/pools_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/queues_pb.d.ts +711 -0
- package/dist/gen/xeonr/pipelines/v1/queues_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/queues_pb.js +185 -0
- package/dist/gen/xeonr/pipelines/v1/queues_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/registry_pb.d.ts +92 -23
- package/dist/gen/xeonr/pipelines/v1/registry_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/registry_pb.js +36 -33
- package/dist/gen/xeonr/pipelines/v1/registry_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/runs_pb.d.ts +1191 -33
- package/dist/gen/xeonr/pipelines/v1/runs_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/runs_pb.js +419 -35
- package/dist/gen/xeonr/pipelines/v1/runs_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/schedule_targets_pb.d.ts +194 -0
- package/dist/gen/xeonr/pipelines/v1/schedule_targets_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/schedule_targets_pb.js +100 -0
- package/dist/gen/xeonr/pipelines/v1/schedule_targets_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.d.ts +1186 -0
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.js +335 -0
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.d.ts +32 -5
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.js +12 -3
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/sinks_pb.d.ts +270 -27
- package/dist/gen/xeonr/pipelines/v1/sinks_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/sinks_pb.js +163 -24
- package/dist/gen/xeonr/pipelines/v1/sinks_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/tenant_policies_pb.d.ts +391 -0
- package/dist/gen/xeonr/pipelines/v1/tenant_policies_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/tenant_policies_pb.js +100 -0
- package/dist/gen/xeonr/pipelines/v1/tenant_policies_pb.js.map +1 -0
- package/dist/gen/xeonr/platform/v1/options_pb.d.ts +137 -1
- package/dist/gen/xeonr/platform/v1/options_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/platform/v1/options_pb.js +104 -1
- package/dist/gen/xeonr/platform/v1/options_pb.js.map +1 -1
- package/dist/handler.d.ts +51 -1
- package/dist/handler.d.ts.map +1 -1
- package/dist/handler.js +27 -0
- package/dist/handler.js.map +1 -1
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/queues.d.ts +158 -0
- package/dist/queues.d.ts.map +1 -0
- package/dist/queues.js +117 -0
- package/dist/queues.js.map +1 -0
- package/dist/reporter.d.ts +120 -0
- package/dist/reporter.d.ts.map +1 -0
- package/dist/reporter.js +323 -0
- package/dist/reporter.js.map +1 -0
- package/dist/schedules.d.ts +193 -0
- package/dist/schedules.d.ts.map +1 -0
- package/dist/schedules.js +126 -0
- package/dist/schedules.js.map +1 -0
- package/dist/testing/cron.d.ts +33 -0
- package/dist/testing/cron.d.ts.map +1 -0
- package/dist/testing/cron.js +177 -0
- package/dist/testing/cron.js.map +1 -0
- package/dist/testing/index.d.ts +229 -7
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1304 -103
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/pipelines.d.ts +99 -0
- package/dist/testing/pipelines.d.ts.map +1 -0
- package/dist/testing/pipelines.js +445 -0
- package/dist/testing/pipelines.js.map +1 -0
- package/dist/testing/queues.d.ts +49 -0
- package/dist/testing/queues.d.ts.map +1 -0
- package/dist/testing/queues.js +72 -0
- package/dist/testing/queues.js.map +1 -0
- package/dist/testing/schedules.d.ts +125 -0
- package/dist/testing/schedules.d.ts.map +1 -0
- package/dist/testing/schedules.js +422 -0
- package/dist/testing/schedules.js.map +1 -0
- package/dist/worker.d.ts +48 -7
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js +59 -9
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { JsonObject, JsonValue } from "@bufbuild/protobuf";
|
|
2
|
+
import type { HandlerContext as ConnectContext, ServiceImpl } from "@connectrpc/connect";
|
|
3
|
+
import { RunState } from "../gen/xeonr/pipelines/v1/common_pb.js";
|
|
4
|
+
import type { Run } from "../gen/xeonr/pipelines/v1/runs_pb.js";
|
|
5
|
+
import { RunTrigger } from "../gen/xeonr/pipelines/v1/runs_pb.js";
|
|
6
|
+
import { OccurrenceOutcome } from "../gen/xeonr/pipelines/v1/schedules_pb.js";
|
|
7
|
+
import type { Schedule, ScheduleJobTarget, SchedulePipelineTarget, SchedulesService } from "../gen/xeonr/pipelines/v1/schedules_pb.js";
|
|
8
|
+
/**
|
|
9
|
+
* The schedules' clock. Real time until a test sets it; from then on only
|
|
10
|
+
* {@link set} and {@link advance} move it, and each move fires whatever
|
|
11
|
+
* became due.
|
|
12
|
+
*/
|
|
13
|
+
export declare class FakeClock {
|
|
14
|
+
private manual;
|
|
15
|
+
private readonly listeners;
|
|
16
|
+
/** Now, in epoch ms. */
|
|
17
|
+
now(): number;
|
|
18
|
+
/** Sets the time (a Date or epoch ms) and fires what is due. */
|
|
19
|
+
set(at: Date | number): void;
|
|
20
|
+
/** Moves the clock forward by `ms` and fires what is due. */
|
|
21
|
+
advance(ms: number): void;
|
|
22
|
+
/** @internal */
|
|
23
|
+
onMove(l: () => void): void;
|
|
24
|
+
}
|
|
25
|
+
/** One target of one occurrence, as the fake recorded it. */
|
|
26
|
+
export interface FakeOccurrence {
|
|
27
|
+
scheduledFor: number | undefined;
|
|
28
|
+
targetKey: string;
|
|
29
|
+
tenant: string;
|
|
30
|
+
outcome: OccurrenceOutcome;
|
|
31
|
+
runId: string;
|
|
32
|
+
message: string;
|
|
33
|
+
firedAt: number;
|
|
34
|
+
}
|
|
35
|
+
/** A target as the job is made for it. */
|
|
36
|
+
interface Target {
|
|
37
|
+
key: string;
|
|
38
|
+
resource: {
|
|
39
|
+
kind: string;
|
|
40
|
+
id: string;
|
|
41
|
+
json?: JsonObject;
|
|
42
|
+
} | undefined;
|
|
43
|
+
args: JsonObject;
|
|
44
|
+
}
|
|
45
|
+
/** A run the fake schedules can see. */
|
|
46
|
+
export interface ScheduledRun {
|
|
47
|
+
id: string;
|
|
48
|
+
tenant: string;
|
|
49
|
+
state: RunState;
|
|
50
|
+
scheduleId: string;
|
|
51
|
+
scheduleTarget: string;
|
|
52
|
+
nodes: Map<string, {
|
|
53
|
+
kv: Record<string, JsonValue>;
|
|
54
|
+
}>;
|
|
55
|
+
}
|
|
56
|
+
/** What the schedules need of the fake. */
|
|
57
|
+
export interface ScheduleHost {
|
|
58
|
+
/** Makes a job run as `owner` would through CreateJob; throws its ConnectError. */
|
|
59
|
+
createJob(owner: {
|
|
60
|
+
tenant: string;
|
|
61
|
+
}, spec: {
|
|
62
|
+
handler: string;
|
|
63
|
+
payload: JsonObject;
|
|
64
|
+
queue: string;
|
|
65
|
+
retry: ScheduleJobTarget["retry"];
|
|
66
|
+
timeoutMs: number;
|
|
67
|
+
interruptible: boolean;
|
|
68
|
+
resource: Target["resource"];
|
|
69
|
+
trigger: RunTrigger;
|
|
70
|
+
schedule: {
|
|
71
|
+
id: string;
|
|
72
|
+
scheduledFor: number | undefined;
|
|
73
|
+
target: string;
|
|
74
|
+
};
|
|
75
|
+
}): ScheduledRun;
|
|
76
|
+
/** Starts a version of a stored pipeline as `owner` would through CreateRun; throws its ConnectError. */
|
|
77
|
+
startPipeline(owner: {
|
|
78
|
+
tenant: string;
|
|
79
|
+
}, spec: {
|
|
80
|
+
target: SchedulePipelineTarget;
|
|
81
|
+
resource: Target["resource"];
|
|
82
|
+
variables: JsonObject;
|
|
83
|
+
trigger: RunTrigger;
|
|
84
|
+
schedule: {
|
|
85
|
+
id: string;
|
|
86
|
+
scheduledFor: number | undefined;
|
|
87
|
+
target: string;
|
|
88
|
+
};
|
|
89
|
+
}): ScheduledRun;
|
|
90
|
+
/** Throws `not_found` unless `pipelineId` is a pipeline of the tenant. */
|
|
91
|
+
checkPipeline(tenant: string, pipelineId: string): void;
|
|
92
|
+
runs(): Iterable<ScheduledRun>;
|
|
93
|
+
runMessage(id: string): Run;
|
|
94
|
+
/** Throws invalid_argument unless `handler` is a worker package the tenant may use. */
|
|
95
|
+
checkHandler(handler: string): void;
|
|
96
|
+
}
|
|
97
|
+
type Enter = (method: "SetSchedule" | "CreateScheduleRun", ctx: ConnectContext, scope: string) => {
|
|
98
|
+
tenant: string;
|
|
99
|
+
};
|
|
100
|
+
/** The fake's schedules. */
|
|
101
|
+
export declare class FakeSchedules {
|
|
102
|
+
private readonly host;
|
|
103
|
+
readonly clock: FakeClock;
|
|
104
|
+
private readonly byId;
|
|
105
|
+
/** Enumeration jobs waiting for their targets: run id → the occurrence. */
|
|
106
|
+
private readonly enumerating;
|
|
107
|
+
constructor(host: ScheduleHost, clock: FakeClock);
|
|
108
|
+
/** Every stored schedule. */
|
|
109
|
+
list(): Schedule[];
|
|
110
|
+
/** A schedule's recorded occurrences, newest first. */
|
|
111
|
+
occurrences(scheduleId: string): FakeOccurrence[];
|
|
112
|
+
/** Fires every occurrence that is due at the clock's time. */
|
|
113
|
+
evaluate(): void;
|
|
114
|
+
/** A run became terminal: an enumeration job hands over its targets. */
|
|
115
|
+
runFinished(run: ScheduledRun): void;
|
|
116
|
+
/** Fires one occurrence (or a run-now) of a schedule. Returns the runs started now. */
|
|
117
|
+
private fire;
|
|
118
|
+
private startTargets;
|
|
119
|
+
/** The schedule as it is read: effective values and the next occurrence computed now. */
|
|
120
|
+
private message;
|
|
121
|
+
/** SchedulesService. `enter` authenticates as the fake does. */
|
|
122
|
+
service(enter: Enter): Partial<ServiceImpl<typeof SchedulesService>>;
|
|
123
|
+
}
|
|
124
|
+
export {};
|
|
125
|
+
//# sourceMappingURL=schedules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedules.d.ts","sourceRoot":"","sources":["../../src/testing/schedules.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGhE,OAAO,KAAK,EAAE,cAAc,IAAI,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAiB,iBAAiB,EAAkB,MAAM,2CAA2C,CAAC;AAC7G,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAGvI;;;;GAIG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAsB;IAEhD,wBAAwB;IACxB,GAAG,IAAI,MAAM;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B,qBAAa,aAAa;IAMtB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,QAAQ,CAAC,KAAK,EAAE,SAAS;IAN3B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA6B;IAClD,2EAA2E;IAC3E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgG;gBAGzG,IAAI,EAAE,YAAY,EAC1B,KAAK,EAAE,SAAS;IAK3B,6BAA6B;IAC7B,IAAI,IAAI,QAAQ,EAAE;IAIlB,uDAAuD;IACvD,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,EAAE;IAIjD,8DAA8D;IAC9D,QAAQ,IAAI,IAAI;IAsBhB,wEAAwE;IACxE,WAAW,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI;IA6BpC,uFAAuF;IACvF,OAAO,CAAC,IAAI;IAgCZ,OAAO,CAAC,YAAY;IA4DpB,yFAAyF;IACzF,OAAO,CAAC,OAAO;IAgBf,gEAAgE;IAChE,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,gBAAgB,CAAC,CAAC;CAgKrE"}
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The fake's SchedulesService: cron schedules that start jobs once per
|
|
3
|
+
* target at each occurrence, on a clock a test controls.
|
|
4
|
+
*
|
|
5
|
+
* Modelled as the contract states it: one occurrence per (schedule, target,
|
|
6
|
+
* time), however often it is evaluated; misfire LATEST (only the most recent
|
|
7
|
+
* missed occurrence within `catchup_window`, default one hour) or SKIP;
|
|
8
|
+
* skipped while a run of the same schedule and target is pending unless
|
|
9
|
+
* `queue_while_pending`; an owner's override of the cron and the enabled flag
|
|
10
|
+
* kept across SetSchedule; pause; run-now; and enumeration by a stored list
|
|
11
|
+
* or by a handler run as a job whose kv output `targets` is the list.
|
|
12
|
+
* A stored-pipeline target starts that pipeline's version (0, the latest
|
|
13
|
+
* when the occurrence fires) about the target's resource, else the
|
|
14
|
+
* schedule's, else the pipeline's scope.
|
|
15
|
+
*/
|
|
16
|
+
import { randomUUID } from "node:crypto";
|
|
17
|
+
import { create } from "@bufbuild/protobuf";
|
|
18
|
+
import { durationMs, timestampFromMs } from "@bufbuild/protobuf/wkt";
|
|
19
|
+
import { Code, ConnectError } from "@connectrpc/connect";
|
|
20
|
+
import { RunState } from "../gen/xeonr/pipelines/v1/common_pb.js";
|
|
21
|
+
import { RunTrigger } from "../gen/xeonr/pipelines/v1/runs_pb.js";
|
|
22
|
+
import { MisfirePolicy, OccurrenceOutcome, ScheduleSchema } from "../gen/xeonr/pipelines/v1/schedules_pb.js";
|
|
23
|
+
import { checkTimeZone, nextOccurrence, occurrencesBetween, parseCron } from "./cron.js";
|
|
24
|
+
/**
|
|
25
|
+
* The schedules' clock. Real time until a test sets it; from then on only
|
|
26
|
+
* {@link set} and {@link advance} move it, and each move fires whatever
|
|
27
|
+
* became due.
|
|
28
|
+
*/
|
|
29
|
+
export class FakeClock {
|
|
30
|
+
manual;
|
|
31
|
+
listeners = [];
|
|
32
|
+
/** Now, in epoch ms. */
|
|
33
|
+
now() {
|
|
34
|
+
return this.manual ?? Date.now();
|
|
35
|
+
}
|
|
36
|
+
/** Sets the time (a Date or epoch ms) and fires what is due. */
|
|
37
|
+
set(at) {
|
|
38
|
+
this.manual = typeof at === "number" ? at : at.getTime();
|
|
39
|
+
for (const l of this.listeners)
|
|
40
|
+
l();
|
|
41
|
+
}
|
|
42
|
+
/** Moves the clock forward by `ms` and fires what is due. */
|
|
43
|
+
advance(ms) {
|
|
44
|
+
this.set(this.now() + ms);
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
onMove(l) {
|
|
48
|
+
this.listeners.push(l);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/** The fake's schedules. */
|
|
52
|
+
export class FakeSchedules {
|
|
53
|
+
host;
|
|
54
|
+
clock;
|
|
55
|
+
byId = new Map();
|
|
56
|
+
/** Enumeration jobs waiting for their targets: run id → the occurrence. */
|
|
57
|
+
enumerating = new Map();
|
|
58
|
+
constructor(host, clock) {
|
|
59
|
+
this.host = host;
|
|
60
|
+
this.clock = clock;
|
|
61
|
+
clock.onMove(() => this.evaluate());
|
|
62
|
+
}
|
|
63
|
+
/** Every stored schedule. */
|
|
64
|
+
list() {
|
|
65
|
+
return [...this.byId.values()].map((s) => this.message(s));
|
|
66
|
+
}
|
|
67
|
+
/** A schedule's recorded occurrences, newest first. */
|
|
68
|
+
occurrences(scheduleId) {
|
|
69
|
+
return [...(this.byId.get(scheduleId)?.occurrences ?? [])].reverse();
|
|
70
|
+
}
|
|
71
|
+
/** Fires every occurrence that is due at the clock's time. */
|
|
72
|
+
evaluate() {
|
|
73
|
+
const now = this.clock.now();
|
|
74
|
+
for (const st of this.byId.values()) {
|
|
75
|
+
const sch = st.schedule;
|
|
76
|
+
const cronText = effectiveCron(sch);
|
|
77
|
+
if (!effectiveEnabled(sch) || sch.paused || !cronText) {
|
|
78
|
+
st.evaluatedTo = Math.max(st.evaluatedTo, now);
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (now <= st.evaluatedTo)
|
|
82
|
+
continue;
|
|
83
|
+
const cron = parseCron(cronText);
|
|
84
|
+
const due = occurrencesBetween(cron, st.evaluatedTo, now, sch.timeZone || "UTC", 100_000);
|
|
85
|
+
st.evaluatedTo = now;
|
|
86
|
+
if (due.length === 0)
|
|
87
|
+
continue;
|
|
88
|
+
const window = sch.catchupWindow ? durationMs(sch.catchupWindow) : 3_600_000;
|
|
89
|
+
const latest = due.at(-1);
|
|
90
|
+
// LATEST: the most recent, if within the window. SKIP: only one on time.
|
|
91
|
+
const onTime = sch.misfire === MisfirePolicy.SKIP ? now - latest <= 60_000 : now - latest <= window;
|
|
92
|
+
if (onTime)
|
|
93
|
+
this.fire(st, latest, false, "", false);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/** A run became terminal: an enumeration job hands over its targets. */
|
|
97
|
+
runFinished(run) {
|
|
98
|
+
const e = this.enumerating.get(run.id);
|
|
99
|
+
if (!e)
|
|
100
|
+
return;
|
|
101
|
+
this.enumerating.delete(run.id);
|
|
102
|
+
const st = this.byId.get(e.scheduleId);
|
|
103
|
+
if (!st)
|
|
104
|
+
return;
|
|
105
|
+
const failed = (message) => {
|
|
106
|
+
st.occurrences.push({ scheduledFor: e.scheduledFor, targetKey: "", tenant: run.tenant, outcome: OccurrenceOutcome.ENUMERATION_FAILED, runId: run.id, message, firedAt: this.clock.now() });
|
|
107
|
+
};
|
|
108
|
+
if (run.state !== RunState.SUCCEEDED)
|
|
109
|
+
return failed("the enumeration handler failed");
|
|
110
|
+
const raw = run.nodes.get("job")?.kv.targets;
|
|
111
|
+
const max = st.schedule.enumerate?.maxTargets || 1_000;
|
|
112
|
+
if (!Array.isArray(raw))
|
|
113
|
+
return failed("the enumeration handler's output targets is not a list");
|
|
114
|
+
if (raw.length > max)
|
|
115
|
+
return failed(`the enumeration returned ${raw.length} targets, over ${max}`);
|
|
116
|
+
const targets = [];
|
|
117
|
+
const keys = new Set();
|
|
118
|
+
for (const t of raw) {
|
|
119
|
+
const o = (t ?? {});
|
|
120
|
+
if (typeof o.key !== "string" || !o.key || keys.has(o.key))
|
|
121
|
+
return failed("a target has no key, or a key repeats");
|
|
122
|
+
keys.add(o.key);
|
|
123
|
+
targets.push({
|
|
124
|
+
key: o.key,
|
|
125
|
+
resource: o.resource && typeof o.resource === "object" ? o.resource : undefined,
|
|
126
|
+
args: o.args && typeof o.args === "object" && !Array.isArray(o.args) ? (o.args) : {},
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
this.startTargets(st, e.scheduledFor, targets, e.runNow, false);
|
|
130
|
+
}
|
|
131
|
+
/** Fires one occurrence (or a run-now) of a schedule. Returns the runs started now. */
|
|
132
|
+
fire(st, scheduledFor, runNow, targetKey, force) {
|
|
133
|
+
const sch = st.schedule;
|
|
134
|
+
const en = sch.enumerate?.source;
|
|
135
|
+
if (en?.case === "handler") {
|
|
136
|
+
const owner = { tenant: sch.owner?.tenant ?? "" };
|
|
137
|
+
try {
|
|
138
|
+
const run = this.host.createJob(owner, {
|
|
139
|
+
handler: en.value,
|
|
140
|
+
payload: {},
|
|
141
|
+
queue: sch.target.case === "job" ? sch.target.value.queue : "",
|
|
142
|
+
retry: undefined,
|
|
143
|
+
timeoutMs: 0,
|
|
144
|
+
interruptible: false,
|
|
145
|
+
resource: undefined,
|
|
146
|
+
trigger: runNow ? RunTrigger.API : RunTrigger.SCHEDULE,
|
|
147
|
+
schedule: { id: sch.id, scheduledFor, target: "" },
|
|
148
|
+
});
|
|
149
|
+
this.enumerating.set(run.id, { scheduleId: sch.id, scheduledFor, runNow });
|
|
150
|
+
return [this.host.runMessage(run.id)];
|
|
151
|
+
}
|
|
152
|
+
catch (err) {
|
|
153
|
+
st.occurrences.push({ scheduledFor, targetKey: "", tenant: owner.tenant, outcome: OccurrenceOutcome.ENUMERATION_FAILED, runId: "", message: ConnectError.from(err).rawMessage, firedAt: this.clock.now() });
|
|
154
|
+
return [];
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
let targets = en?.case === "list"
|
|
158
|
+
? en.value.targets.map((t) => ({ key: t.key, resource: t.resource ? { kind: t.resource.kind, id: t.resource.id, ...(t.resource.json ? { json: t.resource.json } : {}) } : undefined, args: t.args ?? {} }))
|
|
159
|
+
: [{ key: "", resource: undefined, args: {} }];
|
|
160
|
+
if (targetKey)
|
|
161
|
+
targets = targets.filter((t) => t.key === targetKey);
|
|
162
|
+
return this.startTargets(st, scheduledFor, targets, runNow, force);
|
|
163
|
+
}
|
|
164
|
+
startTargets(st, scheduledFor, targets, runNow, force) {
|
|
165
|
+
const sch = st.schedule;
|
|
166
|
+
const out = [];
|
|
167
|
+
const target = sch.target;
|
|
168
|
+
if (target.case !== "job" && target.case !== "pipeline")
|
|
169
|
+
return out;
|
|
170
|
+
for (const t of targets) {
|
|
171
|
+
const tenant = sch.owner?.tenant ?? "";
|
|
172
|
+
const record = (outcome, runId = "", message = "") => st.occurrences.push({ scheduledFor, targetKey: t.key, tenant, outcome, runId, message, firedAt: this.clock.now() });
|
|
173
|
+
const key = `${t.key}\u0000${scheduledFor ?? "now"}`;
|
|
174
|
+
if (scheduledFor !== undefined && st.fired.has(key))
|
|
175
|
+
continue;
|
|
176
|
+
if (scheduledFor !== undefined)
|
|
177
|
+
st.fired.add(key);
|
|
178
|
+
if (!sch.queueWhilePending && !force) {
|
|
179
|
+
const pending = [...this.host.runs()].some((r) => r.scheduleId === sch.id && r.scheduleTarget === t.key && (r.state === RunState.QUEUED || r.state === RunState.RUNNING || r.state === RunState.CANCELLING));
|
|
180
|
+
if (pending) {
|
|
181
|
+
record(OccurrenceOutcome.SKIPPED_PENDING, "", "a run of this schedule and target is still pending");
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
try {
|
|
186
|
+
const trigger = runNow ? RunTrigger.API : RunTrigger.SCHEDULE;
|
|
187
|
+
const schedule = { id: sch.id, scheduledFor, target: t.key };
|
|
188
|
+
const run = target.case === "job"
|
|
189
|
+
? this.host.createJob({ tenant }, {
|
|
190
|
+
handler: target.value.handler,
|
|
191
|
+
payload: { ...(target.value.payload ?? {}), ...t.args },
|
|
192
|
+
queue: target.value.queue,
|
|
193
|
+
retry: target.value.retry,
|
|
194
|
+
timeoutMs: target.value.timeout ? durationMs(target.value.timeout) : 0,
|
|
195
|
+
interruptible: target.value.interruptible,
|
|
196
|
+
resource: t.resource,
|
|
197
|
+
trigger,
|
|
198
|
+
schedule,
|
|
199
|
+
})
|
|
200
|
+
: this.host.startPipeline({ tenant }, {
|
|
201
|
+
target: target.value,
|
|
202
|
+
resource: t.resource ?? (target.value.resource ? { kind: target.value.resource.kind, id: target.value.resource.id, ...(target.value.resource.json ? { json: target.value.resource.json } : {}) } : undefined),
|
|
203
|
+
variables: { ...(target.value.variables ?? {}), ...t.args },
|
|
204
|
+
trigger,
|
|
205
|
+
schedule,
|
|
206
|
+
});
|
|
207
|
+
record(OccurrenceOutcome.STARTED, run.id);
|
|
208
|
+
out.push(this.host.runMessage(run.id));
|
|
209
|
+
}
|
|
210
|
+
catch (err) {
|
|
211
|
+
record(OccurrenceOutcome.REFUSED, "", ConnectError.from(err).rawMessage);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
if (scheduledFor !== undefined)
|
|
215
|
+
sch.lastOccurrence = timestampFromMs(scheduledFor);
|
|
216
|
+
return out;
|
|
217
|
+
}
|
|
218
|
+
/** The schedule as it is read: effective values and the next occurrence computed now. */
|
|
219
|
+
message(st) {
|
|
220
|
+
const s = st.schedule;
|
|
221
|
+
const cron = effectiveCron(s);
|
|
222
|
+
const enabled = effectiveEnabled(s);
|
|
223
|
+
const next = enabled && !s.paused && cron ? nextOccurrence(parseCron(cron), this.clock.now(), s.timeZone || "UTC") : undefined;
|
|
224
|
+
const out = create(ScheduleSchema, {
|
|
225
|
+
...s,
|
|
226
|
+
effectiveCron: cron,
|
|
227
|
+
effectiveEnabled: enabled,
|
|
228
|
+
cronOverridden: s.override?.cron !== undefined,
|
|
229
|
+
});
|
|
230
|
+
if (next !== undefined)
|
|
231
|
+
out.nextOccurrence = timestampFromMs(next);
|
|
232
|
+
else
|
|
233
|
+
delete out.nextOccurrence;
|
|
234
|
+
return out;
|
|
235
|
+
}
|
|
236
|
+
/** SchedulesService. `enter` authenticates as the fake does. */
|
|
237
|
+
service(enter) {
|
|
238
|
+
const readable = (who, id) => {
|
|
239
|
+
const st = this.byId.get(id);
|
|
240
|
+
if (!st || st.schedule.owner?.tenant !== who.tenant) {
|
|
241
|
+
throw new ConnectError("no such schedule", Code.NotFound);
|
|
242
|
+
}
|
|
243
|
+
return st;
|
|
244
|
+
};
|
|
245
|
+
const checkCron = (cron) => {
|
|
246
|
+
if (!cron)
|
|
247
|
+
return;
|
|
248
|
+
try {
|
|
249
|
+
parseCron(cron);
|
|
250
|
+
}
|
|
251
|
+
catch (err) {
|
|
252
|
+
throw new ConnectError(err instanceof Error ? err.message : String(err), Code.InvalidArgument);
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
return {
|
|
256
|
+
setSchedule: (req, ctx) => {
|
|
257
|
+
const who = enter("SetSchedule", ctx, "pipelines:schedule:edit");
|
|
258
|
+
const s = req.schedule;
|
|
259
|
+
if (!s?.owner?.tenant)
|
|
260
|
+
throw new ConnectError("schedule.owner.tenant: required", Code.InvalidArgument);
|
|
261
|
+
if (s.owner.tenant !== who.tenant)
|
|
262
|
+
throw new ConnectError("schedule.owner.tenant: the caller is not a service-account member of it", Code.PermissionDenied);
|
|
263
|
+
if (!/^[a-z0-9]([a-z0-9._-]{0,61}[a-z0-9])?$/.test(s.name))
|
|
264
|
+
throw new ConnectError("schedule.name: invalid", Code.InvalidArgument);
|
|
265
|
+
if (req.updateMask)
|
|
266
|
+
throw new ConnectError("update_mask: the fake replaces whole schedules only", Code.Unimplemented);
|
|
267
|
+
checkCron(s.cron);
|
|
268
|
+
try {
|
|
269
|
+
checkTimeZone(s.timeZone || "UTC");
|
|
270
|
+
}
|
|
271
|
+
catch {
|
|
272
|
+
throw new ConnectError(`time_zone: unknown zone ${JSON.stringify(s.timeZone)}`, Code.InvalidArgument);
|
|
273
|
+
}
|
|
274
|
+
if (s.target.case === "pipeline")
|
|
275
|
+
this.host.checkPipeline(s.owner.tenant, s.target.value.pipelineId);
|
|
276
|
+
else if (s.target.case === "job")
|
|
277
|
+
this.host.checkHandler(s.target.value.handler);
|
|
278
|
+
else
|
|
279
|
+
throw new ConnectError("schedule.target: required", Code.InvalidArgument);
|
|
280
|
+
if (s.enumerate?.source.case === "handler")
|
|
281
|
+
this.host.checkHandler(s.enumerate.source.value);
|
|
282
|
+
const existing = [...this.byId.values()].find((x) => x.schedule.owner?.tenant === s.owner.tenant && x.schedule.name === s.name);
|
|
283
|
+
const now = this.clock.now();
|
|
284
|
+
const schedule = create(ScheduleSchema, {
|
|
285
|
+
...s,
|
|
286
|
+
id: existing?.schedule.id ?? randomUUID(),
|
|
287
|
+
...(existing?.schedule.override ? { override: existing.schedule.override } : {}),
|
|
288
|
+
paused: existing?.schedule.paused ?? false,
|
|
289
|
+
...(existing?.schedule.lastOccurrence ? { lastOccurrence: existing.schedule.lastOccurrence } : {}),
|
|
290
|
+
createdAt: existing?.schedule.createdAt ?? timestampFromMs(now),
|
|
291
|
+
updatedAt: timestampFromMs(now),
|
|
292
|
+
});
|
|
293
|
+
const st = existing ?? { schedule, evaluatedTo: now, occurrences: [], fired: new Set() };
|
|
294
|
+
st.schedule = schedule;
|
|
295
|
+
this.byId.set(schedule.id, st);
|
|
296
|
+
return { schedule: this.message(st), created: !existing };
|
|
297
|
+
},
|
|
298
|
+
getSchedule: (req, ctx) => {
|
|
299
|
+
const who = enter("SetSchedule", ctx, "pipelines:schedule:read");
|
|
300
|
+
if (req.schedule.case === "scheduleId")
|
|
301
|
+
return { schedule: this.message(readable(who, req.schedule.value)) };
|
|
302
|
+
if (req.schedule.case !== "byName")
|
|
303
|
+
throw new ConnectError("schedule: required", Code.InvalidArgument);
|
|
304
|
+
const { owner, name } = req.schedule.value;
|
|
305
|
+
const found = [...this.byId.values()].find((x) => x.schedule.owner?.tenant === owner?.tenant && x.schedule.name === name);
|
|
306
|
+
if (!found)
|
|
307
|
+
throw new ConnectError("no such schedule", Code.NotFound);
|
|
308
|
+
return { schedule: this.message(readable(who, found.schedule.id)) };
|
|
309
|
+
},
|
|
310
|
+
listSchedules: (req, ctx) => {
|
|
311
|
+
const who = enter("SetSchedule", ctx, "pipelines:schedule:read");
|
|
312
|
+
if (!req.tenant)
|
|
313
|
+
throw new ConnectError("tenant: required", Code.InvalidArgument);
|
|
314
|
+
const schedules = [...this.byId.values()]
|
|
315
|
+
.filter((x) => x.schedule.owner?.tenant === req.tenant && req.tenant === who.tenant)
|
|
316
|
+
.map((x) => this.message(x))
|
|
317
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
318
|
+
return { schedules, nextCursor: "" };
|
|
319
|
+
},
|
|
320
|
+
setScheduleOverride: (req, ctx) => {
|
|
321
|
+
const who = enter("SetSchedule", ctx, "pipelines:schedule:edit");
|
|
322
|
+
const st = readable(who, req.scheduleId);
|
|
323
|
+
if (req.cron !== undefined)
|
|
324
|
+
checkCron(req.cron);
|
|
325
|
+
if (req.cron === undefined && req.enabled === undefined) {
|
|
326
|
+
delete st.schedule.override;
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
st.schedule.override = {
|
|
330
|
+
$typeName: "xeonr.pipelines.v1.ScheduleOverride",
|
|
331
|
+
...(req.cron !== undefined ? { cron: req.cron } : {}),
|
|
332
|
+
...(req.enabled !== undefined ? { enabled: req.enabled } : {}),
|
|
333
|
+
setBy: `urn:fake:sa:${who.tenant}`,
|
|
334
|
+
setAt: timestampFromMs(this.clock.now()),
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
return { schedule: this.message(st) };
|
|
338
|
+
},
|
|
339
|
+
markSchedulePaused: (req, ctx) => {
|
|
340
|
+
const who = enter("SetSchedule", ctx, "pipelines:schedule:edit");
|
|
341
|
+
const st = readable(who, req.scheduleId);
|
|
342
|
+
if (!st.schedule.paused) {
|
|
343
|
+
st.schedule.paused = true;
|
|
344
|
+
st.schedule.pausedAt = timestampFromMs(this.clock.now());
|
|
345
|
+
st.schedule.pausedBy = `urn:fake:sa:${who.tenant}`;
|
|
346
|
+
}
|
|
347
|
+
return { schedule: this.message(st) };
|
|
348
|
+
},
|
|
349
|
+
markScheduleResumed: (req, ctx) => {
|
|
350
|
+
const who = enter("SetSchedule", ctx, "pipelines:schedule:edit");
|
|
351
|
+
const st = readable(who, req.scheduleId);
|
|
352
|
+
if (st.schedule.paused) {
|
|
353
|
+
st.schedule.paused = false;
|
|
354
|
+
delete st.schedule.pausedAt;
|
|
355
|
+
st.schedule.pausedBy = "";
|
|
356
|
+
// Nothing missed while paused is caught up beyond the misfire policy.
|
|
357
|
+
st.evaluatedTo = this.clock.now();
|
|
358
|
+
}
|
|
359
|
+
return { schedule: this.message(st) };
|
|
360
|
+
},
|
|
361
|
+
deleteSchedule: (req, ctx) => {
|
|
362
|
+
const who = enter("SetSchedule", ctx, "pipelines:schedule:edit");
|
|
363
|
+
const st = this.byId.get(req.scheduleId);
|
|
364
|
+
if (st) {
|
|
365
|
+
readable(who, req.scheduleId);
|
|
366
|
+
this.byId.delete(req.scheduleId);
|
|
367
|
+
}
|
|
368
|
+
return {};
|
|
369
|
+
},
|
|
370
|
+
createScheduleRun: (req, ctx) => {
|
|
371
|
+
const who = enter("CreateScheduleRun", ctx, "pipelines:schedule:edit");
|
|
372
|
+
const st = readable(who, req.scheduleId);
|
|
373
|
+
const before = st.occurrences.length;
|
|
374
|
+
const runs = this.fire(st, undefined, true, req.targetKey, req.force);
|
|
375
|
+
const skipped = st.occurrences.slice(before).filter((o) => o.outcome === OccurrenceOutcome.SKIPPED_PENDING).length;
|
|
376
|
+
return { runs, skipped };
|
|
377
|
+
},
|
|
378
|
+
listScheduleOccurrences: (req, ctx) => {
|
|
379
|
+
const who = enter("SetSchedule", ctx, "pipelines:schedule:read");
|
|
380
|
+
const st = readable(who, req.scheduleId);
|
|
381
|
+
const cron = effectiveCron(st.schedule);
|
|
382
|
+
const upcoming = [];
|
|
383
|
+
if (cron && effectiveEnabled(st.schedule) && !st.schedule.paused) {
|
|
384
|
+
const parsed = parseCron(cron);
|
|
385
|
+
let t = this.clock.now();
|
|
386
|
+
for (let i = 0; i < (req.upcoming || 5); i++) {
|
|
387
|
+
const n = nextOccurrence(parsed, t, st.schedule.timeZone || "UTC");
|
|
388
|
+
if (n === undefined)
|
|
389
|
+
break;
|
|
390
|
+
upcoming.push(n);
|
|
391
|
+
t = n;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
const runState = (id) => [...this.host.runs()].find((r) => r.id === id)?.state ?? RunState.UNSPECIFIED;
|
|
395
|
+
return {
|
|
396
|
+
upcoming: upcoming.map((at) => ({ scheduledFor: timestampFromMs(at) })),
|
|
397
|
+
past: [...st.occurrences]
|
|
398
|
+
.reverse()
|
|
399
|
+
.slice(0, req.limit || 50)
|
|
400
|
+
.map((o) => ({
|
|
401
|
+
...(o.scheduledFor !== undefined ? { scheduledFor: timestampFromMs(o.scheduledFor) } : {}),
|
|
402
|
+
targetKey: o.targetKey,
|
|
403
|
+
tenant: o.tenant,
|
|
404
|
+
outcome: o.outcome,
|
|
405
|
+
runId: o.runId,
|
|
406
|
+
runState: o.runId ? runState(o.runId) : RunState.UNSPECIFIED,
|
|
407
|
+
message: o.message,
|
|
408
|
+
firedAt: timestampFromMs(o.firedAt),
|
|
409
|
+
})),
|
|
410
|
+
nextCursor: "",
|
|
411
|
+
};
|
|
412
|
+
},
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
function effectiveCron(s) {
|
|
417
|
+
return s.override?.cron !== undefined ? s.override.cron : s.cron;
|
|
418
|
+
}
|
|
419
|
+
function effectiveEnabled(s) {
|
|
420
|
+
return s.override?.enabled !== undefined ? s.override.enabled : s.enabled;
|
|
421
|
+
}
|
|
422
|
+
//# sourceMappingURL=schedules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedules.js","sourceRoot":"","sources":["../../src/testing/schedules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,2CAA2C,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