@camunda8/sdk 8.9.0-alpha.16 → 8.9.0-alpha.17
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/.eslintrc.json +79 -0
- package/AGENT.md +9 -0
- package/CHANGELOG.md +7 -0
- package/MAINTAINER.md +2 -1
- package/README.md +10 -1
- package/dist/zeebe/index.d.ts +1 -0
- package/dist/zeebe/index.js.map +1 -1
- package/dist/zeebe/lib/GrpcClient.d.ts +6 -0
- package/dist/zeebe/lib/GrpcClient.js +93 -85
- package/dist/zeebe/lib/GrpcClient.js.map +1 -1
- package/dist/zeebe/lib/StreamLifecycle.d.ts +189 -0
- package/dist/zeebe/lib/StreamLifecycle.js +142 -0
- package/dist/zeebe/lib/StreamLifecycle.js.map +1 -0
- package/dist/zeebe/lib/ZBStreamWorker.d.ts +3 -3
- package/dist/zeebe/lib/ZBStreamWorker.js +283 -140
- package/dist/zeebe/lib/ZBStreamWorker.js.map +1 -1
- package/dist/zeebe/zb/ZeebeGrpcClient.d.ts +6 -3
- package/dist/zeebe/zb/ZeebeGrpcClient.js +4 -0
- package/dist/zeebe/zb/ZeebeGrpcClient.js.map +1 -1
- package/package.json +6 -1
- package/scripts/assert-no-skipped-tests.d.ts +17 -0
- package/scripts/assert-no-skipped-tests.js +118 -0
- package/scripts/required-integration-specs.json +4 -0
- package/stryker.config.json +20 -0
- package/vitest.mutation.config.js +18 -0
package/.eslintrc.json
CHANGED
|
@@ -28,6 +28,85 @@
|
|
|
28
28
|
"import/newline-after-import": "error",
|
|
29
29
|
"prettier/prettier": "error"
|
|
30
30
|
},
|
|
31
|
+
"overrides": [
|
|
32
|
+
{
|
|
33
|
+
// Stream lifecycle (see src/zeebe/lib/StreamLifecycle.ts): stream workers
|
|
34
|
+
// must not attach listeners to a raw gRPC stream themselves. The adapter
|
|
35
|
+
// owns that, and requires a handler for every event. The selectors match
|
|
36
|
+
// on the receiver's name, because the rule has no type information.
|
|
37
|
+
//
|
|
38
|
+
// GrpcClient.ts (the transport that creates streams), ZBWorkerBase.ts (the
|
|
39
|
+
// long-poll worker, which has its own handling) and ZeebeGrpcClient.ts
|
|
40
|
+
// (activateJobs, a finite request/response stream) are existing call
|
|
41
|
+
// sites and are exempt for now.
|
|
42
|
+
"files": ["src/zeebe/**/*.ts"],
|
|
43
|
+
"excludedFiles": [
|
|
44
|
+
"src/zeebe/lib/StreamLifecycle.ts",
|
|
45
|
+
"src/zeebe/lib/GrpcClient.ts",
|
|
46
|
+
"src/zeebe/lib/ZBWorkerBase.ts",
|
|
47
|
+
"src/zeebe/zb/ZeebeGrpcClient.ts"
|
|
48
|
+
],
|
|
49
|
+
"rules": {
|
|
50
|
+
"no-restricted-syntax": [
|
|
51
|
+
"error",
|
|
52
|
+
{
|
|
53
|
+
"selector": "CallExpression[callee.property.name=/^(on|once|addListener|prependListener|prependOnceListener)$/][callee.object.name=/stream/i]",
|
|
54
|
+
"message": "Do not attach listeners to a gRPC stream directly. Use attachStream() from src/zeebe/lib/StreamLifecycle.ts, which requires handlers for data, error, end and close."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"selector": "CallExpression[callee.property.name=/^(on|once|addListener|prependListener|prependOnceListener)$/][callee.object.property.name=/stream/i]",
|
|
58
|
+
"message": "Do not attach listeners to a gRPC stream directly. Use attachStream() from src/zeebe/lib/StreamLifecycle.ts, which requires handlers for data, error, end and close."
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
// Stream workers must not name the raw gRPC stream types, so they cannot
|
|
65
|
+
// hold a typed reference to a stream and attach listeners to it.
|
|
66
|
+
"files": ["src/zeebe/**/*.ts"],
|
|
67
|
+
"excludedFiles": [
|
|
68
|
+
"src/zeebe/lib/StreamLifecycle.ts",
|
|
69
|
+
"src/zeebe/lib/GrpcClient.ts",
|
|
70
|
+
"src/zeebe/lib/ZBWorkerBase.ts",
|
|
71
|
+
"src/zeebe/lib/interfaces-1.0.ts"
|
|
72
|
+
],
|
|
73
|
+
"rules": {
|
|
74
|
+
"no-restricted-imports": [
|
|
75
|
+
"error",
|
|
76
|
+
{
|
|
77
|
+
"paths": [
|
|
78
|
+
{
|
|
79
|
+
"name": "@grpc/grpc-js",
|
|
80
|
+
"importNames": [
|
|
81
|
+
"ClientReadableStream",
|
|
82
|
+
"ClientDuplexStream",
|
|
83
|
+
"ClientWritableStream"
|
|
84
|
+
],
|
|
85
|
+
"message": "Stream workers must go through src/zeebe/lib/StreamLifecycle.ts instead of using the raw gRPC stream types."
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
// Stream modules: a failure must reach the caller or the logger, never
|
|
94
|
+
// vanish. `no-console` is scoped to these files because the rest of the
|
|
95
|
+
// library still logs to the console in places; widening it is a
|
|
96
|
+
// separate clean-up. `no-floating-promises` needs type information.
|
|
97
|
+
"files": [
|
|
98
|
+
"src/zeebe/lib/StreamLifecycle.ts",
|
|
99
|
+
"src/zeebe/lib/ZBStreamWorker.ts"
|
|
100
|
+
],
|
|
101
|
+
"parserOptions": {
|
|
102
|
+
"project": "./tsconfig.json"
|
|
103
|
+
},
|
|
104
|
+
"rules": {
|
|
105
|
+
"no-console": "error",
|
|
106
|
+
"@typescript-eslint/no-floating-promises": "error"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
],
|
|
31
110
|
"env": {
|
|
32
111
|
"node": true
|
|
33
112
|
}
|
package/AGENT.md
CHANGED
|
@@ -90,6 +90,7 @@ npm run test:8.7:sm # 8.7 self-managed integration
|
|
|
90
90
|
npm run test:8.7:mt # 8.7 multi-tenancy integration
|
|
91
91
|
npm run test:8.7:saas # 8.7 SaaS integration
|
|
92
92
|
npm run test:c8run # C8Run integration
|
|
93
|
+
npm run test:mutation # Stryker mutation tests of the stream lifecycle modules (several minutes)
|
|
93
94
|
```
|
|
94
95
|
|
|
95
96
|
Run a single test file:
|
|
@@ -341,6 +342,14 @@ async searchEntities(
|
|
|
341
342
|
- Local integration: `*local-integration.spec.ts` — local Docker setup.
|
|
342
343
|
- Tests are organized by component and version under `src/__tests__/`.
|
|
343
344
|
|
|
345
|
+
### Streaming operations (long-lived streams and background loops)
|
|
346
|
+
|
|
347
|
+
A stream, subscription or background loop that fails without the caller being able to see it, and without recovering, is a defect class this repository guards against in three layers. Follow them when adding or changing one:
|
|
348
|
+
|
|
349
|
+
1. **Types and lint.** Listen to a raw gRPC stream only through `attachStream()` in `src/zeebe/lib/StreamLifecycle.ts`, whose handler contract requires `data`, `error`, `end` and `close`. A streaming method returns a `StreamHandle` (`close()`, `state`, `done`). ESLint forbids listeners on streams, naming the raw gRPC stream types, `console.*` and floating promises in the stream modules.
|
|
350
|
+
2. **Conformance registry.** `src/__tests__/zeebe/conformance/registry.ts` has one entry per method of `ZeebeGrpcClient` that returns a `StreamHandle`; `tsc` (`npm run typecheck:tests`) fails if a streaming method has no entry. The shared suite runs every entry against a fake transport for errors, graceful ends, open failures, close and leaks.
|
|
351
|
+
3. **CI.** `src/__tests__/zeebe/integration/StreamJobs.FaultInjection.spec.ts` cuts the connection to a real broker with `TcpFaultProxy`. `scripts/required-integration-specs.json` lists the integration specs that must run and pass (none skipped) in the broker jobs, enforced by `npm run test:assert-required-ran`. `npm run test:mutation` mutates the stream modules; a score below the `break` threshold in `stryker.config.json` fails the `Mutation Tests` workflow.
|
|
352
|
+
|
|
344
353
|
### Test Environment Variables
|
|
345
354
|
|
|
346
355
|
- `CAMUNDA_UNIT_TEST=true` — forces unit-test mode.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [8.9.0-alpha.17](https://github.com/camunda/camunda-8-js-sdk/compare/v8.9.0-alpha.16...v8.9.0-alpha.17) (2026-11-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **zeebe:** drain a job backlog in ZBStreamWorker instead of one batch per poll interval ([#872](https://github.com/camunda/camunda-8-js-sdk/issues/872)) ([f3c8f25](https://github.com/camunda/camunda-8-js-sdk/commit/f3c8f25158f83612990eb83ec87035f9d66ab897))
|
|
7
|
+
|
|
1
8
|
# [8.9.0-alpha.16](https://github.com/camunda/camunda-8-js-sdk/compare/v8.9.0-alpha.15...v8.9.0-alpha.16) (2026-11-03)
|
|
2
9
|
|
|
3
10
|
|
package/MAINTAINER.md
CHANGED
|
@@ -44,12 +44,13 @@ All workflows live under [.github/workflows/](.github/workflows/).
|
|
|
44
44
|
|
|
45
45
|
| Workflow | Trigger | Purpose |
|
|
46
46
|
| ----------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
47
|
-
| `ci.yml` | push to feature branches, all PRs | Fast feedback for contributors. Unit tests + 8.8 SM integration. Heavier 8.7 jobs are PR-only and gated by environment. |
|
|
47
|
+
| `ci.yml` | push to feature branches, all PRs | Fast feedback for contributors. Unit tests + 8.8 SM integration. The 8.8 SM jobs also run `npm run test:assert-required-ran`, which fails if the specs in `scripts/required-integration-specs.json` were skipped. Heavier 8.7 jobs are PR-only and gated by environment. |
|
|
48
48
|
| `release.yml` | push to `main` or `stable/**`, manual dispatch | Full integration suite **plus** semantic-release publish step. |
|
|
49
49
|
| `commitlint.yml` | PR | Enforces conventional commits. |
|
|
50
50
|
| `code-scanning.yml` | scheduled / push | CodeQL. |
|
|
51
51
|
| `backport.yml` | PR closed, `/backport` comment | Creates backport PRs (e.g. `main` → `stable/8.8`) via `korthout/backport-action`. |
|
|
52
52
|
| `integration-test-matrix.yml` | scheduled (02:00 UTC), manual dispatch | Cross-version client × server compatibility matrix. Runs from `main` and tests released SDK versions (from git tags) ≥ the current minor against released server versions from the **next** minor onwards, plus `SNAPSHOT`. |
|
|
53
|
+
| `mutation.yml` | PRs touching the stream modules or their tests, manual dispatch | Stryker mutation tests of the stream lifecycle modules (`npm run test:mutation`). Unit tests only; fails below the `break` threshold in `stryker.config.json`. |
|
|
53
54
|
|
|
54
55
|
### CI vs. Release: why feature branches and `main`/`stable/**` are separated
|
|
55
56
|
|
package/README.md
CHANGED
|
@@ -755,7 +755,16 @@ Observe and configure this with:
|
|
|
755
755
|
|
|
756
756
|
The callbacks may be `async`. Exceptions thrown by these callbacks, and rejections of any promise they return, are caught and logged; they do not affect reconnection. If the stream cannot be opened on the first attempt and `streamReconnect` is `false`, the promise returned by `streamJobs` rejects with the underlying error.
|
|
757
757
|
|
|
758
|
-
`streamJobs` returns a promise, so `await` it to obtain the handle
|
|
758
|
+
`streamJobs` returns a promise, so `await` it to obtain the handle. Besides `close()`, the handle reports the state of the job stream:
|
|
759
|
+
|
|
760
|
+
- **`state`** — the current state: `{ status: 'open' }`, `{ status: 'reconnecting', attempt, cause }` while a dead stream is being re-opened, or `{ status: 'closed', reason }`. `reason.kind` is `closed-by-caller`, `client-closed`, or `stream-failed` (reconnection is disabled and the stream died; the sidecar poll keeps running until you call `close()`).
|
|
761
|
+
- **`done`** — a promise that resolves (it never rejects) with the closed `reason` when the handle reaches `closed`.
|
|
762
|
+
|
|
763
|
+
```typescript
|
|
764
|
+
const handle = await client.streamJobs({ /* ... */ })
|
|
765
|
+
console.log(handle.state.status) // 'open'
|
|
766
|
+
handle.done.then((reason) => console.log('Job stream closed:', reason.kind))
|
|
767
|
+
```
|
|
759
768
|
|
|
760
769
|
You can optionally pass a `jitter` parameter (in milliseconds) to delay the start by a random period up to that value. This is useful when starting multiple stream workers simultaneously, to avoid saturating the gateway at application startup.
|
|
761
770
|
|
package/dist/zeebe/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { Duration } from 'typed-duration';
|
|
|
2
2
|
export { BpmnParser } from './lib/BpmnParser';
|
|
3
3
|
import { ZBLogger } from './lib/ZBLogger';
|
|
4
4
|
import * as GrpcInterfaces from './lib/interfaces-grpc-1.0';
|
|
5
|
+
export type { StreamClosedReason, StreamFailure, StreamHandle, StreamState, } from './lib/StreamLifecycle';
|
|
5
6
|
export * from './zb/ZBWorker';
|
|
6
7
|
export * from './zb/ZeebeGrpcClient';
|
|
7
8
|
/** @namespace */
|
package/dist/zeebe/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/zeebe/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAyC;AAAhC,0GAAA,QAAQ,OAAA;AACjB,+CAA6C;AAApC,wGAAA,UAAU,OAAA;AACnB,qDAAmD;AACnD,qDAAiD;AACjD,6CAAyC;AACzC,iEAAkD;AAClD,0EAA2D;AAC3D,uFAAwE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/zeebe/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAyC;AAAhC,0GAAA,QAAQ,OAAA;AACjB,+CAA6C;AAApC,wGAAA,UAAU,OAAA;AACnB,qDAAmD;AACnD,qDAAiD;AACjD,6CAAyC;AACzC,iEAAkD;AAClD,0EAA2D;AAC3D,uFAAwE;AAQxE,gDAA6B;AAC7B,uDAAoC;AAEpC,iBAAiB;AACJ,QAAA,KAAK,GAAG;IACpB,GAAG,UAAU;IACb,GAAG,cAAc;IACjB,GAAG,iBAAiB;CACpB,CAAA;AAEY,QAAA,OAAO,GAAG;IACtB,YAAY,EAAZ,2BAAY;IACZ,QAAQ,EAAR,mBAAQ;IACR,cAAc,EAAd,6BAAc;CACd,CAAA"}
|
|
@@ -43,6 +43,12 @@ export interface CustomSSL {
|
|
|
43
43
|
certChain?: Buffer;
|
|
44
44
|
verifyOptions?: VerifyOptions;
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* The gRPC channel arguments for a Zeebe client. Extracted so that the
|
|
48
|
+
* liveness settings (HTTP/2 keepalive pings, which are what detects a stream
|
|
49
|
+
* whose connection died silently) can be asserted in a unit test.
|
|
50
|
+
*/
|
|
51
|
+
export declare const buildGrpcChannelOptions: (settings: CamundaPlatform8Configuration["zeebeGrpcSettings"]) => Record<string, string | number>;
|
|
46
52
|
export declare class GrpcClient extends EventEmitter {
|
|
47
53
|
channelClosed: boolean;
|
|
48
54
|
longPoll?: MaybeTimeDuration;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.GrpcClient = exports.MiddlewareSignals = void 0;
|
|
6
|
+
exports.GrpcClient = exports.buildGrpcChannelOptions = exports.MiddlewareSignals = void 0;
|
|
7
7
|
const events_1 = require("events");
|
|
8
8
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
9
9
|
const proto_loader_1 = require("@grpc/proto-loader");
|
|
@@ -73,6 +73,97 @@ const connectivityState = [
|
|
|
73
73
|
'TRANSIENT_FAILURE',
|
|
74
74
|
'SHUTDOWN',
|
|
75
75
|
];
|
|
76
|
+
/**
|
|
77
|
+
* The gRPC channel arguments for a Zeebe client. Extracted so that the
|
|
78
|
+
* liveness settings (HTTP/2 keepalive pings, which are what detects a stream
|
|
79
|
+
* whose connection died silently) can be asserted in a unit test.
|
|
80
|
+
*/
|
|
81
|
+
const buildGrpcChannelOptions = (settings) => ({
|
|
82
|
+
/**
|
|
83
|
+
* If set to zero, disables retry behavior.
|
|
84
|
+
* Otherwise, transparent retries are enabled for all RPCs,
|
|
85
|
+
* and configurable retries are enabled when they are configured
|
|
86
|
+
* via the service config. For details, see:
|
|
87
|
+
* https://github.com/grpc/proposal/blob/master/A6-client-retries.md
|
|
88
|
+
*/
|
|
89
|
+
'grpc.enable_retries': 1,
|
|
90
|
+
/**
|
|
91
|
+
* The time between the first and second connection attempts,
|
|
92
|
+
* in ms
|
|
93
|
+
*/
|
|
94
|
+
'grpc.initial_reconnect_backoff_ms': settings.GRPC_INITIAL_RECONNECT_BACKOFF_MS,
|
|
95
|
+
/**
|
|
96
|
+
* The maximum time between subsequent connection attempts,
|
|
97
|
+
* in ms
|
|
98
|
+
*/
|
|
99
|
+
'grpc.max_reconnect_backoff_ms': settings.GRPC_MAX_RECONNECT_BACKOFF_MS,
|
|
100
|
+
/**
|
|
101
|
+
* The minimum time between subsequent connection attempts,
|
|
102
|
+
* in ms. Default is 1000ms, but this can cause an SSL Handshake failure.
|
|
103
|
+
* This causes an intermittent failure in the Worker-LongPoll test when run
|
|
104
|
+
* against Camunda Cloud.
|
|
105
|
+
* Raised to 5000ms.
|
|
106
|
+
* See: https://github.com/grpc/grpc/issues/8382#issuecomment-259482949
|
|
107
|
+
*/
|
|
108
|
+
'grpc.min_reconnect_backoff_ms': settings.GRPC_INITIAL_RECONNECT_BACKOFF_MS,
|
|
109
|
+
/**
|
|
110
|
+
* After a duration of this time the client/server
|
|
111
|
+
* pings its peer to see if the transport is still alive.
|
|
112
|
+
* Int valued, milliseconds.
|
|
113
|
+
*/
|
|
114
|
+
'grpc.keepalive_time_ms': settings.GRPC_KEEPALIVE_TIME_MS,
|
|
115
|
+
/**
|
|
116
|
+
* After waiting for a duration of this time,
|
|
117
|
+
* if the keepalive ping sender does
|
|
118
|
+
* not receive the ping ack, it will close the
|
|
119
|
+
* transport. Int valued, milliseconds.
|
|
120
|
+
*/
|
|
121
|
+
'grpc.keepalive_timeout_ms': settings.GRPC_KEEPALIVE_TIMEOUT_MS,
|
|
122
|
+
'grpc.http2.min_time_between_pings_ms': settings.GRPC_HTTP2_MIN_TIME_BETWEEN_PINGS_MS,
|
|
123
|
+
/**
|
|
124
|
+
* Minimum allowed time between a server receiving
|
|
125
|
+
* successive ping frames without sending any data
|
|
126
|
+
* frame. Int valued, milliseconds. Default: 90000
|
|
127
|
+
*/
|
|
128
|
+
'grpc.http2.min_ping_interval_without_data_ms': settings.GRPC_HTTP2_MIN_PING_INTERVAL_WITHOUT_DATA_MS,
|
|
129
|
+
/**
|
|
130
|
+
* This channel argument if set to 1
|
|
131
|
+
* (0 : false; 1 : true), allows keepalive pings
|
|
132
|
+
* to be sent even if there are no calls in flight.
|
|
133
|
+
* Default is 1.
|
|
134
|
+
*/
|
|
135
|
+
'grpc.keepalive_permit_without_calls': settings.GRPC_KEEPALIVE_PERMIT_WITHOUT_CALLS,
|
|
136
|
+
/**
|
|
137
|
+
* This channel argument controls the maximum number
|
|
138
|
+
* of pings that can be sent when there is no other
|
|
139
|
+
* data (data frame or header frame) to be sent.
|
|
140
|
+
* GRPC Core will not continue sending pings if we
|
|
141
|
+
* run over the limit. Setting it to 0 allows sending
|
|
142
|
+
* pings without sending data.
|
|
143
|
+
*/
|
|
144
|
+
'grpc.http2.max_pings_without_data': settings.GRPC_HTTP2_MAX_PINGS_WITHOUT_DATA,
|
|
145
|
+
/**
|
|
146
|
+
* Default compression algorithm for the channel, applies to sending messages.
|
|
147
|
+
*
|
|
148
|
+
* Possible values for this option are:
|
|
149
|
+
* - `0` - No compression
|
|
150
|
+
* - `1` - Compress with DEFLATE algorithm
|
|
151
|
+
* - `2` - Compress with GZIP algorithm
|
|
152
|
+
* - `3` - Stream compression with GZIP algorithm
|
|
153
|
+
*/
|
|
154
|
+
'grpc.default_compression_algorithm': 2,
|
|
155
|
+
/**
|
|
156
|
+
* Default compression level for the channel, applies to receiving messages.
|
|
157
|
+
*
|
|
158
|
+
* Possible values for this option are:
|
|
159
|
+
* - `0` - None
|
|
160
|
+
* - `1` - Low level
|
|
161
|
+
* - `2` - Medium level
|
|
162
|
+
* - `3` - High level
|
|
163
|
+
*/
|
|
164
|
+
'grpc.default_compression_level': 2,
|
|
165
|
+
});
|
|
166
|
+
exports.buildGrpcChannelOptions = buildGrpcChannelOptions;
|
|
76
167
|
class GrpcClient extends events_1.EventEmitter {
|
|
77
168
|
constructor({ config, connectionTolerance, host, oAuth, options = {}, packageName, protoPath, service, useTLS, customSSL, }) {
|
|
78
169
|
super();
|
|
@@ -155,90 +246,7 @@ class GrpcClient extends events_1.EventEmitter {
|
|
|
155
246
|
debug('channelCredentials:', channelCredentials);
|
|
156
247
|
// Options documented here: https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/grpc_types.h
|
|
157
248
|
this.client = new proto[service](host, channelCredentials, {
|
|
158
|
-
|
|
159
|
-
* If set to zero, disables retry behavior.
|
|
160
|
-
* Otherwise, transparent retries are enabled for all RPCs,
|
|
161
|
-
* and configurable retries are enabled when they are configured
|
|
162
|
-
* via the service config. For details, see:
|
|
163
|
-
* https://github.com/grpc/proposal/blob/master/A6-client-retries.md
|
|
164
|
-
*/
|
|
165
|
-
'grpc.enable_retries': 1,
|
|
166
|
-
/**
|
|
167
|
-
* The time between the first and second connection attempts,
|
|
168
|
-
* in ms
|
|
169
|
-
*/
|
|
170
|
-
'grpc.initial_reconnect_backoff_ms': this.config.zeebeGrpcSettings.GRPC_INITIAL_RECONNECT_BACKOFF_MS,
|
|
171
|
-
/**
|
|
172
|
-
* The maximum time between subsequent connection attempts,
|
|
173
|
-
* in ms
|
|
174
|
-
*/
|
|
175
|
-
'grpc.max_reconnect_backoff_ms': this.config.zeebeGrpcSettings.GRPC_MAX_RECONNECT_BACKOFF_MS,
|
|
176
|
-
/**
|
|
177
|
-
* The minimum time between subsequent connection attempts,
|
|
178
|
-
* in ms. Default is 1000ms, but this can cause an SSL Handshake failure.
|
|
179
|
-
* This causes an intermittent failure in the Worker-LongPoll test when run
|
|
180
|
-
* against Camunda Cloud.
|
|
181
|
-
* Raised to 5000ms.
|
|
182
|
-
* See: https://github.com/grpc/grpc/issues/8382#issuecomment-259482949
|
|
183
|
-
*/
|
|
184
|
-
'grpc.min_reconnect_backoff_ms': this.config.zeebeGrpcSettings.GRPC_INITIAL_RECONNECT_BACKOFF_MS,
|
|
185
|
-
/**
|
|
186
|
-
* After a duration of this time the client/server
|
|
187
|
-
* pings its peer to see if the transport is still alive.
|
|
188
|
-
* Int valued, milliseconds.
|
|
189
|
-
*/
|
|
190
|
-
'grpc.keepalive_time_ms': this.config.zeebeGrpcSettings.GRPC_KEEPALIVE_TIME_MS,
|
|
191
|
-
/**
|
|
192
|
-
* After waiting for a duration of this time,
|
|
193
|
-
* if the keepalive ping sender does
|
|
194
|
-
* not receive the ping ack, it will close the
|
|
195
|
-
* transport. Int valued, milliseconds.
|
|
196
|
-
*/
|
|
197
|
-
'grpc.keepalive_timeout_ms': this.config.zeebeGrpcSettings.GRPC_KEEPALIVE_TIMEOUT_MS,
|
|
198
|
-
'grpc.http2.min_time_between_pings_ms': this.config.zeebeGrpcSettings.GRPC_HTTP2_MIN_TIME_BETWEEN_PINGS_MS,
|
|
199
|
-
/**
|
|
200
|
-
* Minimum allowed time between a server receiving
|
|
201
|
-
* successive ping frames without sending any data
|
|
202
|
-
* frame. Int valued, milliseconds. Default: 90000
|
|
203
|
-
*/
|
|
204
|
-
'grpc.http2.min_ping_interval_without_data_ms': this.config.zeebeGrpcSettings
|
|
205
|
-
.GRPC_HTTP2_MIN_PING_INTERVAL_WITHOUT_DATA_MS,
|
|
206
|
-
/**
|
|
207
|
-
* This channel argument if set to 1
|
|
208
|
-
* (0 : false; 1 : true), allows keepalive pings
|
|
209
|
-
* to be sent even if there are no calls in flight.
|
|
210
|
-
* Default is 1.
|
|
211
|
-
*/
|
|
212
|
-
'grpc.keepalive_permit_without_calls': this.config.zeebeGrpcSettings.GRPC_KEEPALIVE_PERMIT_WITHOUT_CALLS,
|
|
213
|
-
/**
|
|
214
|
-
* This channel argument controls the maximum number
|
|
215
|
-
* of pings that can be sent when there is no other
|
|
216
|
-
* data (data frame or header frame) to be sent.
|
|
217
|
-
* GRPC Core will not continue sending pings if we
|
|
218
|
-
* run over the limit. Setting it to 0 allows sending
|
|
219
|
-
* pings without sending data.
|
|
220
|
-
*/
|
|
221
|
-
'grpc.http2.max_pings_without_data': this.config.zeebeGrpcSettings.GRPC_HTTP2_MAX_PINGS_WITHOUT_DATA,
|
|
222
|
-
/**
|
|
223
|
-
* Default compression algorithm for the channel, applies to sending messages.
|
|
224
|
-
*
|
|
225
|
-
* Possible values for this option are:
|
|
226
|
-
* - `0` - No compression
|
|
227
|
-
* - `1` - Compress with DEFLATE algorithm
|
|
228
|
-
* - `2` - Compress with GZIP algorithm
|
|
229
|
-
* - `3` - Stream compression with GZIP algorithm
|
|
230
|
-
*/
|
|
231
|
-
'grpc.default_compression_algorithm': 2,
|
|
232
|
-
/**
|
|
233
|
-
* Default compression level for the channel, applies to receiving messages.
|
|
234
|
-
*
|
|
235
|
-
* Possible values for this option are:
|
|
236
|
-
* - `0` - None
|
|
237
|
-
* - `1` - Low level
|
|
238
|
-
* - `2` - Medium level
|
|
239
|
-
* - `3` - High level
|
|
240
|
-
*/
|
|
241
|
-
'grpc.default_compression_level': 2,
|
|
249
|
+
...(0, exports.buildGrpcChannelOptions)(this.config.zeebeGrpcSettings),
|
|
242
250
|
interceptors: [this.interceptor],
|
|
243
251
|
});
|
|
244
252
|
this.listNameMethods = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GrpcClient.js","sourceRoot":"","sources":["../../../src/zeebe/lib/GrpcClient.ts"],"names":[],"mappings":";;;;;;AAAA,mCAAqC;AAErC,2CASsB;AACtB,qDAAyE;AACzE,kDAAqB;AACrB,mDAA0E;AAE1E,mCAAgF;AAChF,yEAAqE;AAGrE,2CAAuC;AAGvC,MAAM,KAAK,GAAG,IAAA,eAAC,EAAC,cAAc,CAAC,CAAA;AAC/B,MAAM,aAAa,GAAG,2CAAoB,CAAC,WAAW,EAAE,CAAA;AAMxD,2CAA2C;AAE3C,SAAS,sCAAsC,CAG7C,IAAO;IACR,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAA;IACZ,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CACjC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAA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,IAAI,CAAC,IAAI,CAAC,yBAAiB,CAAC,GAAG,CAAC,KAAK,EAAE,+BAA+B,CAAC,CAAA;YACvE,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YAC7B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;QAC5B,CAAC;QACD,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;QACtB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACrB,IAAI,CAAC,IAAI,CACR,yBAAiB,CAAC,GAAG,CAAC,KAAK,EAC3B,sCAAsC,IAAI,CAAC,mBAAmB,IAAI,CAClE,CAAA;YACD,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;gBAChC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;oBACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;oBAC1B,IAAI,CAAC,IAAI,CACR,yBAAiB,CAAC,GAAG,CAAC,KAAK,EAC3B,6DAA6D,CAC7D,CAAA;oBACD,OAAM;gBACP,CAAC;gBACD,IAAI,CAAC,IAAI,CACR,yBAAiB,CAAC,GAAG,CAAC,KAAK,EAC3B,0CAA0C,IAAI,CAAC,mBAAmB,IAAI,CACtE,CAAA;gBACD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;gBAC1B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;gBACtB,IAAI,CAAC,IAAI,CAAC,yBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YACzC,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAA;QAC7B,CAAC;IACF,CAAC;CAgDD;AAjhBD,gCAihBC"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import type { ClientReadableStream } from '@grpc/grpc-js';
|
|
2
|
+
/**
|
|
3
|
+
* Stream lifecycle adapter.
|
|
4
|
+
*
|
|
5
|
+
* A long-lived gRPC stream has four ways to stop delivering: it errors, the
|
|
6
|
+
* server ends it, the connection hangs silently, or it cannot be opened. This
|
|
7
|
+
* module exists so that none of them can go unobserved:
|
|
8
|
+
*
|
|
9
|
+
* - `attachStream` is the ONLY code in the SDK's stream workers that attaches
|
|
10
|
+
* listeners to a raw gRPC stream. Its handler contract, `StreamHandlers`,
|
|
11
|
+
* requires a handler for every event. Omitting `error` (the classic
|
|
12
|
+
* `stream.on('data', ...)` with a `console.error` on the side) does not
|
|
13
|
+
* compile. ESLint rules (see `.eslintrc.json`) forbid attaching listeners to
|
|
14
|
+
* a stream anywhere else in the stream modules.
|
|
15
|
+
* - `StreamHandle` is the branded value that a streaming API returns. It has a
|
|
16
|
+
* failure channel: `state` (a discriminated union) and `done` (a promise of
|
|
17
|
+
* the terminal reason). An API whose return type is not a `StreamHandle`
|
|
18
|
+
* is not a streaming API as far as the conformance registry is concerned.
|
|
19
|
+
*
|
|
20
|
+
* The conformance registry in `src/__tests__/zeebe/conformance` derives the set
|
|
21
|
+
* of streaming operations from the return types of `ZeebeGrpcClient`, so
|
|
22
|
+
* adding a streaming method without registering it fails `tsc`.
|
|
23
|
+
*/
|
|
24
|
+
/** Why a stream stopped delivering. */
|
|
25
|
+
export type StreamFailure =
|
|
26
|
+
/** The stream emitted an `error` event. */
|
|
27
|
+
{
|
|
28
|
+
readonly kind: 'error';
|
|
29
|
+
readonly error: Error;
|
|
30
|
+
}
|
|
31
|
+
/** The server ended or closed the stream without an error. */
|
|
32
|
+
| {
|
|
33
|
+
readonly kind: 'end';
|
|
34
|
+
}
|
|
35
|
+
/** The stream could not be opened. */
|
|
36
|
+
| {
|
|
37
|
+
readonly kind: 'open-failed';
|
|
38
|
+
readonly error: Error;
|
|
39
|
+
};
|
|
40
|
+
/** Why a handle reached its terminal `closed` state. */
|
|
41
|
+
export type StreamClosedReason =
|
|
42
|
+
/** `close()` was called on the handle. */
|
|
43
|
+
{
|
|
44
|
+
readonly kind: 'closed-by-caller';
|
|
45
|
+
}
|
|
46
|
+
/** The owning client was closed. */
|
|
47
|
+
| {
|
|
48
|
+
readonly kind: 'client-closed';
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The stream failed and reconnection is disabled, so it will not be
|
|
52
|
+
* re-opened. Other work owned by the handle (for example `streamJobs`'
|
|
53
|
+
* sidecar poll) keeps running until `close()` is called.
|
|
54
|
+
*/
|
|
55
|
+
| {
|
|
56
|
+
readonly kind: 'stream-failed';
|
|
57
|
+
readonly failure: StreamFailure;
|
|
58
|
+
};
|
|
59
|
+
/** The observable state of a stream handle. */
|
|
60
|
+
export type StreamState =
|
|
61
|
+
/** The stream is established. */
|
|
62
|
+
{
|
|
63
|
+
readonly status: 'open';
|
|
64
|
+
}
|
|
65
|
+
/** The stream is down and a re-open attempt is scheduled or in flight. */
|
|
66
|
+
| {
|
|
67
|
+
readonly status: 'reconnecting';
|
|
68
|
+
/** Consecutive failed streams or open attempts, starting at 1. */
|
|
69
|
+
readonly attempt: number;
|
|
70
|
+
readonly cause: StreamFailure;
|
|
71
|
+
}
|
|
72
|
+
/** Terminal: the stream is down and will not be re-opened. */
|
|
73
|
+
| {
|
|
74
|
+
readonly status: 'closed';
|
|
75
|
+
readonly reason: StreamClosedReason;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* The listener contract for a raw stream. Every key is required: leaving one
|
|
79
|
+
* out is a compile error, so "forgot to handle `error`" cannot be written.
|
|
80
|
+
*/
|
|
81
|
+
export interface StreamHandlers<T> {
|
|
82
|
+
/** One item was received. Must not throw; if it does it is treated as a stream `error`. */
|
|
83
|
+
readonly data: (item: T) => void;
|
|
84
|
+
/**
|
|
85
|
+
* The stream failed. Called at most once per stream, and never after `end`
|
|
86
|
+
* for the same stream.
|
|
87
|
+
*/
|
|
88
|
+
readonly error: (error: Error) => void;
|
|
89
|
+
/**
|
|
90
|
+
* The server ended the stream (an `end` event, or a `close` with no prior
|
|
91
|
+
* `end` or `error`). Called at most once per stream, and never after `error`
|
|
92
|
+
* for the same stream.
|
|
93
|
+
*/
|
|
94
|
+
readonly end: () => void;
|
|
95
|
+
/**
|
|
96
|
+
* Called exactly once per stream, immediately after the `error` or `end`
|
|
97
|
+
* handler, so that the stream's resources can be released and recovery
|
|
98
|
+
* scheduled in one place. Not called after `dispose()`.
|
|
99
|
+
*/
|
|
100
|
+
readonly close: () => void;
|
|
101
|
+
}
|
|
102
|
+
export interface StreamAttachment {
|
|
103
|
+
/**
|
|
104
|
+
* Cancel and destroy the stream and suppress all further handler calls.
|
|
105
|
+
* The adapter's own listeners stay attached on purpose: removing the
|
|
106
|
+
* `error` listener from a stream that is then cancelled would turn the
|
|
107
|
+
* resulting CANCELLED `error` event into an uncaught exception.
|
|
108
|
+
*/
|
|
109
|
+
readonly dispose: () => void;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Narrow the value that a stream-opening call resolved to (after
|
|
113
|
+
* `getOpenError` found no error) to a stream. Lives here so that stream workers
|
|
114
|
+
* never need to name, and therefore never hold a typed reference to, the raw
|
|
115
|
+
* gRPC stream type.
|
|
116
|
+
*/
|
|
117
|
+
export declare const asStream: <T>(opened: unknown) => ClientReadableStream<T>;
|
|
118
|
+
/**
|
|
119
|
+
* Cancel and destroy a raw stream. Also used for a stream that was never
|
|
120
|
+
* attached (for example one that finished opening after its handle was
|
|
121
|
+
* closed): cancelling reports CANCELLED as an `error` event, which with no
|
|
122
|
+
* listener would be an uncaught exception, so a listener for that expected
|
|
123
|
+
* error is added first.
|
|
124
|
+
*/
|
|
125
|
+
export declare const cancelStream: (stream: ClientReadableStream<unknown>) => void;
|
|
126
|
+
export declare const toError: (e: unknown) => Error;
|
|
127
|
+
/**
|
|
128
|
+
* Attach the lifecycle handlers to a raw gRPC stream. The only place in the
|
|
129
|
+
* stream modules that calls `.on(...)` on a stream.
|
|
130
|
+
*
|
|
131
|
+
* `error`, `end` and `close` events can all fire for one dead stream; the first
|
|
132
|
+
* one decides which handler runs, and the `close` handler runs exactly once.
|
|
133
|
+
*/
|
|
134
|
+
export declare function attachStream<T>(stream: ClientReadableStream<T>, handlers: StreamHandlers<T>): StreamAttachment;
|
|
135
|
+
/**
|
|
136
|
+
* `streamActivatedJobsStream` resolves to `{ error }` (or `undefined` when the
|
|
137
|
+
* client is closing) instead of a stream when the stream cannot be opened.
|
|
138
|
+
* Returns the open error, or `undefined` when `result` is a usable stream.
|
|
139
|
+
*/
|
|
140
|
+
export declare const getOpenError: (result: unknown) => Error | undefined;
|
|
141
|
+
/** Delay before reconnect `attempt` (1-based): exponential, capped. */
|
|
142
|
+
export declare const backoffDelayMs: (attempt: number, initialDelayMs: number, maxDelayMs: number) => number;
|
|
143
|
+
export declare const STREAM_HANDLE_BRAND: unique symbol;
|
|
144
|
+
/**
|
|
145
|
+
* The value returned by every streaming API in the SDK. Extends the original
|
|
146
|
+
* `{ close }` return type backward-compatibly with a failure channel.
|
|
147
|
+
*
|
|
148
|
+
* - `state` is the current state; read it any time.
|
|
149
|
+
* - `done` resolves (never rejects) with the terminal reason when the handle
|
|
150
|
+
* reaches `closed`.
|
|
151
|
+
*
|
|
152
|
+
* Handle states are only ever produced by `createStreamHandle`; the brand
|
|
153
|
+
* stops a structural `{ close }` literal from passing as a stream handle.
|
|
154
|
+
*/
|
|
155
|
+
export interface StreamHandle {
|
|
156
|
+
readonly [STREAM_HANDLE_BRAND]: true;
|
|
157
|
+
/** Stop the stream and any reconnection. Idempotent. */
|
|
158
|
+
close(): void;
|
|
159
|
+
/** The current state of the stream. */
|
|
160
|
+
readonly state: StreamState;
|
|
161
|
+
/** Resolves with the terminal reason when the handle becomes `closed`. */
|
|
162
|
+
readonly done: Promise<StreamClosedReason>;
|
|
163
|
+
}
|
|
164
|
+
export interface StreamStateMachine {
|
|
165
|
+
readonly state: StreamState;
|
|
166
|
+
readonly done: Promise<StreamClosedReason>;
|
|
167
|
+
/**
|
|
168
|
+
* Move to `next`. `closed` is terminal: transitions after it are ignored
|
|
169
|
+
* and return `false`.
|
|
170
|
+
*/
|
|
171
|
+
readonly transition: (next: StreamState) => boolean;
|
|
172
|
+
}
|
|
173
|
+
export declare function createStreamStateMachine(initial?: StreamState): StreamStateMachine;
|
|
174
|
+
export declare function createStreamHandle(machine: Pick<StreamStateMachine, 'state' | 'done'>, close: () => void): StreamHandle;
|
|
175
|
+
/** Human-readable description of a state, for logs. */
|
|
176
|
+
export declare const describeStreamState: (state: StreamState) => string;
|
|
177
|
+
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
178
|
+
/**
|
|
179
|
+
* The names of the methods of `Client` that return (or resolve to) a
|
|
180
|
+
* `StreamHandle`: its streaming operations. Type-level only.
|
|
181
|
+
*
|
|
182
|
+
* The conformance registry is keyed by this type, so a new streaming method on
|
|
183
|
+
* the client cannot be added without a registry entry (and therefore the
|
|
184
|
+
* conformance suite) or `tsc` fails.
|
|
185
|
+
*/
|
|
186
|
+
export type StreamingOpsOf<Client> = {
|
|
187
|
+
[K in keyof Client & string]: Client[K] extends (...args: never[]) => infer R ? IsAny<Awaited<R>> extends true ? never : Awaited<R> extends StreamHandle ? K : never : never;
|
|
188
|
+
}[keyof Client & string];
|
|
189
|
+
export {};
|