@openfn/ws-worker 1.17.0 → 1.18.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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # ws-worker
2
2
 
3
+ ## 1.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cf8d3c2: Add retry with backoff to worker validation
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [cf8d3c2]
12
+ - @openfn/engine-multi@1.7.0
13
+
3
14
  ## 1.17.0
4
15
 
5
16
  ### Minor Changes
package/dist/start.js CHANGED
@@ -6441,7 +6441,9 @@ function parseArgs(argv) {
6441
6441
  WORKER_SENTRY_DSN,
6442
6442
  WORKER_SENTRY_ENV,
6443
6443
  WORKER_SOCKET_TIMEOUT_SECONDS,
6444
- WORKER_STATE_PROPS_TO_REMOVE
6444
+ WORKER_STATE_PROPS_TO_REMOVE,
6445
+ WORKER_VALIDATION_RETRIES,
6446
+ WORKER_VALIDATION_TIMEOUT_MS
6445
6447
  } = process.env;
6446
6448
  const parser2 = yargs_default(hideBin(argv)).command("server", "Start a ws-worker server").option("debug", {
6447
6449
  hidden: true,
@@ -6510,6 +6512,12 @@ function parseArgs(argv) {
6510
6512
  }).option("collections-version", {
6511
6513
  description: "The version of the collections adaptor to use for all runs on this worker instance.Env: WORKER_COLLECTIONS_VERSION",
6512
6514
  type: "string"
6515
+ }).option("engine-validation-timeout-ms", {
6516
+ description: "The timeout used to run the validation task within the engine, in milliseconds. Env: WORKER_VALIDATION_TIMEOUT_MS",
6517
+ type: "number"
6518
+ }).option("engine-validation-retries", {
6519
+ description: "The number of times to retry engine validation. Useful in hosted environments. Default 3. ENV: WORKER_VALIDATION_RETRIES",
6520
+ type: "number"
6513
6521
  });
6514
6522
  const args2 = parser2.parse();
6515
6523
  return {
@@ -6562,7 +6570,17 @@ function parseArgs(argv) {
6562
6570
  args2.collectionsVersion,
6563
6571
  WORKER_COLLECTIONS_VERSION
6564
6572
  ),
6565
- collectionsUrl: setArg(args2.collectionsUrl, WORKER_COLLECTIONS_URL)
6573
+ collectionsUrl: setArg(args2.collectionsUrl, WORKER_COLLECTIONS_URL),
6574
+ engineValidationRetries: setArg(
6575
+ args2.engineValidationRetries,
6576
+ WORKER_VALIDATION_RETRIES,
6577
+ 3
6578
+ ),
6579
+ engineValidationTimeoutMs: setArg(
6580
+ args2.engineValidationTimeoutMs,
6581
+ WORKER_VALIDATION_TIMEOUT_MS,
6582
+ 5e3
6583
+ )
6566
6584
  };
6567
6585
  }
6568
6586
 
@@ -6639,7 +6657,9 @@ if (args.mock) {
6639
6657
  memoryLimitMb: args.runMemory,
6640
6658
  maxWorkers: args.capacity,
6641
6659
  statePropsToRemove: args.statePropsToRemove,
6642
- runTimeoutMs: args.maxRunDurationSeconds * 1e3
6660
+ runTimeoutMs: args.maxRunDurationSeconds * 1e3,
6661
+ workerValidationTimeout: args.engineValidationTimeoutMs,
6662
+ workerValidationRetries: args.engineValidationRetries
6643
6663
  };
6644
6664
  logger.debug("Creating runtime engine...");
6645
6665
  logger.debug("Engine options:", engineOptions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/ws-worker",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "description": "A Websocket Worker to connect Lightning to a Runtime Engine",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -23,10 +23,10 @@
23
23
  "koa-logger": "^3.2.1",
24
24
  "phoenix": "1.7.10",
25
25
  "ws": "^8.18.3",
26
- "@openfn/lexicon": "^1.2.5",
27
- "@openfn/logger": "1.0.6",
26
+ "@openfn/engine-multi": "1.7.0",
28
27
  "@openfn/runtime": "1.7.3",
29
- "@openfn/engine-multi": "1.6.14"
28
+ "@openfn/lexicon": "^1.2.5",
29
+ "@openfn/logger": "1.0.6"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/koa": "^2.15.0",
@@ -43,7 +43,7 @@
43
43
  "tsup": "^6.7.0",
44
44
  "typescript": "^4.9.5",
45
45
  "yargs": "^17.7.2",
46
- "@openfn/lightning-mock": "2.3.0"
46
+ "@openfn/lightning-mock": "2.3.1"
47
47
  },
48
48
  "files": [
49
49
  "dist",