@xeonr/pipelines-sdk 0.2.0 → 0.3.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 +172 -16
- package/dist/client.d.ts +63 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +43 -1
- package/dist/client.js.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.d.ts +173 -12
- 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 +187 -2
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.js +38 -5
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/common_pb.d.ts +4 -2
- package/dist/gen/xeonr/pipelines/v1/common_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/common_pb.js +4 -2
- package/dist/gen/xeonr/pipelines/v1/common_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/definition_pb.d.ts +277 -4
- 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 +1100 -0
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.js +298 -0
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/pools_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/pools_pb.js +1 -1
- package/dist/gen/xeonr/pipelines/v1/pools_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/queues_pb.d.ts +769 -0
- package/dist/gen/xeonr/pipelines/v1/queues_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/queues_pb.js +190 -0
- package/dist/gen/xeonr/pipelines/v1/queues_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/registry_pb.d.ts +60 -0
- package/dist/gen/xeonr/pipelines/v1/registry_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/registry_pb.js +21 -16
- package/dist/gen/xeonr/pipelines/v1/registry_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/runs_pb.d.ts +846 -3
- package/dist/gen/xeonr/pipelines/v1/runs_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/runs_pb.js +243 -27
- package/dist/gen/xeonr/pipelines/v1/runs_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.d.ts +1110 -0
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.js +295 -0
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.js +1 -1
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.js.map +1 -1
- package/dist/gen/xeonr/platform/v1/options_pb.d.ts +123 -1
- package/dist/gen/xeonr/platform/v1/options_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/platform/v1/options_pb.js +90 -1
- package/dist/gen/xeonr/platform/v1/options_pb.js.map +1 -1
- package/dist/handler.d.ts +50 -0
- 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 +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/queues.d.ts +171 -0
- package/dist/queues.d.ts.map +1 -0
- package/dist/queues.js +135 -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 +201 -0
- package/dist/schedules.d.ts.map +1 -0
- package/dist/schedules.js +127 -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 +129 -4
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +723 -30
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/queues.d.ts +46 -0
- package/dist/testing/queues.d.ts.map +1 -0
- package/dist/testing/queues.js +70 -0
- package/dist/testing/queues.js.map +1 -0
- package/dist/testing/schedules.d.ts +113 -0
- package/dist/testing/schedules.d.ts.map +1 -0
- package/dist/testing/schedules.js +419 -0
- package/dist/testing/schedules.js.map +1 -0
- package/dist/worker.d.ts +48 -1
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js +67 -6
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ Pass `register: false` and `pool.id` if something else does that.
|
|
|
124
124
|
| Still running at its deadline | `TIMED_OUT` | `TIMEOUT` |
|
|
125
125
|
| Stopped after a cancel | `CANCELLED` | `CANCELLED` |
|
|
126
126
|
| Aborted by `stop()` past its timeout | `INTERRUPTED` | `INTERRUPTED` |
|
|
127
|
-
| Lease lost | nothing reported | `ABANDONED`, decided by the platform |
|
|
127
|
+
| Lease lost | nothing reported | `ABANDONED`, decided by the platform; run again automatically only on an `interruptible` node or job |
|
|
128
128
|
|
|
129
129
|
The platform picks the failure class and decides whether to retry, using the
|
|
130
130
|
node's `retry.when`. By default it retries only transient classes:
|
|
@@ -189,6 +189,128 @@ The worker reads each error by its Connect code (`errorKind`):
|
|
|
189
189
|
default. On a node marked `interruptible`, the retry does not count
|
|
190
190
|
against `retry.max`.
|
|
191
191
|
|
|
192
|
+
### Stages, progress, issues and spans
|
|
193
|
+
|
|
194
|
+
A handler can tell the console how far it has got, and what went wrong with
|
|
195
|
+
individual items, without failing:
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
export const scanLibrary = defineHandler<{ libraryId: string }>({
|
|
199
|
+
name: "acme/scan-library",
|
|
200
|
+
version: "2.0.0",
|
|
201
|
+
title: "Scan library",
|
|
202
|
+
// Published in the manifest, so a console draws every stage before the attempt starts.
|
|
203
|
+
stages: [
|
|
204
|
+
{ key: "read", name: "Reading folders" },
|
|
205
|
+
{ key: "probe", name: "Probing files", weight: 4 }, // dominates the overall bar
|
|
206
|
+
],
|
|
207
|
+
async run(ctx) {
|
|
208
|
+
ctx.stage("read");
|
|
209
|
+
const files = await listFiles(ctx.input.libraryId);
|
|
210
|
+
ctx.stage("probe"); // finishes "read"
|
|
211
|
+
for (const [i, f] of files.entries()) {
|
|
212
|
+
await ctx.span("probe", async (span) => {
|
|
213
|
+
span.setAttribute("file", f.path);
|
|
214
|
+
try {
|
|
215
|
+
await probe(f);
|
|
216
|
+
} catch (err) {
|
|
217
|
+
ctx.issue({ severity: "warning", subject: f.path, subjectKind: "media.file", subjectId: f.id, message: `${f.path} could not be probed` });
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
ctx.progress({ processed: i + 1, total: files.length });
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
});
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
- **`ctx.stage(key)`** enters a stage and finishes the one before it. The
|
|
227
|
+
last stage is finished as `SUCCEEDED` when the handler returns, or
|
|
228
|
+
`FAILED` when it fails. A key the handler does not declare is added at run
|
|
229
|
+
time with weight 0. The calls are `WorkerService.SetProgress` with `stage`.
|
|
230
|
+
- **`ctx.progress({ processed, total, failed, fraction, message })`** is
|
|
231
|
+
coalesced: the latest value about once a second (`reportIntervalMs`), and
|
|
232
|
+
a forced final report before the attempt completes.
|
|
233
|
+
- **`ctx.issue({ severity, subject, subjectKind, subjectId, message, detail })`**
|
|
234
|
+
is batched, up to 100 per `AppendIssues`. The run carries the counts by
|
|
235
|
+
severity, and `client.listIssues(runId)` reads them.
|
|
236
|
+
- **`ctx.span(name, fn, attributes?)`** records an OpenTelemetry-shaped span
|
|
237
|
+
of the attempt's trace (`ReportSpans`). Spans nest with `span.span(...)`,
|
|
238
|
+
and a throw marks a span `error`. `client.getRunTrace(runId)` reads the
|
|
239
|
+
whole trace.
|
|
240
|
+
|
|
241
|
+
None of this can fail a handler. Every error sending progress, issues or
|
|
242
|
+
spans is logged at debug and dropped.
|
|
243
|
+
|
|
244
|
+
## Queues
|
|
245
|
+
|
|
246
|
+
Jobs are admitted through queues: lanes with limits and fairness between
|
|
247
|
+
tenants. A queue is not where work runs; pools and workers are. A job with no
|
|
248
|
+
`queue` goes to the product's `default` queue, which has no limits until the
|
|
249
|
+
product sets one.
|
|
250
|
+
|
|
251
|
+
```ts
|
|
252
|
+
const worker = new Worker({
|
|
253
|
+
baseUrl, token, tenant: TEAM, pool: { name: "acme-app" },
|
|
254
|
+
// Declared at start with SetQueue, every writable field replaced; a pause survives.
|
|
255
|
+
queues: [
|
|
256
|
+
{ name: "emails", maxConcurrency: 20, maxConcurrencyPerTenant: 5, rateLimit: { limit: 100, windowMs: 60_000 } },
|
|
257
|
+
{ name: "imports", maxConcurrency: 2, defaultRetry: { max: 3, when: [FailureClass.HANDLER_ERROR] }, defaultTimeoutMs: 30 * 60_000 },
|
|
258
|
+
],
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
await pipelines.createJob({ tenant: TEAM, handler: "acme/send-email", idempotencyKey: "welcome:4821", queue: "emails" });
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
- An unknown queue name is `not_found`. A `retry` or `timeoutMs` over the
|
|
265
|
+
queue's `defaultRetry` / `defaultTimeoutMs` is `invalid_argument`. When
|
|
266
|
+
unset, the queue's defaults apply.
|
|
267
|
+
- **`QueuesClient`** has `setQueue`, `getQueue`, `listQueues`, `pauseQueue`,
|
|
268
|
+
`resumeQueue`, `getQueueStats`, `listQueueJobs`, `deleteQueue` and
|
|
269
|
+
`requeueJob`. `declareQueues(client, decls)` is the helper the worker uses.
|
|
270
|
+
Queues belong to the product (the Auth application id): the worker reads it
|
|
271
|
+
from its token's `urn:xeonr:auth:application_id`, or takes `product`.
|
|
272
|
+
- **Dead letters.** `listQueueJobs(id, { states: [RunState.FAILED] })` lists
|
|
273
|
+
them, and `requeueJob(runId)` (`RetryNode` on node `job`) offers one again on
|
|
274
|
+
its queue.
|
|
275
|
+
- **Fairness.** The next claim goes to the eligible tenant with the fewest
|
|
276
|
+
running attempts in the queue; ties go to the longest-waiting job.
|
|
277
|
+
|
|
278
|
+
`createJob` also takes `interruptible: true` for a handler that is safe to
|
|
279
|
+
run again from the start. A worker shutting down then spends no retry on it,
|
|
280
|
+
and a worker that vanished (`ABANDONED`) gets it run again. The platform
|
|
281
|
+
re-runs an abandoned attempt only for an interruptible node.
|
|
282
|
+
|
|
283
|
+
## Schedules
|
|
284
|
+
|
|
285
|
+
```ts
|
|
286
|
+
const worker = new Worker({
|
|
287
|
+
baseUrl, token, tenant: TEAM, pool: { name: "acme-app" },
|
|
288
|
+
schedules: [
|
|
289
|
+
// Each occurrence of the cron, in its time zone, starts a job to one of this worker's handlers.
|
|
290
|
+
{ name: "reports.daily", cron: "0 4 * * *", cronLabel: "Every day at 4am", timeZone: "Europe/London", tenant: TEAM, job: { handler: "acme/report" } },
|
|
291
|
+
// Fan out: the enumeration handler returns the targets at each occurrence.
|
|
292
|
+
{ name: "servers.backup", cron: "*/30 * * * *", tenant: TEAM, job: { handler: "acme/backup" }, enumerate: { handler: "acme/list-servers" } },
|
|
293
|
+
],
|
|
294
|
+
});
|
|
295
|
+
worker.handle(report).handle(backup).handle(
|
|
296
|
+
defineEnumerator({ name: "acme/list-servers", version: "1.0.0", run: async () => (await servers()).map((s) => ({ key: `server:${s.id}`, args: { id: s.id } })) }),
|
|
297
|
+
);
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
- A schedule whose job or enumeration handler the worker does not register
|
|
301
|
+
is refused at `start()`, before anything is published.
|
|
302
|
+
- The platform's rules: one run per occurrence and target, however many
|
|
303
|
+
replicas evaluate it. After an outage, only the latest missed occurrence
|
|
304
|
+
within `catchupWindowMs` fires (`misfire`). A target with a run still
|
|
305
|
+
pending is skipped unless `queueWhilePending`. An owner's override of the
|
|
306
|
+
cron or enabled flag survives redeclaration.
|
|
307
|
+
- **`SchedulesClient`** has `setSchedule`, `getSchedule`, `listSchedules`,
|
|
308
|
+
`setScheduleOverride`, `pauseSchedule`, `resumeSchedule`, `deleteSchedule`,
|
|
309
|
+
`runScheduleNow` and `listScheduleOccurrences`. `declareSchedules` is the
|
|
310
|
+
helper.
|
|
311
|
+
- `SchedulesService` is not served by pipelines-api's `main` yet. The client
|
|
312
|
+
is built to the contract, and the fake implements it.
|
|
313
|
+
|
|
192
314
|
## Enqueue jobs and start runs
|
|
193
315
|
|
|
194
316
|
```ts
|
|
@@ -203,6 +325,7 @@ const { run } = await pipelines.createJob({
|
|
|
203
325
|
payload: { to: "ada@example.com", template: "welcome" },
|
|
204
326
|
idempotencyKey: "welcome-email:user-4821",
|
|
205
327
|
delayMs: 10 * 60_000, // not offered to a worker before ten minutes have passed
|
|
328
|
+
queue: "emails", // admitted through this product queue (see Queues)
|
|
206
329
|
retry: { max: 3, when: [FailureClass.HANDLER_ERROR] }, // the job's node policy; unset is the platform default
|
|
207
330
|
timeoutMs: 5 * 60_000, // bounds one attempt
|
|
208
331
|
});
|
|
@@ -226,6 +349,15 @@ await pipelines.createRun({
|
|
|
226
349
|
},
|
|
227
350
|
});
|
|
228
351
|
|
|
352
|
+
// A published version of a stored pipeline instead of an inline definition.
|
|
353
|
+
await pipelines.createRun({
|
|
354
|
+
idempotencyKey: "nightly:2026-11-12",
|
|
355
|
+
tenant: TEAM,
|
|
356
|
+
resource: { kind: "acme.library", id: "lib-7" },
|
|
357
|
+
pipeline: { name: "nightly-scan", scope: { kind: "acme.library", id: "lib-7" } }, // version 0: the latest
|
|
358
|
+
variables: { depth: 2 },
|
|
359
|
+
});
|
|
360
|
+
|
|
229
361
|
await pipelines.getRun(run.id);
|
|
230
362
|
await pipelines.cancelRun(run.id, "superseded");
|
|
231
363
|
```
|
|
@@ -273,22 +405,45 @@ The fake models:
|
|
|
273
405
|
- external (image) nodes you settle with `completeNode`;
|
|
274
406
|
- error injection (`inject("Heartbeat", Code.Unavailable, 2)`).
|
|
275
407
|
|
|
276
|
-
It
|
|
408
|
+
It also models queues (limits, pause, rate limits, fairness, dead letters),
|
|
409
|
+
issues, staged progress, spans and the run trace, and schedules on a clock
|
|
410
|
+
you control:
|
|
411
|
+
|
|
412
|
+
```ts
|
|
413
|
+
fake.clock.set(new Date("2026-11-12T03:59:30Z"));
|
|
414
|
+
fake.clock.advance(60_000); // fires the 04:00 occurrence
|
|
415
|
+
fake.schedules.occurrences(scheduleId); // what fired, skipped or was refused
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
Like the api, the fake refuses payload keys the handler's manifest does not
|
|
419
|
+
declare as inputs. It retries an `ABANDONED` attempt only on an
|
|
420
|
+
interruptible node.
|
|
421
|
+
|
|
422
|
+
It does not model secrets, blobs, tiers, routing between pools or stored
|
|
423
|
+
pipelines.
|
|
277
424
|
|
|
278
425
|
## Conformance suite
|
|
279
426
|
|
|
280
427
|
`src/conformance/suite.ts` holds the cases both SDKs must pass against
|
|
281
|
-
pipelines-api
|
|
282
|
-
`
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
428
|
+
pipelines-api, with the ids of the Go SDK's `CONFORMANCE.md`
|
|
429
|
+
(`xeonr/pipelines/sdk-go`):
|
|
430
|
+
|
|
431
|
+
| Id | Case |
|
|
432
|
+
|---|---|
|
|
433
|
+
| C1 | Enqueue runs a job in-process (idempotent, kv output, log line) |
|
|
434
|
+
| C2 | A delayed job does not start early |
|
|
435
|
+
| C3 | Retry by class (transient-marked, unmarked, listed) |
|
|
436
|
+
| C4 | A permanent failure is not retried |
|
|
437
|
+
| C5 | A cancel stops the handler |
|
|
438
|
+
| C6 | A lost lease is retried on another replica (an interruptible job) |
|
|
439
|
+
| C7 | Shutdown releases unstarted attempts |
|
|
440
|
+
| C8 | Another owner's handlers are unclaimable |
|
|
441
|
+
| C9 | A job is admitted through the queue it names |
|
|
442
|
+
| C10 | An unknown queue name is `not_found` |
|
|
443
|
+
| C11 | A retry or timeout over the queue's ceiling is `invalid_argument` |
|
|
444
|
+
| C12 | `max_concurrency 1` holds across two workers |
|
|
445
|
+
| C13 | A paused queue starts nothing until resumed |
|
|
446
|
+
| C14 | A dead letter is listed and requeued |
|
|
292
447
|
|
|
293
448
|
The cases run against the fake in every `pnpm test`. To run them against a
|
|
294
449
|
real pipelines-api, set these variables (otherwise the suite is skipped):
|
|
@@ -298,12 +453,13 @@ real pipelines-api, set these variables (otherwise the suite is skipped):
|
|
|
298
453
|
| `PIPELINES_API_URL` | the api's base URL |
|
|
299
454
|
| `PIPELINES_TOKEN` | an access token; or `PIPELINES_SA_ASSERTION` with `PIPELINES_TOKEN_URL` |
|
|
300
455
|
| `PIPELINES_TENANT` | the owner's team URN |
|
|
301
|
-
| `PIPELINES_NAMESPACE` | a registry namespace
|
|
302
|
-
| `
|
|
456
|
+
| `PIPELINES_NAMESPACE` | optional: a registry namespace the team owns or may claim, default `sdkconf` |
|
|
457
|
+
| `PIPELINES_PRODUCT` | optional: the owner's product, default read from the token |
|
|
458
|
+
| `PIPELINES_OTHER_TOKEN`, `PIPELINES_OTHER_TENANT` | optional: another team's service account, for C8 |
|
|
303
459
|
| `PIPELINES_LEASE_MS` | optional: the server's lease, default 60000 |
|
|
304
460
|
|
|
305
461
|
```sh
|
|
306
|
-
PIPELINES_API_URL=... PIPELINES_TOKEN=... PIPELINES_TENANT=...
|
|
462
|
+
PIPELINES_API_URL=... PIPELINES_TOKEN=... PIPELINES_TENANT=... pnpm vitest run src/conformance/api.test.ts
|
|
307
463
|
```
|
|
308
464
|
|
|
309
465
|
## Dependencies
|
package/dist/client.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { JsonObject, MessageInitShape } from "@bufbuild/protobuf";
|
|
2
2
|
import type { Client, Transport } from "@connectrpc/connect";
|
|
3
3
|
import type { RunState } from "./gen/xeonr/pipelines/v1/common_pb.js";
|
|
4
|
+
import type { IssueSeverity } from "./gen/xeonr/pipelines/v1/runs_pb.js";
|
|
4
5
|
import type { Definition } from "./gen/xeonr/pipelines/v1/definition_pb.js";
|
|
5
6
|
import { DefinitionSchema } from "./gen/xeonr/pipelines/v1/definition_pb.js";
|
|
6
7
|
import type { RetrySchema } from "./gen/xeonr/pipelines/v1/definition_pb.js";
|
|
7
8
|
import { RunsService } from "./gen/xeonr/pipelines/v1/runs_pb.js";
|
|
8
|
-
import type { Exclusion, ExclusionSchema, GetRunGraphResponse, Run } from "./gen/xeonr/pipelines/v1/runs_pb.js";
|
|
9
|
+
import type { Exclusion, ExclusionSchema, GetRunGraphResponse, GetRunTraceResponse, Run, RunIssue } from "./gen/xeonr/pipelines/v1/runs_pb.js";
|
|
9
10
|
import type { Connection } from "./transport.js";
|
|
10
11
|
/** Options for {@link PipelinesClient}: how to reach pipelines-api. */
|
|
11
12
|
export type PipelinesClientOptions = Connection & {
|
|
@@ -27,8 +28,29 @@ export interface CreateRunInput {
|
|
|
27
28
|
id: string;
|
|
28
29
|
json?: JsonObject;
|
|
29
30
|
};
|
|
30
|
-
/**
|
|
31
|
-
|
|
31
|
+
/**
|
|
32
|
+
* The definition to run, as a message or its init shape. Give this or
|
|
33
|
+
* `pipeline`.
|
|
34
|
+
*/
|
|
35
|
+
definition?: Definition | MessageInitShape<typeof DefinitionSchema>;
|
|
36
|
+
/**
|
|
37
|
+
* A published version of a stored pipeline (PipelinesService) to run
|
|
38
|
+
* instead of an inline definition: by id, or by its tenant, scope and
|
|
39
|
+
* name; `version` 0 (the default) runs the latest. Its declared variables
|
|
40
|
+
* are checked and defaulted by the platform.
|
|
41
|
+
*/
|
|
42
|
+
pipeline?: {
|
|
43
|
+
id: string;
|
|
44
|
+
version?: number;
|
|
45
|
+
} | {
|
|
46
|
+
name: string;
|
|
47
|
+
scope: {
|
|
48
|
+
kind: string;
|
|
49
|
+
id: string;
|
|
50
|
+
};
|
|
51
|
+
product?: string;
|
|
52
|
+
version?: number;
|
|
53
|
+
};
|
|
32
54
|
/** Facts about the run the product vouches for (tiers and secret policies read them). */
|
|
33
55
|
attestedFacts?: JsonObject;
|
|
34
56
|
/** Per-run values, read as `${{ variables.<name> }}`. Never secrets. */
|
|
@@ -62,8 +84,20 @@ export interface CreateJobInput {
|
|
|
62
84
|
* `PermanentError` is still never retried. `max` is at most 10.
|
|
63
85
|
*/
|
|
64
86
|
retry?: MessageInitShape<typeof RetrySchema>;
|
|
65
|
-
/** Bounds one attempt from its start. Unset is the
|
|
87
|
+
/** Bounds one attempt from its start. Unset is the queue's default, then the platform's. */
|
|
66
88
|
timeoutMs?: number;
|
|
89
|
+
/**
|
|
90
|
+
* The queue the job is admitted through, among this product's queues (the
|
|
91
|
+
* tenant's own of that name, else the product-wide one). Unset is the
|
|
92
|
+
* product's `default` queue. An unknown name is `not_found`; a `retry` or
|
|
93
|
+
* `timeoutMs` over the queue's ceiling is `invalid_argument`.
|
|
94
|
+
*/
|
|
95
|
+
queue?: string;
|
|
96
|
+
/**
|
|
97
|
+
* The handler is safe to run again from the start: an attempt its worker
|
|
98
|
+
* stops by shutting down is offered again without spending a retry.
|
|
99
|
+
*/
|
|
100
|
+
interruptible?: boolean;
|
|
67
101
|
}
|
|
68
102
|
/** A created run, and whether the idempotency key had been seen. */
|
|
69
103
|
export interface CreatedRun {
|
|
@@ -123,6 +157,31 @@ export declare class PipelinesClient {
|
|
|
123
157
|
* Asks a run to stop (`CancelRun`). Running attempts are told on their next
|
|
124
158
|
* heartbeat; an SDK worker aborts the handler's signal. Idempotent.
|
|
125
159
|
*/
|
|
160
|
+
/**
|
|
161
|
+
* Lists a run's issues (`ListIssues`): the non-fatal problems its steps
|
|
162
|
+
* reported, oldest first, optionally narrowed to a node, an attempt or a
|
|
163
|
+
* least severity. `Run` carries their counts.
|
|
164
|
+
*/
|
|
165
|
+
listIssues(runId: string, input?: {
|
|
166
|
+
nodeId?: string;
|
|
167
|
+
attemptId?: string;
|
|
168
|
+
minSeverity?: IssueSeverity;
|
|
169
|
+
cursor?: string;
|
|
170
|
+
limit?: number;
|
|
171
|
+
}, signal?: AbortSignal): Promise<{
|
|
172
|
+
issues: RunIssue[];
|
|
173
|
+
nextCursor: string;
|
|
174
|
+
}>;
|
|
175
|
+
/** Reads a run's trace (`GetRunTrace`): the platform's spans and those steps and handlers reported. */
|
|
176
|
+
getRunTrace(runId: string, input?: {
|
|
177
|
+
nodeId?: string;
|
|
178
|
+
attemptId?: string;
|
|
179
|
+
}, signal?: AbortSignal): Promise<GetRunTraceResponse>;
|
|
180
|
+
/**
|
|
181
|
+
* Runs one node of a finished run again (`RetryNode`). On a job (node
|
|
182
|
+
* `job`) this requeues a dead letter on its queue.
|
|
183
|
+
*/
|
|
184
|
+
retryNode(runId: string, nodeId: string, signal?: AbortSignal): Promise<Run>;
|
|
126
185
|
cancelRun(runId: string, reason?: string, signal?: AbortSignal): Promise<Run>;
|
|
127
186
|
private opts;
|
|
128
187
|
}
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGvE,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAkB,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,mBAAmB,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGvE,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAkB,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EA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BAAmB,CAAC;IAIzI;;;OAGG;IACG,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC;IAI5E,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC;IAInF,OAAO,CAAC,IAAI;CAGb"}
|
package/dist/client.js
CHANGED
|
@@ -34,7 +34,7 @@ export class PipelinesClient {
|
|
|
34
34
|
idempotencyKey: input.idempotencyKey,
|
|
35
35
|
tenant: input.tenant,
|
|
36
36
|
resource: resource(input.resource),
|
|
37
|
-
source:
|
|
37
|
+
source: runSource(input),
|
|
38
38
|
...(input.attestedFacts ? { attestedFacts: input.attestedFacts } : {}),
|
|
39
39
|
...(input.variables ? { variables: input.variables } : {}),
|
|
40
40
|
...(input.exclusion ? { exclusion: input.exclusion } : {}),
|
|
@@ -61,6 +61,8 @@ export class PipelinesClient {
|
|
|
61
61
|
...(input.delayMs ? { delay: durationFromMs(input.delayMs) } : {}),
|
|
62
62
|
...(input.resource ? { resource: resource(input.resource) } : {}),
|
|
63
63
|
...(input.retry ? { retry: input.retry } : {}),
|
|
64
|
+
...(input.queue ? { queue: input.queue } : {}),
|
|
65
|
+
...(input.interruptible ? { interruptible: true } : {}),
|
|
64
66
|
...(input.timeoutMs ? { timeout: durationFromMs(input.timeoutMs) } : {}),
|
|
65
67
|
}, this.opts(signal));
|
|
66
68
|
return { run: required(res.run), deduplicated: res.deduplicated };
|
|
@@ -88,6 +90,33 @@ export class PipelinesClient {
|
|
|
88
90
|
* Asks a run to stop (`CancelRun`). Running attempts are told on their next
|
|
89
91
|
* heartbeat; an SDK worker aborts the handler's signal. Idempotent.
|
|
90
92
|
*/
|
|
93
|
+
/**
|
|
94
|
+
* Lists a run's issues (`ListIssues`): the non-fatal problems its steps
|
|
95
|
+
* reported, oldest first, optionally narrowed to a node, an attempt or a
|
|
96
|
+
* least severity. `Run` carries their counts.
|
|
97
|
+
*/
|
|
98
|
+
async listIssues(runId, input = {}, signal) {
|
|
99
|
+
const res = await this.runs.listIssues({
|
|
100
|
+
runId,
|
|
101
|
+
nodeId: input.nodeId ?? "",
|
|
102
|
+
attemptId: input.attemptId ?? "",
|
|
103
|
+
minSeverity: input.minSeverity ?? 0,
|
|
104
|
+
cursor: input.cursor ?? "",
|
|
105
|
+
limit: input.limit ?? 0,
|
|
106
|
+
}, this.opts(signal));
|
|
107
|
+
return { issues: res.issues, nextCursor: res.nextCursor };
|
|
108
|
+
}
|
|
109
|
+
/** Reads a run's trace (`GetRunTrace`): the platform's spans and those steps and handlers reported. */
|
|
110
|
+
async getRunTrace(runId, input = {}, signal) {
|
|
111
|
+
return this.runs.getRunTrace({ runId, nodeId: input.nodeId ?? "", attemptId: input.attemptId ?? "" }, this.opts(signal));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Runs one node of a finished run again (`RetryNode`). On a job (node
|
|
115
|
+
* `job`) this requeues a dead letter on its queue.
|
|
116
|
+
*/
|
|
117
|
+
async retryNode(runId, nodeId, signal) {
|
|
118
|
+
return required((await this.runs.retryNode({ runId, nodeId }, this.opts(signal))).run);
|
|
119
|
+
}
|
|
91
120
|
async cancelRun(runId, reason, signal) {
|
|
92
121
|
return required((await this.runs.cancelRun({ runId, ...(reason ? { reason } : {}) }, this.opts(signal))).run);
|
|
93
122
|
}
|
|
@@ -103,4 +132,17 @@ function required(run) {
|
|
|
103
132
|
throw new Error("pipelines-api answered without a run");
|
|
104
133
|
return run;
|
|
105
134
|
}
|
|
135
|
+
function runSource(input) {
|
|
136
|
+
if (input.definition && input.pipeline)
|
|
137
|
+
throw new TypeError("createRun: give definition or pipeline, not both");
|
|
138
|
+
if (input.definition)
|
|
139
|
+
return { case: "inlineDefinition", value: create(DefinitionSchema, input.definition) };
|
|
140
|
+
const p = input.pipeline;
|
|
141
|
+
if (!p)
|
|
142
|
+
throw new TypeError("createRun: definition or pipeline is required");
|
|
143
|
+
const pipeline = "id" in p
|
|
144
|
+
? { case: "pipelineId", value: p.id }
|
|
145
|
+
: { case: "byName", value: { tenant: input.tenant, product: p.product ?? "", scope: p.scope, name: p.name } };
|
|
146
|
+
return { case: "pipeline", value: { pipeline, version: p.version ?? 0 } };
|
|
147
|
+
}
|
|
106
148
|
//# sourceMappingURL=client.js.map
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAKnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA8F7C;;;;;;;;GAQG;AACH,MAAM,OAAO,eAAe;IAC1B,uEAAuE;IAC9D,IAAI,CAA6B;IAC1C,0DAA0D;IACjD,SAAS,CAAY;IACb,SAAS,CAAS;IAEnC,YAAY,IAA4B;QACtC,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QACtD,IAA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