@cloud-cli/on 1.12.0 → 1.14.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 CHANGED
@@ -303,7 +303,11 @@ The Ingress Gateway listens for incoming HTTP requests and serves the live web U
303
303
 
304
304
  Install the unit files from `systemd/` and create root-owned environment files in `/etc/on/`: `server.env` for `RUNNER_DATABASE_URL`, `RUNNER_SERVER_URL`, `RUNNER_ADMIN_SECRET`, and `RUNNER_WORKER_SECRET`; `scheduler.env` for `RUNNER_DATABASE_URL`; and `worker.env` for `RUNNER_DATABASE_URL`, `RUNNER_SERVER_URL`, `RUNNER_WORKER_SECRET`, `RUNNER_TAGS`, and `RUNNER_TMP`. Workers receive only `RUNNER_WORKER_SECRET`; the admin secret stays on the HTTP server. The supplied units run as root because the systemd execution driver creates transient system services. Use `systemctl edit` for per-machine overrides.
305
305
 
306
- Place the server master key in `/etc/on/credentials/on-master-key` with permissions readable only by the `on` user. `runner-server.service` exposes it privately through systemd's credentials directory. Start the primary control plane with `systemctl enable --now runner.target`; enable `runner-worker.service` separately on worker machines. Use `systemctl edit runner-worker.service` for machine-specific labels and paths.
306
+ Place the server master key in `/etc/on/credentials/on-master-key` with root-only permissions. `runner-server.service` exposes it privately through systemd's credentials directory. Start the primary control plane with `systemctl enable --now runner.target`; enable `runner-worker.service` separately on worker machines. Use `systemctl edit runner-worker.service` for machine-specific labels and paths.
307
+
308
+ For package-managed remote workers, enable `runner-worker-update.timer`. It runs daily at 04:00 with up to 45 minutes of per-machine jitter, installs `@cloud-cli/on@latest` into `/opt/on`, then restarts the worker only when installation succeeds. `runner-worker.service` allows up to one hour for running jobs to drain during that restart. Do not enable this timer on a source-managed development worker; deploy that worker from its checked-out build instead.
309
+
310
+ To drain a worker manually without leaving it stopped, send `SIGUSR1` only to its main process: `systemctl kill --kill-who=main --signal=SIGUSR1 runner-worker.service`. The worker stops claiming new jobs, waits for running jobs to complete, exits with status 0, and `Restart=always` starts a replacement. Use `systemctl restart runner-worker.service` for an intentional version change; systemd waits for the same drain behavior up to `TimeoutStopSec=1h`.
307
311
 
308
312
  Workers now resolve the immutable revision when they claim a job. A workflow can safely use a checkout step followed by `if: files.exists('Dockerfile')`; `files` is constrained to the job's `workingDir`, so it cannot inspect files outside that workspace.
309
313
 
package/dist/on.js CHANGED
@@ -8895,9 +8895,7 @@ async function Qo(e) {
8895
8895
  let t = !1;
8896
8896
  async function n(n) {
8897
8897
  if (!t) {
8898
- t = !0, console.log(`\nšŸ›‘ Received ${n}. Initiating graceful shutdown...`), setTimeout(() => {
8899
- console.error("āš ļø Graceful shutdown timed out after 10s. Forcing exit!"), process.exit(1);
8900
- }, 1e4).unref();
8898
+ t = !0, console.log(`\nšŸ›‘ Received ${n}. Initiating graceful shutdown...`);
8901
8899
  try {
8902
8900
  as(), e.length > 0 && (console.log("āš™ļø Waiting for active worker jobs to drain..."), await Promise.allSettled(e)), console.log("✨ Engine stopped cleanly. Goodbye!"), process.exit(0);
8903
8901
  } catch (e) {
@@ -8905,7 +8903,7 @@ async function Qo(e) {
8905
8903
  }
8906
8904
  }
8907
8905
  }
8908
- process.on("SIGINT", () => n("SIGINT")), process.on("SIGTERM", () => n("SIGTERM"));
8906
+ process.on("SIGINT", () => n("SIGINT")), process.on("SIGTERM", () => n("SIGTERM")), process.on("SIGUSR1", () => n("SIGUSR1"));
8909
8907
  }
8910
8908
  //#endregion
8911
8909
  //#region src/plugins/manager.ts
@@ -1 +1 @@
1
- {"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../src/signals.ts"],"names":[],"mappings":"AAEA,wBAAsB,mBAAmB,CAAC,oBAAoB,KAAA,iBAkC7D"}
1
+ {"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../src/signals.ts"],"names":[],"mappings":"AAEA,wBAAsB,mBAAmB,CAAC,oBAAoB,KAAA,iBA6B7D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud-cli/on",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "description": "CLI entry point for the on plugin ecosystem.",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.30.3",