@voltro/workflow 0.83.1 → 0.85.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/CHANGELOG.md +1191 -0
- package/THIRD-PARTY-NOTICES.md +1 -119
- package/dist/cluster-F_bhqVP7.js +679 -0
- package/dist/cluster.d.ts +304 -280
- package/dist/cluster.js +2 -2
- package/dist/clusterTestSuite.d.ts +11 -11
- package/dist/clusterTestSuite.js +256 -256
- package/dist/index.d.ts +443 -333
- package/dist/index.js +5 -5
- package/dist/journalEncryption-DTyhUzaS.js +154 -0
- package/dist/{primitives-Btjhjm8P.js → primitives-DX04WTWh.js} +223 -199
- package/dist/primitives.d.ts +56 -31
- package/dist/primitives.js +2 -2
- package/dist/{src-DP-lKqaG.js → src-C2NEyUM8.js} +1111 -1053
- package/dist/{clusterDiagnostics-CGUtnJkX.js → workflowReadSelections-CZAUjP7f.js} +58 -46
- package/package.json +6 -9
- package/dist/cluster--WvQZFwk.js +0 -637
- package/dist/journalEncryption--n5VDdYO.js +0 -148
package/dist/cluster.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as e, a as t,
|
|
2
|
-
export {
|
|
1
|
+
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, y } from "./cluster-F_bhqVP7.js";
|
|
2
|
+
export { d as DEFAULT_RUNNER_LISTEN_PORT, s as JournalExit, u as WorkflowRestartDispatcher, n as WorkflowResumeDispatcher, o as activityPrimaryKey, i as clusterLockNamespaceOid, p as clusterMigrationGateLayer, m as detectWsrepCluster, g as makeClusterCronLayer, a as makeClusterDiagnostics, c as parseShardLockMode, t as pollWorkflowStorage, e as readWorkflowRunReply, v as redriveFailedRun, f as resolveFailoverTuning, h as resolveRunnerIdentity, r as resolveRunnerStorage, l as resolveShardLockDisableAdvisory, y as resumeRunFromStep, _ as workflowEngineLayer };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Config } from 'effect';
|
|
2
2
|
import { Layer } from 'effect';
|
|
3
3
|
import { MysqlCharset } from '@voltro/database/sql';
|
|
4
|
-
import { Sharding } from '
|
|
5
|
-
import { SqlClient } from '
|
|
6
|
-
import { SqlError } from '
|
|
4
|
+
import { Sharding } from 'effect/cluster';
|
|
5
|
+
import { SqlClient } from 'effect/sql';
|
|
6
|
+
import { SqlError } from 'effect/sql';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Everything a dialect supplies to run the cluster-engine suite against
|
|
@@ -14,7 +14,7 @@ export declare interface ClusterEngineFixture {
|
|
|
14
14
|
readonly name: string;
|
|
15
15
|
/** The dialect's `SqlClient` layer (postgres/mysql/mariadb/mssql/sqlite).
|
|
16
16
|
* Typed via the engine's own option so `@voltro/testing` needs no
|
|
17
|
-
* direct
|
|
17
|
+
* direct `effect/sql` dependency. */
|
|
18
18
|
readonly sqlClientLayer: WorkflowEngineLayerOptions['sqlClientLayer'];
|
|
19
19
|
/** `'sql'` for server dialects, `'memory'` for sqlite. */
|
|
20
20
|
readonly runnerStorage: 'sql' | 'memory';
|
|
@@ -75,20 +75,20 @@ export declare const runClusterEngineSuite: (fixture: ClusterEngineFixture) => v
|
|
|
75
75
|
export declare const runJournalEncryptionSuite: (fixture: ClusterEngineFixture) => void;
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
|
-
* Runner-storage backend for
|
|
78
|
+
* Runner-storage backend for `effect/cluster.SingleRunner`.
|
|
79
79
|
*
|
|
80
80
|
* - `'sql'` — durable across crashes + multi-instance scale-out.
|
|
81
81
|
* Used for postgres / mysql / mariadb / mssql.
|
|
82
82
|
* - `'memory'` — durable replay within the SAME process; no
|
|
83
83
|
* horizontal scale-out. Used for `sqlite` because
|
|
84
|
-
*
|
|
84
|
+
* `effect/cluster.SqlRunnerStorage` has no SQLite
|
|
85
85
|
* lock-acquisition branch (`pg_advisory_lock` and
|
|
86
86
|
* `GET_LOCK` aren't available there).
|
|
87
87
|
*/
|
|
88
88
|
declare type RunnerStorage = 'sql' | 'memory';
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
|
-
* How
|
|
91
|
+
* How `effect/cluster`'s `SqlRunnerStorage` coordinates shard ownership across
|
|
92
92
|
* a fleet of runners:
|
|
93
93
|
*
|
|
94
94
|
* - `'advisory'` — session-scoped DB advisory locks (`GET_LOCK` on
|
|
@@ -129,7 +129,7 @@ declare interface WorkflowEngineLayerOptions {
|
|
|
129
129
|
* runs through it for sqlite, the layer's resource lifecycle keeps
|
|
130
130
|
* the cluster's accounting clean.
|
|
131
131
|
*/
|
|
132
|
-
readonly sqlClientLayer: Layer.Layer<SqlClient.SqlClient,
|
|
132
|
+
readonly sqlClientLayer: Layer.Layer<SqlClient.SqlClient, Config.ConfigError | SqlError.SqlError, never>;
|
|
133
133
|
/** SQL ownership for shared primaries; memory for local/embedded stores. */
|
|
134
134
|
readonly runnerStorage: RunnerStorage;
|
|
135
135
|
/**
|
|
@@ -161,7 +161,7 @@ declare interface WorkflowEngineLayerOptions {
|
|
|
161
161
|
* lease-expiry problem, NOT a polling one: a dead runner keeps its shards
|
|
162
162
|
* until its heartbeat goes stale, so the floor is the lease TTL.
|
|
163
163
|
*
|
|
164
|
-
* - `failoverLeaseSeconds` (default 35,
|
|
164
|
+
* - `failoverLeaseSeconds` (default 35, `effect/cluster`
|
|
165
165
|
* `shardLockExpiration`) — how long after a runner's last heartbeat its
|
|
166
166
|
* shards become claimable. Lower = faster failover on a hard crash, at the
|
|
167
167
|
* cost of false-positive reclaims if a healthy runner is paused longer than
|
|
@@ -178,7 +178,7 @@ declare interface WorkflowEngineLayerOptions {
|
|
|
178
178
|
readonly failoverLeaseSeconds?: number;
|
|
179
179
|
readonly failoverHeartbeatSeconds?: number;
|
|
180
180
|
/**
|
|
181
|
-
* NEW-MESSAGE latency across replicas (default 10,
|
|
181
|
+
* NEW-MESSAGE latency across replicas (default 10, `effect/cluster`
|
|
182
182
|
* `entityMessagePollInterval`). DISTINCT from failover: this is how long a
|
|
183
183
|
* freshly-triggered workflow can wait before the replica that OWNS its shard
|
|
184
184
|
* picks it up. When the triggering replica owns the shard it's immediate
|