@xeonr/pipelines-sdk 0.3.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 +86 -33
- package/dist/auth.d.ts +1 -1
- package/dist/client.d.ts +14 -10
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +5 -4
- package/dist/client.js.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.d.ts +6 -4
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.d.ts +37 -6
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.js +6 -5
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/common_pb.d.ts +60 -6
- package/dist/gen/xeonr/pipelines/v1/common_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/common_pb.js +58 -3
- package/dist/gen/xeonr/pipelines/v1/common_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/definition_pb.d.ts +37 -7
- package/dist/gen/xeonr/pipelines/v1/definition_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/definition_pb.js +1 -1
- package/dist/gen/xeonr/pipelines/v1/definition_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.d.ts +22 -50
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.js +10 -9
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.js.map +1 -1
- 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 +40 -98
- package/dist/gen/xeonr/pipelines/v1/queues_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/queues_pb.js +46 -51
- package/dist/gen/xeonr/pipelines/v1/queues_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/registry_pb.d.ts +36 -27
- package/dist/gen/xeonr/pipelines/v1/registry_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/registry_pb.js +16 -18
- package/dist/gen/xeonr/pipelines/v1/registry_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/runs_pb.d.ts +372 -57
- package/dist/gen/xeonr/pipelines/v1/runs_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/runs_pb.js +205 -37
- 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 +138 -62
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.js +89 -49
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.js.map +1 -1
- 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 +14 -0
- package/dist/gen/xeonr/platform/v1/options_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/platform/v1/options_pb.js +18 -4
- package/dist/gen/xeonr/platform/v1/options_pb.js.map +1 -1
- package/dist/handler.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/queues.d.ts +15 -28
- package/dist/queues.d.ts.map +1 -1
- package/dist/queues.js +15 -33
- package/dist/queues.js.map +1 -1
- package/dist/reporter.d.ts +1 -1
- package/dist/reporter.js +4 -4
- package/dist/reporter.js.map +1 -1
- package/dist/schedules.d.ts +9 -17
- package/dist/schedules.d.ts.map +1 -1
- package/dist/schedules.js +11 -12
- package/dist/schedules.js.map +1 -1
- package/dist/testing/index.d.ts +111 -14
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +638 -130
- 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 +13 -10
- package/dist/testing/queues.d.ts.map +1 -1
- package/dist/testing/queues.js +15 -13
- package/dist/testing/queues.js.map +1 -1
- package/dist/testing/schedules.d.ts +20 -8
- package/dist/testing/schedules.d.ts.map +1 -1
- package/dist/testing/schedules.js +46 -43
- package/dist/testing/schedules.js.map +1 -1
- package/dist/worker.d.ts +8 -14
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js +8 -19
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
|
3
|
+
import type { ScheduleTarget } from "./schedules_pb.js";
|
|
4
|
+
import type { JsonObject, Message } from "@bufbuild/protobuf";
|
|
5
|
+
/**
|
|
6
|
+
* Describes the file xeonr/pipelines/v1/schedule_targets.proto.
|
|
7
|
+
*/
|
|
8
|
+
export declare const file_xeonr_pipelines_v1_schedule_targets: GenFile;
|
|
9
|
+
/**
|
|
10
|
+
* @generated from message xeonr.pipelines.v1.FireScheduleRequest
|
|
11
|
+
*/
|
|
12
|
+
export type FireScheduleRequest = Message<"xeonr.pipelines.v1.FireScheduleRequest"> & {
|
|
13
|
+
/**
|
|
14
|
+
* FireID identifies this fire: the idempotency key. The same on every
|
|
15
|
+
* retry.
|
|
16
|
+
*
|
|
17
|
+
* @generated from field: string fire_id = 1;
|
|
18
|
+
*/
|
|
19
|
+
fireId: string;
|
|
20
|
+
/**
|
|
21
|
+
* ScheduleID and ScheduleName are pipelines' schedule.
|
|
22
|
+
*
|
|
23
|
+
* @generated from field: string schedule_id = 2;
|
|
24
|
+
*/
|
|
25
|
+
scheduleId: string;
|
|
26
|
+
/**
|
|
27
|
+
* @generated from field: string schedule_name = 3;
|
|
28
|
+
*/
|
|
29
|
+
scheduleName: string;
|
|
30
|
+
/**
|
|
31
|
+
* Reference is the schedule's ScheduleFireTarget.reference: the
|
|
32
|
+
* service's own name for what the schedule runs.
|
|
33
|
+
*
|
|
34
|
+
* @generated from field: string reference = 4;
|
|
35
|
+
*/
|
|
36
|
+
reference: string;
|
|
37
|
+
/**
|
|
38
|
+
* FireTime is the occurrence's scheduled time, UTC; for a run-now, the
|
|
39
|
+
* instant it was asked. With the schedule it is unique per target, and
|
|
40
|
+
* the same on every retry.
|
|
41
|
+
*
|
|
42
|
+
* @generated from field: google.protobuf.Timestamp fire_time = 5;
|
|
43
|
+
*/
|
|
44
|
+
fireTime?: Timestamp | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* RunNow says the fire is a run-now (CreateScheduleRun), outside the
|
|
47
|
+
* cron.
|
|
48
|
+
*
|
|
49
|
+
* validate:skip a flag
|
|
50
|
+
*
|
|
51
|
+
* @generated from field: bool run_now = 6;
|
|
52
|
+
*/
|
|
53
|
+
runNow: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Target is the occurrence's target: its key (empty for a schedule with
|
|
56
|
+
* one target), its resource and its args. Its run is the schedule's
|
|
57
|
+
* tenant's, whose sink this call reached.
|
|
58
|
+
*
|
|
59
|
+
* @generated from field: xeonr.pipelines.v1.ScheduleTarget target = 7;
|
|
60
|
+
*/
|
|
61
|
+
target?: ScheduleTarget | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Parameters are the fire target's parameters with the target's args
|
|
64
|
+
* merged over them.
|
|
65
|
+
*
|
|
66
|
+
* @generated from field: google.protobuf.Struct parameters = 8;
|
|
67
|
+
*/
|
|
68
|
+
parameters?: JsonObject | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Attempt counts the calls for this fire, from 1.
|
|
71
|
+
*
|
|
72
|
+
* @generated from field: uint32 attempt = 9;
|
|
73
|
+
*/
|
|
74
|
+
attempt: number;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Describes the message xeonr.pipelines.v1.FireScheduleRequest.
|
|
78
|
+
* Use `create(FireScheduleRequestSchema)` to create a new message.
|
|
79
|
+
*/
|
|
80
|
+
export declare const FireScheduleRequestSchema: GenMessage<FireScheduleRequest>;
|
|
81
|
+
/**
|
|
82
|
+
* @generated from message xeonr.pipelines.v1.FireScheduleResponse
|
|
83
|
+
*/
|
|
84
|
+
export type FireScheduleResponse = Message<"xeonr.pipelines.v1.FireScheduleResponse"> & {
|
|
85
|
+
/**
|
|
86
|
+
* @generated from field: xeonr.pipelines.v1.FireOutcome outcome = 1;
|
|
87
|
+
*/
|
|
88
|
+
outcome: FireOutcome;
|
|
89
|
+
/**
|
|
90
|
+
* RunID is the run started, for STARTED: a run of the tenant's own, so
|
|
91
|
+
* the occurrence links to it. Empty is allowed (the occurrence is then
|
|
92
|
+
* STARTED with no run).
|
|
93
|
+
*
|
|
94
|
+
* @generated from field: string run_id = 2;
|
|
95
|
+
*/
|
|
96
|
+
runId: string;
|
|
97
|
+
/**
|
|
98
|
+
* Reason says why no run started, for DECLINED. It shows in the
|
|
99
|
+
* occurrence history to the schedule's readers: carry no secret.
|
|
100
|
+
*
|
|
101
|
+
* @generated from field: string reason = 3;
|
|
102
|
+
*/
|
|
103
|
+
reason: string;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Describes the message xeonr.pipelines.v1.FireScheduleResponse.
|
|
107
|
+
* Use `create(FireScheduleResponseSchema)` to create a new message.
|
|
108
|
+
*/
|
|
109
|
+
export declare const FireScheduleResponseSchema: GenMessage<FireScheduleResponse>;
|
|
110
|
+
/**
|
|
111
|
+
* FireOutcome is what the consuming service did with a fire.
|
|
112
|
+
*
|
|
113
|
+
* @generated from enum xeonr.pipelines.v1.FireOutcome
|
|
114
|
+
*/
|
|
115
|
+
export declare enum FireOutcome {
|
|
116
|
+
/**
|
|
117
|
+
* @generated from enum value: FIRE_OUTCOME_UNSPECIFIED = 0;
|
|
118
|
+
*/
|
|
119
|
+
UNSPECIFIED = 0,
|
|
120
|
+
/**
|
|
121
|
+
* A run was started for the fire (now, or by an earlier call with the
|
|
122
|
+
* same fire_id); `run_id` names it.
|
|
123
|
+
*
|
|
124
|
+
* @generated from enum value: FIRE_OUTCOME_STARTED = 1;
|
|
125
|
+
*/
|
|
126
|
+
STARTED = 1,
|
|
127
|
+
/**
|
|
128
|
+
* No run was started, for `reason`. Not retried.
|
|
129
|
+
*
|
|
130
|
+
* @generated from enum value: FIRE_OUTCOME_DECLINED = 2;
|
|
131
|
+
*/
|
|
132
|
+
DECLINED = 2
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Describes the enum xeonr.pipelines.v1.FireOutcome.
|
|
136
|
+
*/
|
|
137
|
+
export declare const FireOutcomeSchema: GenEnum<FireOutcome>;
|
|
138
|
+
/**
|
|
139
|
+
* ScheduleTargetService is served by a consuming service, not by pipelines
|
|
140
|
+
* (PIPE-111), as RunEventSinkService is: the call a schedule whose target is
|
|
141
|
+
* its tenant's own service (`Schedule.fire`, ScheduleFireTarget) makes at
|
|
142
|
+
* each occurrence. Pipelines keeps the clock, the override, pause, misfire
|
|
143
|
+
* policy, enumeration and the occurrence history; the service starts the
|
|
144
|
+
* run itself, with its own definition and attested facts (CreateRun), and
|
|
145
|
+
* answers which run it started or why it started none.
|
|
146
|
+
*
|
|
147
|
+
* Where and how. The call goes to the tenant's registered sink
|
|
148
|
+
* (SinksService.SetSink): the same base URL, the same audience and the same
|
|
149
|
+
* authentication, so a service that serves its sink serves this service
|
|
150
|
+
* next to it and registers nothing more. Pipelines authenticates exactly as
|
|
151
|
+
* for a delivery of run events, with one difference for PIPELINES_SIGNED: a
|
|
152
|
+
* fire's token has `sub` `urn:xeonr:pipelines:schedule-fires`, the
|
|
153
|
+
* `token_use` claim `schedule_fire` and JOSE `typ` `schedule-fire+jwt`, so a
|
|
154
|
+
* run-event delivery token never passes as a fire, nor a fire as a delivery.
|
|
155
|
+
* For AUTH_SERVICE_TOKEN it is the same pipelines service account as a
|
|
156
|
+
* delivery, audienced to the sink's audience alone (a token naming any other
|
|
157
|
+
* audience is never sent).
|
|
158
|
+
*
|
|
159
|
+
* Delivery is at least once. Each fire has a stable `fire_id`: every retry
|
|
160
|
+
* of it, by any coordinator, after any restart, carries the same id, so the
|
|
161
|
+
* service must start at most one run per fire_id and answer a repeated id
|
|
162
|
+
* as it answered the first (the same run, or the same reason). A schedule's
|
|
163
|
+
* occurrence is fired once (its occurrence row is unique), so no two fire
|
|
164
|
+
* ids ever stand for one occurrence.
|
|
165
|
+
*
|
|
166
|
+
* Retry. An answer settles the fire. An RPC error with a permanent code
|
|
167
|
+
* (`invalid_argument`, `not_found`, `out_of_range`, `unimplemented`)
|
|
168
|
+
* settles it DECLINED with the error as the reason and is not retried;
|
|
169
|
+
* `not_found` is how a service says it no longer has what the schedule
|
|
170
|
+
* fires (it should then DeleteSchedule). Any other error, or a transport
|
|
171
|
+
* failure, is retried with the same fire id after a backoff (doubling from
|
|
172
|
+
* five seconds to five minutes), at most eight calls, then recorded
|
|
173
|
+
* GAVE_UP. Each call has thirty seconds.
|
|
174
|
+
*
|
|
175
|
+
* Machine only (auth.machine-only-rpcs). Scope: a shared contract cannot
|
|
176
|
+
* name each serving service's scope, so this RPC carries no
|
|
177
|
+
* `require_scope`. The serving service gates it in its handler with a
|
|
178
|
+
* service-account-only scope of its own Auth application
|
|
179
|
+
* (`<service>:schedule:fire` by convention) granted to the pipelines
|
|
180
|
+
* service account, and refuses every other principal.
|
|
181
|
+
*
|
|
182
|
+
* @generated from service xeonr.pipelines.v1.ScheduleTargetService
|
|
183
|
+
*/
|
|
184
|
+
export declare const ScheduleTargetService: GenService<{
|
|
185
|
+
/**
|
|
186
|
+
* @generated from rpc xeonr.pipelines.v1.ScheduleTargetService.FireSchedule
|
|
187
|
+
*/
|
|
188
|
+
fireSchedule: {
|
|
189
|
+
methodKind: "unary";
|
|
190
|
+
input: typeof FireScheduleRequestSchema;
|
|
191
|
+
output: typeof FireScheduleResponseSchema;
|
|
192
|
+
};
|
|
193
|
+
}>;
|
|
194
|
+
//# sourceMappingURL=schedule_targets_pb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule_targets_pb.d.ts","sourceRoot":"","sources":["../../../../../src/gen/xeonr/pipelines/v1/schedule_targets_pb.ts"],"names":[],"mappings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AM,0BAA0B,EAAE,UAAU,CAAC,oBAAoB,CACd,CAAC;AAE3D;;;;GAIG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,WAAW,IAAI;IAEf;;;;;OAKG;IACH,OAAO,IAAI;IAEX;;;;OAIG;IACH,QAAQ,IAAI;CACb;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,WAAW,CACI,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC;IAC7C;;OAEG;IACH,YAAY,EAAE;QACZ,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,yBAAyB,CAAC;QACxC,MAAM,EAAE,OAAO,0BAA0B,CAAC;KAC3C,CAAC;CACH,CACyD,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.17.0 with parameter "target=ts,import_extension=.js"
|
|
2
|
+
// @generated from file xeonr/pipelines/v1/schedule_targets.proto (package xeonr.pipelines.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
5
|
+
import { file_buf_validate_validate } from "../../../buf/validate/validate_pb.js";
|
|
6
|
+
import { file_gnostic_openapi_v3_annotations } from "../../../gnostic/openapi/v3/annotations_pb.js";
|
|
7
|
+
import { file_google_protobuf_struct, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
8
|
+
import { file_xeonr_pipelines_v1_schedules } from "./schedules_pb.js";
|
|
9
|
+
import { file_xeonr_platform_v1_options } from "../../platform/v1/options_pb.js";
|
|
10
|
+
/**
|
|
11
|
+
* Describes the file xeonr/pipelines/v1/schedule_targets.proto.
|
|
12
|
+
*/
|
|
13
|
+
export const file_xeonr_pipelines_v1_schedule_targets = /*@__PURE__*/ fileDesc("Cil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IGFwcGxpY2F0aW9uLCBlbmZvcmNlZCBieSBpdHMgaGFuZGxlci6A6wQBQllaV3Byb3RvLnByb2Qud3RmL2dlbi9nby94ZW9uci9waXBlbGluZXMvcHJvdG9jb2xidWZmZXJzL2dvL3hlb25yL3BpcGVsaW5lcy92MTtwaXBlbGluZXN2MWIGcHJvdG8z", [file_buf_validate_validate, file_gnostic_openapi_v3_annotations, file_google_protobuf_struct, file_google_protobuf_timestamp, file_xeonr_pipelines_v1_schedules, file_xeonr_platform_v1_options]);
|
|
14
|
+
/**
|
|
15
|
+
* Describes the message xeonr.pipelines.v1.FireScheduleRequest.
|
|
16
|
+
* Use `create(FireScheduleRequestSchema)` to create a new message.
|
|
17
|
+
*/
|
|
18
|
+
export const FireScheduleRequestSchema = /*@__PURE__*/ messageDesc(file_xeonr_pipelines_v1_schedule_targets, 0);
|
|
19
|
+
/**
|
|
20
|
+
* Describes the message xeonr.pipelines.v1.FireScheduleResponse.
|
|
21
|
+
* Use `create(FireScheduleResponseSchema)` to create a new message.
|
|
22
|
+
*/
|
|
23
|
+
export const FireScheduleResponseSchema = /*@__PURE__*/ messageDesc(file_xeonr_pipelines_v1_schedule_targets, 1);
|
|
24
|
+
/**
|
|
25
|
+
* FireOutcome is what the consuming service did with a fire.
|
|
26
|
+
*
|
|
27
|
+
* @generated from enum xeonr.pipelines.v1.FireOutcome
|
|
28
|
+
*/
|
|
29
|
+
export var FireOutcome;
|
|
30
|
+
(function (FireOutcome) {
|
|
31
|
+
/**
|
|
32
|
+
* @generated from enum value: FIRE_OUTCOME_UNSPECIFIED = 0;
|
|
33
|
+
*/
|
|
34
|
+
FireOutcome[FireOutcome["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
35
|
+
/**
|
|
36
|
+
* A run was started for the fire (now, or by an earlier call with the
|
|
37
|
+
* same fire_id); `run_id` names it.
|
|
38
|
+
*
|
|
39
|
+
* @generated from enum value: FIRE_OUTCOME_STARTED = 1;
|
|
40
|
+
*/
|
|
41
|
+
FireOutcome[FireOutcome["STARTED"] = 1] = "STARTED";
|
|
42
|
+
/**
|
|
43
|
+
* No run was started, for `reason`. Not retried.
|
|
44
|
+
*
|
|
45
|
+
* @generated from enum value: FIRE_OUTCOME_DECLINED = 2;
|
|
46
|
+
*/
|
|
47
|
+
FireOutcome[FireOutcome["DECLINED"] = 2] = "DECLINED";
|
|
48
|
+
})(FireOutcome || (FireOutcome = {}));
|
|
49
|
+
/**
|
|
50
|
+
* Describes the enum xeonr.pipelines.v1.FireOutcome.
|
|
51
|
+
*/
|
|
52
|
+
export const FireOutcomeSchema = /*@__PURE__*/ enumDesc(file_xeonr_pipelines_v1_schedule_targets, 0);
|
|
53
|
+
/**
|
|
54
|
+
* ScheduleTargetService is served by a consuming service, not by pipelines
|
|
55
|
+
* (PIPE-111), as RunEventSinkService is: the call a schedule whose target is
|
|
56
|
+
* its tenant's own service (`Schedule.fire`, ScheduleFireTarget) makes at
|
|
57
|
+
* each occurrence. Pipelines keeps the clock, the override, pause, misfire
|
|
58
|
+
* policy, enumeration and the occurrence history; the service starts the
|
|
59
|
+
* run itself, with its own definition and attested facts (CreateRun), and
|
|
60
|
+
* answers which run it started or why it started none.
|
|
61
|
+
*
|
|
62
|
+
* Where and how. The call goes to the tenant's registered sink
|
|
63
|
+
* (SinksService.SetSink): the same base URL, the same audience and the same
|
|
64
|
+
* authentication, so a service that serves its sink serves this service
|
|
65
|
+
* next to it and registers nothing more. Pipelines authenticates exactly as
|
|
66
|
+
* for a delivery of run events, with one difference for PIPELINES_SIGNED: a
|
|
67
|
+
* fire's token has `sub` `urn:xeonr:pipelines:schedule-fires`, the
|
|
68
|
+
* `token_use` claim `schedule_fire` and JOSE `typ` `schedule-fire+jwt`, so a
|
|
69
|
+
* run-event delivery token never passes as a fire, nor a fire as a delivery.
|
|
70
|
+
* For AUTH_SERVICE_TOKEN it is the same pipelines service account as a
|
|
71
|
+
* delivery, audienced to the sink's audience alone (a token naming any other
|
|
72
|
+
* audience is never sent).
|
|
73
|
+
*
|
|
74
|
+
* Delivery is at least once. Each fire has a stable `fire_id`: every retry
|
|
75
|
+
* of it, by any coordinator, after any restart, carries the same id, so the
|
|
76
|
+
* service must start at most one run per fire_id and answer a repeated id
|
|
77
|
+
* as it answered the first (the same run, or the same reason). A schedule's
|
|
78
|
+
* occurrence is fired once (its occurrence row is unique), so no two fire
|
|
79
|
+
* ids ever stand for one occurrence.
|
|
80
|
+
*
|
|
81
|
+
* Retry. An answer settles the fire. An RPC error with a permanent code
|
|
82
|
+
* (`invalid_argument`, `not_found`, `out_of_range`, `unimplemented`)
|
|
83
|
+
* settles it DECLINED with the error as the reason and is not retried;
|
|
84
|
+
* `not_found` is how a service says it no longer has what the schedule
|
|
85
|
+
* fires (it should then DeleteSchedule). Any other error, or a transport
|
|
86
|
+
* failure, is retried with the same fire id after a backoff (doubling from
|
|
87
|
+
* five seconds to five minutes), at most eight calls, then recorded
|
|
88
|
+
* GAVE_UP. Each call has thirty seconds.
|
|
89
|
+
*
|
|
90
|
+
* Machine only (auth.machine-only-rpcs). Scope: a shared contract cannot
|
|
91
|
+
* name each serving service's scope, so this RPC carries no
|
|
92
|
+
* `require_scope`. The serving service gates it in its handler with a
|
|
93
|
+
* service-account-only scope of its own Auth application
|
|
94
|
+
* (`<service>:schedule:fire` by convention) granted to the pipelines
|
|
95
|
+
* service account, and refuses every other principal.
|
|
96
|
+
*
|
|
97
|
+
* @generated from service xeonr.pipelines.v1.ScheduleTargetService
|
|
98
|
+
*/
|
|
99
|
+
export const ScheduleTargetService = /*@__PURE__*/ serviceDesc(file_xeonr_pipelines_v1_schedule_targets, 0);
|
|
100
|
+
//# sourceMappingURL=schedule_targets_pb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule_targets_pb.js","sourceRoot":"","sources":["../../../../../src/gen/xeonr/pipelines/v1/schedule_targets_pb.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,6GAA6G;AAC7G,oBAAoB;AAGp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AAC,wCAAwC,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -9,21 +9,13 @@ import type { JsonObject, Message } from "@bufbuild/protobuf";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const file_xeonr_pipelines_v1_schedules: GenFile;
|
|
11
11
|
/**
|
|
12
|
-
* ScheduleOwner is who a schedule belongs to: one
|
|
13
|
-
* team within it.
|
|
12
|
+
* ScheduleOwner is who a schedule belongs to: one tenant.
|
|
14
13
|
*
|
|
15
14
|
* @generated from message xeonr.pipelines.v1.ScheduleOwner
|
|
16
15
|
*/
|
|
17
16
|
export type ScheduleOwner = Message<"xeonr.pipelines.v1.ScheduleOwner"> & {
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* @generated from field: string product = 1;
|
|
22
|
-
*/
|
|
23
|
-
product: string;
|
|
24
|
-
/**
|
|
25
|
-
* Tenant, when set, makes it that team's own. Required for a schedule
|
|
26
|
-
* that starts a stored pipeline (the pipeline's tenant).
|
|
18
|
+
* Tenant is the team URN the schedule belongs to, and every run it starts.
|
|
27
19
|
*
|
|
28
20
|
* @generated from field: string tenant = 2;
|
|
29
21
|
*/
|
|
@@ -85,8 +77,8 @@ export type SchedulePipelineTarget = Message<"xeonr.pipelines.v1.SchedulePipelin
|
|
|
85
77
|
*/
|
|
86
78
|
variables?: JsonObject | undefined;
|
|
87
79
|
/**
|
|
88
|
-
* AttestedFacts are each run's facts, attested by the
|
|
89
|
-
*
|
|
80
|
+
* AttestedFacts are each run's facts, attested by the tenant's service
|
|
81
|
+
* account that set the schedule, as it would on CreateRun.
|
|
90
82
|
*
|
|
91
83
|
* @generated from field: google.protobuf.Struct attested_facts = 5;
|
|
92
84
|
*/
|
|
@@ -105,7 +97,7 @@ export declare const SchedulePipelineTargetSchema: GenMessage<SchedulePipelineTa
|
|
|
105
97
|
export type ScheduleJobTarget = Message<"xeonr.pipelines.v1.ScheduleJobTarget"> & {
|
|
106
98
|
/**
|
|
107
99
|
* Handler is the worker handler, `<namespace>/<name>`, of the schedule's
|
|
108
|
-
*
|
|
100
|
+
* tenant.
|
|
109
101
|
*
|
|
110
102
|
* @generated from field: string handler = 1;
|
|
111
103
|
*/
|
|
@@ -141,7 +133,36 @@ export type ScheduleJobTarget = Message<"xeonr.pipelines.v1.ScheduleJobTarget">
|
|
|
141
133
|
*/
|
|
142
134
|
export declare const ScheduleJobTargetSchema: GenMessage<ScheduleJobTarget>;
|
|
143
135
|
/**
|
|
144
|
-
*
|
|
136
|
+
* ScheduleFireTarget calls the schedule's tenant's own service: pipelines
|
|
137
|
+
* calls its ScheduleTargetService.FireSchedule at the tenant's registered
|
|
138
|
+
* sink, and the service starts the run (PIPE-111).
|
|
139
|
+
*
|
|
140
|
+
* @generated from message xeonr.pipelines.v1.ScheduleFireTarget
|
|
141
|
+
*/
|
|
142
|
+
export type ScheduleFireTarget = Message<"xeonr.pipelines.v1.ScheduleFireTarget"> & {
|
|
143
|
+
/**
|
|
144
|
+
* Reference is the consuming service's own name for what the schedule runs (the
|
|
145
|
+
* forge's schedule id), passed back on every fire. Opaque to pipelines.
|
|
146
|
+
*
|
|
147
|
+
* @generated from field: string reference = 1;
|
|
148
|
+
*/
|
|
149
|
+
reference: string;
|
|
150
|
+
/**
|
|
151
|
+
* Parameters are passed on every fire, with a target's `args` merged
|
|
152
|
+
* over them. At most 16 KiB encoded.
|
|
153
|
+
*
|
|
154
|
+
* @generated from field: google.protobuf.Struct parameters = 2;
|
|
155
|
+
*/
|
|
156
|
+
parameters?: JsonObject | undefined;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Describes the message xeonr.pipelines.v1.ScheduleFireTarget.
|
|
160
|
+
* Use `create(ScheduleFireTargetSchema)` to create a new message.
|
|
161
|
+
*/
|
|
162
|
+
export declare const ScheduleFireTargetSchema: GenMessage<ScheduleFireTarget>;
|
|
163
|
+
/**
|
|
164
|
+
* ScheduleTarget is one thing an occurrence fans out to. Its run is the
|
|
165
|
+
* schedule's tenant's.
|
|
145
166
|
*
|
|
146
167
|
* @generated from message xeonr.pipelines.v1.ScheduleTarget
|
|
147
168
|
*/
|
|
@@ -155,14 +176,6 @@ export type ScheduleTarget = Message<"xeonr.pipelines.v1.ScheduleTarget"> & {
|
|
|
155
176
|
* @generated from field: string key = 1;
|
|
156
177
|
*/
|
|
157
178
|
key: string;
|
|
158
|
-
/**
|
|
159
|
-
* Tenant is the team the target's run belongs to. Empty is the
|
|
160
|
-
* schedule's own team; required for a product-wide schedule, and one the
|
|
161
|
-
* product acts for.
|
|
162
|
-
*
|
|
163
|
-
* @generated from field: string tenant = 2;
|
|
164
|
-
*/
|
|
165
|
-
tenant: string;
|
|
166
179
|
/**
|
|
167
180
|
* Resource is what the target's run is about, in place of the target
|
|
168
181
|
* spec's.
|
|
@@ -201,7 +214,7 @@ export type ScheduleTargetList = Message<"xeonr.pipelines.v1.ScheduleTargetList"
|
|
|
201
214
|
export declare const ScheduleTargetListSchema: GenMessage<ScheduleTargetList>;
|
|
202
215
|
/**
|
|
203
216
|
* Enumeration says where a schedule's targets come from at each occurrence.
|
|
204
|
-
* Unset is one target: the
|
|
217
|
+
* Unset is one target: the target spec as given.
|
|
205
218
|
*
|
|
206
219
|
* @generated from message xeonr.pipelines.v1.Enumeration
|
|
207
220
|
*/
|
|
@@ -219,10 +232,9 @@ export type Enumeration = Message<"xeonr.pipelines.v1.Enumeration"> & {
|
|
|
219
232
|
case: "list";
|
|
220
233
|
} | {
|
|
221
234
|
/**
|
|
222
|
-
* Handler is a worker handler of the schedule's
|
|
223
|
-
* (in the schedule's queue,
|
|
224
|
-
*
|
|
225
|
-
* else. Its kv output `targets` is a JSON array of ScheduleTarget, in
|
|
235
|
+
* Handler is a worker handler of the schedule's tenant, run as a job
|
|
236
|
+
* (in the schedule's queue, for the schedule's tenant) at each
|
|
237
|
+
* occurrence, before anything else. Its kv output `targets` is a JSON array of ScheduleTarget, in
|
|
226
238
|
* its JSON form. When it fails or the list is invalid, the occurrence
|
|
227
239
|
* fires nothing and is recorded ENUMERATION_FAILED.
|
|
228
240
|
*
|
|
@@ -360,6 +372,14 @@ export type Schedule = Message<"xeonr.pipelines.v1.Schedule"> & {
|
|
|
360
372
|
*/
|
|
361
373
|
value: ScheduleJobTarget;
|
|
362
374
|
case: "job";
|
|
375
|
+
} | {
|
|
376
|
+
/**
|
|
377
|
+
* Fire calls the schedule's tenant's own service, which starts the run.
|
|
378
|
+
*
|
|
379
|
+
* @generated from field: xeonr.pipelines.v1.ScheduleFireTarget fire = 28;
|
|
380
|
+
*/
|
|
381
|
+
value: ScheduleFireTarget;
|
|
382
|
+
case: "fire";
|
|
363
383
|
} | {
|
|
364
384
|
case: undefined;
|
|
365
385
|
value?: undefined;
|
|
@@ -500,8 +520,9 @@ export type ScheduleOccurrence = Message<"xeonr.pipelines.v1.ScheduleOccurrence"
|
|
|
500
520
|
*/
|
|
501
521
|
runState: RunState;
|
|
502
522
|
/**
|
|
503
|
-
* Message says why no run started, for SKIPPED, ENUMERATION_FAILED
|
|
504
|
-
* REFUSED
|
|
523
|
+
* Message says why no run started, for SKIPPED, ENUMERATION_FAILED,
|
|
524
|
+
* REFUSED, DECLINED and GAVE_UP, and the last failed call while
|
|
525
|
+
* DELIVERING.
|
|
505
526
|
*
|
|
506
527
|
* @generated from field: string message = 7;
|
|
507
528
|
*/
|
|
@@ -510,6 +531,25 @@ export type ScheduleOccurrence = Message<"xeonr.pipelines.v1.ScheduleOccurrence"
|
|
|
510
531
|
* @generated from field: google.protobuf.Timestamp fired_at = 8;
|
|
511
532
|
*/
|
|
512
533
|
firedAt?: Timestamp | undefined;
|
|
534
|
+
/**
|
|
535
|
+
* FireID is the fire's id as the tenant's service sees it
|
|
536
|
+
* (FireScheduleRequest), for a fire target; empty otherwise.
|
|
537
|
+
*
|
|
538
|
+
* @generated from field: string fire_id = 9;
|
|
539
|
+
*/
|
|
540
|
+
fireId: string;
|
|
541
|
+
/**
|
|
542
|
+
* Attempts counts the calls made to the tenant's service for the fire.
|
|
543
|
+
*
|
|
544
|
+
* @generated from field: uint32 attempts = 10;
|
|
545
|
+
*/
|
|
546
|
+
attempts: number;
|
|
547
|
+
/**
|
|
548
|
+
* NextAttemptAt is when a DELIVERING fire is called again.
|
|
549
|
+
*
|
|
550
|
+
* @generated from field: google.protobuf.Timestamp next_attempt_at = 11;
|
|
551
|
+
*/
|
|
552
|
+
nextAttemptAt?: Timestamp | undefined;
|
|
513
553
|
};
|
|
514
554
|
/**
|
|
515
555
|
* Describes the message xeonr.pipelines.v1.ScheduleOccurrence.
|
|
@@ -608,14 +648,7 @@ export declare const GetScheduleResponseSchema: GenMessage<GetScheduleResponse>;
|
|
|
608
648
|
*/
|
|
609
649
|
export type ListSchedulesRequest = Message<"xeonr.pipelines.v1.ListSchedulesRequest"> & {
|
|
610
650
|
/**
|
|
611
|
-
*
|
|
612
|
-
* the caller's own.
|
|
613
|
-
*
|
|
614
|
-
* @generated from field: string product = 1;
|
|
615
|
-
*/
|
|
616
|
-
product: string;
|
|
617
|
-
/**
|
|
618
|
-
* Tenant narrows to that team's own schedules.
|
|
651
|
+
* Tenant is the team whose schedules are listed.
|
|
619
652
|
*
|
|
620
653
|
* @generated from field: string tenant = 2;
|
|
621
654
|
*/
|
|
@@ -830,6 +863,14 @@ export type CreateScheduleRunResponse = Message<"xeonr.pipelines.v1.CreateSchedu
|
|
|
830
863
|
* @generated from field: uint32 skipped = 2;
|
|
831
864
|
*/
|
|
832
865
|
skipped: number;
|
|
866
|
+
/**
|
|
867
|
+
* Fired are a fire target's fires, one per target not skipped: the
|
|
868
|
+
* tenant's service starts their runs, so none is in `runs`. Follow them in
|
|
869
|
+
* ListScheduleOccurrences.
|
|
870
|
+
*
|
|
871
|
+
* @generated from field: repeated xeonr.pipelines.v1.ScheduleOccurrence fired = 3;
|
|
872
|
+
*/
|
|
873
|
+
fired: ScheduleOccurrence[];
|
|
833
874
|
};
|
|
834
875
|
/**
|
|
835
876
|
* Describes the message xeonr.pipelines.v1.CreateScheduleRunResponse.
|
|
@@ -964,7 +1005,29 @@ export declare enum OccurrenceOutcome {
|
|
|
964
1005
|
*
|
|
965
1006
|
* @generated from enum value: OCCURRENCE_OUTCOME_REFUSED = 4;
|
|
966
1007
|
*/
|
|
967
|
-
REFUSED = 4
|
|
1008
|
+
REFUSED = 4,
|
|
1009
|
+
/**
|
|
1010
|
+
* A fire target's fire is being delivered: called, or waiting to be
|
|
1011
|
+
* called again (`attempts`, `next_attempt_at`, `message` the last
|
|
1012
|
+
* failure). Not settled yet.
|
|
1013
|
+
*
|
|
1014
|
+
* @generated from enum value: OCCURRENCE_OUTCOME_DELIVERING = 5;
|
|
1015
|
+
*/
|
|
1016
|
+
DELIVERING = 5,
|
|
1017
|
+
/**
|
|
1018
|
+
* The tenant's service answered that it started no run, or refused the call with a
|
|
1019
|
+
* permanent error; `message` says why.
|
|
1020
|
+
*
|
|
1021
|
+
* @generated from enum value: OCCURRENCE_OUTCOME_DECLINED = 6;
|
|
1022
|
+
*/
|
|
1023
|
+
DECLINED = 6,
|
|
1024
|
+
/**
|
|
1025
|
+
* Every call of the fire failed, up to the bound; `message` is the last
|
|
1026
|
+
* failure. Nothing retries it.
|
|
1027
|
+
*
|
|
1028
|
+
* @generated from enum value: OCCURRENCE_OUTCOME_GAVE_UP = 7;
|
|
1029
|
+
*/
|
|
1030
|
+
GAVE_UP = 7
|
|
968
1031
|
}
|
|
969
1032
|
/**
|
|
970
1033
|
* Describes the enum xeonr.pipelines.v1.OccurrenceOutcome.
|
|
@@ -974,12 +1037,13 @@ export declare const OccurrenceOutcomeSchema: GenEnum<OccurrenceOutcome>;
|
|
|
974
1037
|
* SchedulesService holds cron schedules: platform-design §6.2's `cron`
|
|
975
1038
|
* trigger and design-v1 §5.2, built to XMB's scheduler (`xeonr/xmb/api`
|
|
976
1039
|
* `pkg/scheduler`), which the platform absorbs so that XMB can adopt it.
|
|
977
|
-
* Event triggers are not here: a
|
|
978
|
-
* CreateRun. Milestone 4.
|
|
1040
|
+
* Event triggers are not here: a consuming service reacts to its own events
|
|
1041
|
+
* and calls CreateRun. Milestone 4.
|
|
979
1042
|
*
|
|
980
|
-
* A schedule starts, at each occurrence of its cron expression,
|
|
981
|
-
*
|
|
982
|
-
*
|
|
1043
|
+
* A schedule starts, at each occurrence of its cron expression, a published
|
|
1044
|
+
* version of a stored pipeline, a job to a worker handler, or a call to its
|
|
1045
|
+
* tenant's own service (ScheduleFireTarget, PIPE-111), once per target. Each
|
|
1046
|
+
* occurrence is one row, unique on (schedule, target key,
|
|
983
1047
|
* scheduled-for): every API replica computes the same occurrence and tries
|
|
984
1048
|
* to insert it, and exactly one insert wins. There is no leader election,
|
|
985
1049
|
* no last-run-at column and no lock: the unique index is the authority, so
|
|
@@ -998,36 +1062,48 @@ export declare const OccurrenceOutcomeSchema: GenEnum<OccurrenceOutcome>;
|
|
|
998
1062
|
* a ten-minute job on a five-minute cron otherwise grows a queue that never
|
|
999
1063
|
* drains, and the safe behaviour is the zero value.
|
|
1000
1064
|
*
|
|
1001
|
-
* Override. A
|
|
1002
|
-
* boot, as XMB's code declares its tasks. The owner may override
|
|
1003
|
-
* cron expression and the enabled flag (SetScheduleOverride); the
|
|
1004
|
-
* survives the
|
|
1065
|
+
* Override. A consuming service declares its schedules (SetSchedule),
|
|
1066
|
+
* typically at boot, as XMB's code declares its tasks. The owner may override
|
|
1067
|
+
* just the cron expression and the enabled flag (SetScheduleOverride); the
|
|
1068
|
+
* override survives the service setting the schedule again, exactly as XMB's
|
|
1005
1069
|
* `XMB_SCHEDULER_SCHEDULES` survives a deploy. `cron_overridden` tells a
|
|
1006
1070
|
* console to show the expression rather than a `cron_label` that no longer
|
|
1007
1071
|
* describes it.
|
|
1008
1072
|
*
|
|
1009
1073
|
* Enumeration. One schedule can fan out to many runs per occurrence, one per
|
|
1010
|
-
* target, re-enumerated at every occurrence so new
|
|
1011
|
-
*
|
|
1012
|
-
*
|
|
1074
|
+
* target, re-enumerated at every occurrence so new resources are picked up
|
|
1075
|
+
* with no re-registration (platform-design §6.2, design-v1 §5.2). The
|
|
1076
|
+
* platform does not resolve a consuming service's resources, so the service
|
|
1013
1077
|
* supplies the list, in either of two ways: a stored list on the schedule,
|
|
1014
|
-
* for a small set that changes when the
|
|
1015
|
-
* schedule again); or a worker handler of the
|
|
1078
|
+
* for a small set that changes when the service says so (it sets the
|
|
1079
|
+
* schedule again); or a worker handler of the tenant, run as a job at each
|
|
1016
1080
|
* occurrence, whose `targets` output is the list, for a set only the
|
|
1017
|
-
*
|
|
1081
|
+
* service's database knows and that changes on its own (XMB's per-server
|
|
1018
1082
|
* tasks enumerate servers from its database). Both exist because neither
|
|
1019
|
-
* covers the other: a stored list cannot follow the
|
|
1020
|
-
* handler is a worker the
|
|
1083
|
+
* covers the other: a stored list cannot follow the service's data, and a
|
|
1084
|
+
* handler is a worker the service must run. Every target's run is the
|
|
1085
|
+
* schedule's tenant's.
|
|
1021
1086
|
*
|
|
1022
|
-
* Ownership, like queues: a schedule belongs to one
|
|
1023
|
-
*
|
|
1024
|
-
*
|
|
1025
|
-
*
|
|
1026
|
-
*
|
|
1027
|
-
*
|
|
1028
|
-
* the override, pause and run-now likewise. A schedule the caller may not
|
|
1087
|
+
* Ownership, like queues: a schedule belongs to one tenant
|
|
1088
|
+
* (`owner.tenant`), and a schedule that starts a stored pipeline must start
|
|
1089
|
+
* one of that tenant's. Set and changed by the tenant's members that are
|
|
1090
|
+
* service accounts, and by the platform's operators; the override, pause and
|
|
1091
|
+
* run-now likewise. It is read by the tenant's members and by operators.
|
|
1092
|
+
* People who are not operators never write. A schedule the caller may not
|
|
1029
1093
|
* read answers `not_found`.
|
|
1030
1094
|
*
|
|
1095
|
+
* Fire target. A schedule may call its tenant's own service rather than
|
|
1096
|
+
* start a run: at each occurrence (and run-now) pipelines calls the
|
|
1097
|
+
* service's ScheduleTargetService.FireSchedule at the tenant's registered
|
|
1098
|
+
* sink, with a stable fire id, and the service starts the run itself with
|
|
1099
|
+
* its own definition and attested facts. The clock, override, pause, misfire
|
|
1100
|
+
* policy, enumeration and `queue_while_pending` behave as for any target;
|
|
1101
|
+
* the occurrence is DELIVERING until the service answers, then STARTED
|
|
1102
|
+
* (linked to the run the service names, when it is the tenant's), DECLINED
|
|
1103
|
+
* (with the service's reason), or GAVE_UP after the bounded retries. Only
|
|
1104
|
+
* the tenant's service-account members may set such a schedule, and it
|
|
1105
|
+
* calls only that tenant's sink.
|
|
1106
|
+
*
|
|
1031
1107
|
* Verbs outside api.rpc-naming's: none. CreateScheduleRun creates a run;
|
|
1032
1108
|
* MarkSchedulePaused and MarkScheduleResumed use `Mark`.
|
|
1033
1109
|
*
|