forgedock 1.61.0 → 1.61.1

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.
@@ -3,7 +3,13 @@
3
3
  import { createHash } from "node:crypto";
4
4
  import { appendFileSync, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, statSync, unlinkSync } from "node:fs";
5
5
  import { join } from "node:path";
6
- import { classifyCiFailure } from "../lean/ci-classify.mjs";
6
+ // The pool agent's self-update bundle carries only AGENT_BUNDLE_PATHS (router.mjs), never bin/lean, and the agent loads this
7
+ // module through cli.mjs -> router.mjs. Classification is a router-side extra, so it is optional here: a missing module
8
+ // leaves classify null (events pass through unclassified) instead of crashing the agent at import (1.61.0 outage).
9
+ const { classifyCiFailure = null } = await import("../lean/ci-classify.mjs").catch((e) => {
10
+ if (e?.code === "ERR_MODULE_NOT_FOUND") return {};
11
+ throw e;
12
+ });
7
13
 
8
14
  /** #5688: CI runner events pushed to the pool router and long-polled by agents (parent #5687). */
9
15
  export const CI_EVENT_TYPES = ["job_started", "step_started", "step_failed", "test_failed", "job_finished", "runner_unhealthy"];
@@ -12,6 +12,12 @@ import { createCiEvents, MAX_WAIT_S } from "./ci-events.mjs";
12
12
  import { jsonStore } from "./store.mjs";
13
13
  import { versionOf } from "./version.mjs";
14
14
 
15
+ /**
16
+ * What the router ships to pool agents (self-update and bootstrap). Every module the agent can load statically from
17
+ * bin/pool/agent.mjs must live under these paths; bin/tests/pool-agent-bundle.test.mjs enforces it.
18
+ */
19
+ export const AGENT_BUNDLE_PATHS = Object.freeze(["package.json", "bin/pool", "pool"]);
20
+
15
21
  const run = promisify(execFile);
16
22
 
17
23
  /** #5274: an agent destroy (docker rm, volume rm, wipe) outlasts the 15s call default; DELETE would 502 while the destroy still succeeded. */
@@ -305,7 +311,7 @@ export function createRouter(cfg, { fetchFn = globalThis.fetch, now = () => Date
305
311
  }
306
312
 
307
313
  function sendBundle(res) {
308
- const tar = spawn("tar", ["-czf", "-", "-C", cfg.repo_root, "package.json", "bin/pool", "pool"]);
314
+ const tar = spawn("tar", ["-czf", "-", "-C", cfg.repo_root, ...AGENT_BUNDLE_PATHS]);
309
315
  res.writeHead(200, { "content-type": "application/gzip" });
310
316
  tar.stdout.pipe(res);
311
317
  tar.on("error", () => res.destroy());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forgedock",
3
- "version": "1.61.0",
3
+ "version": "1.61.1",
4
4
  "description": "An AI engineering team that ships to production",
5
5
  "bin": {
6
6
  "forgedock": "bin/forgedock.mjs"