@cloud-cli/on 1.13.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
@@ -307,6 +307,8 @@ Place the server master key in `/etc/on/credentials/on-master-key` with root-onl
307
307
 
308
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
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`.
311
+
310
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.
311
313
 
312
314
  ## Future Security Work
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.13.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",