Diagnostics (#101)
Some checks failed
CI / Test: aarch64-darwin gha:disabled,fhc:enabled,id:none,determinate:false (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Test: Nix not installed (push) Has been cancelled
CI / Run x86_64-linux, Untrusted (push) Has been cancelled
CI / Test: aarch64-darwin gha:disabled,fhc:disabled,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:enabled,fhc:disabled,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:no-preference,fhc:disabled,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:enabled,fhc:enabled,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:no-preference,fhc:enabled,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:disabled,fhc:no-preference,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:enabled,fhc:no-preference,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:no-preference,fhc:no-preference,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:disabled,fhc:disabled,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:no-preference,fhc:enabled,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:enabled,fhc:disabled,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:no-preference,fhc:disabled,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:disabled,fhc:enabled,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:enabled,fhc:enabled,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:no-preference,fhc:enabled,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:disabled,fhc:no-preference,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:enabled,fhc:no-preference,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:no-preference,fhc:no-preference,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:disabled,fhc:disabled,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:enabled,fhc:disabled,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:no-preference,fhc:disabled,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:disabled,fhc:enabled,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:enabled,fhc:enabled,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:disabled,fhc:no-preference,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:enabled,fhc:no-preference,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:no-preference,fhc:no-preference,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:disabled,fhc:disabled,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:enabled,fhc:disabled,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:no-preference,fhc:disabled,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:disabled,fhc:enabled,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:enabled,fhc:enabled,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:no-preference,fhc:enabled,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:disabled,fhc:no-preference,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:enabled,fhc:no-preference,id:none,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:no-preference,fhc:no-preference,id:none,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:disabled,fhc:disabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:enabled,fhc:disabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:no-preference,fhc:disabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:no-preference,fhc:enabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:disabled,fhc:no-preference,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:enabled,fhc:no-preference,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:no-preference,fhc:no-preference,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:disabled,fhc:disabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:enabled,fhc:disabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:no-preference,fhc:disabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:disabled,fhc:enabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:enabled,fhc:enabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:no-preference,fhc:enabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:disabled,fhc:no-preference,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:enabled,fhc:no-preference,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:no-preference,fhc:disabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:disabled,fhc:enabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:enabled,fhc:enabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-linux gha:no-preference,fhc:no-preference,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:disabled,fhc:disabled,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:enabled,fhc:disabled,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:no-preference,fhc:disabled,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:disabled,fhc:enabled,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:enabled,fhc:enabled,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:no-preference,fhc:enabled,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:disabled,fhc:no-preference,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:enabled,fhc:no-preference,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-darwin gha:no-preference,fhc:no-preference,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:disabled,fhc:disabled,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:enabled,fhc:disabled,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:enabled,fhc:enabled,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:no-preference,fhc:enabled,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:disabled,fhc:no-preference,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:enabled,fhc:enabled,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:no-preference,fhc:enabled,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:disabled,fhc:no-preference,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:enabled,fhc:no-preference,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:no-preference,fhc:no-preference,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:disabled,fhc:disabled,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:enabled,fhc:disabled,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:disabled,fhc:enabled,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:enabled,fhc:enabled,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:no-preference,fhc:enabled,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:disabled,fhc:no-preference,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:enabled,fhc:no-preference,id:write,determinate:false (push) Has been cancelled
CI / Test: x86_64-linux gha:no-preference,fhc:no-preference,id:write,determinate:false (push) Has been cancelled
CI / Test: aarch64-darwin gha:disabled,fhc:disabled,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:enabled,fhc:disabled,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:no-preference,fhc:disabled,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:disabled,fhc:enabled,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:enabled,fhc:no-preference,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:no-preference,fhc:no-preference,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:disabled,fhc:disabled,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:enabled,fhc:disabled,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:no-preference,fhc:disabled,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:disabled,fhc:enabled,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:enabled,fhc:enabled,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:no-preference,fhc:enabled,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:disabled,fhc:no-preference,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:enabled,fhc:no-preference,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:no-preference,fhc:no-preference,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:disabled,fhc:disabled,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:enabled,fhc:disabled,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:no-preference,fhc:disabled,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:disabled,fhc:enabled,id:none,determinate:true (push) Has been cancelled
Push dev shell to FlakeHub Cache / push-dev-shell-to-flakehub-cache (map[nix-system:aarch64-darwin runner:macos-latest-xlarge]) (push) Has been cancelled
Push dev shell to FlakeHub Cache / push-dev-shell-to-flakehub-cache (map[nix-system:x86_64-darwin runner:macos-13]) (push) Has been cancelled
Push dev shell to FlakeHub Cache / push-dev-shell-to-flakehub-cache (map[nix-system:x86_64-linux runner:ubuntu-22.04]) (push) Has been cancelled
CI / Test: x86_64-linux gha:no-preference,fhc:disabled,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:disabled,fhc:enabled,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:enabled,fhc:enabled,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:no-preference,fhc:enabled,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:disabled,fhc:no-preference,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:enabled,fhc:no-preference,id:none,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:no-preference,fhc:no-preference,id:none,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:disabled,fhc:disabled,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:enabled,fhc:disabled,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:no-preference,fhc:disabled,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:disabled,fhc:enabled,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:enabled,fhc:enabled,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:no-preference,fhc:enabled,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:disabled,fhc:no-preference,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:enabled,fhc:no-preference,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-darwin gha:no-preference,fhc:no-preference,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:disabled,fhc:disabled,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:enabled,fhc:disabled,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:no-preference,fhc:disabled,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:disabled,fhc:enabled,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:enabled,fhc:enabled,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:no-preference,fhc:enabled,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:disabled,fhc:no-preference,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:enabled,fhc:no-preference,id:write,determinate:true (push) Has been cancelled
CI / Test: aarch64-linux gha:no-preference,fhc:no-preference,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:disabled,fhc:disabled,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:enabled,fhc:disabled,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:no-preference,fhc:disabled,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:disabled,fhc:enabled,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:enabled,fhc:enabled,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:no-preference,fhc:enabled,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:disabled,fhc:no-preference,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:enabled,fhc:no-preference,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-darwin gha:no-preference,fhc:no-preference,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:disabled,fhc:disabled,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:enabled,fhc:disabled,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:no-preference,fhc:disabled,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:disabled,fhc:enabled,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:enabled,fhc:enabled,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:no-preference,fhc:enabled,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:disabled,fhc:no-preference,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:enabled,fhc:no-preference,id:write,determinate:true (push) Has been cancelled
CI / Test: x86_64-linux gha:no-preference,fhc:no-preference,id:write,determinate:true (push) Has been cancelled
CI / success (push) Has been cancelled

* Update all the deps

* Wait for the daemon to shutdown

* comment

* comment again
This commit is contained in:
Graham Christensen 2025-01-16 17:17:12 -05:00 committed by GitHub
parent fe89a484fe
commit f7eb5b510a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 1577 additions and 1280 deletions

1388
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -28,23 +28,23 @@
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"detsys-ts": "github:DeterminateSystems/detsys-ts",
"got": "^14.4.4",
"got": "^14.4.5",
"tail": "^2.2.6"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^20.17.6",
"@types/node": "^20.17.14",
"@types/tail": "^2.2.3",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@vercel/ncc": "^0.38.3",
"eslint": "^8.57.1",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-github": "^4.10.2",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.1",
"prettier": "^3.3.3",
"eslint-plugin-prettier": "^5.2.2",
"prettier": "^3.4.2",
"tsup": "^8.3.5",
"typescript": "^5.6.3"
"typescript": "^5.7.3"
}
}

File diff suppressed because it is too large Load diff

View file

@ -7,6 +7,7 @@ import { SpawnOptions, spawn } from "node:child_process";
import { mkdirSync, openSync, readFileSync } from "node:fs";
import * as fs from "node:fs/promises";
import * as path from "node:path";
import { setTimeout } from "node:timers/promises";
// The ENV_DAEMON_DIR is intended to determine if we "own" the daemon or not,
// in the case that a user has put the magic nix cache into their workflow
@ -14,6 +15,7 @@ import * as path from "node:path";
const ENV_DAEMON_DIR = "MAGIC_NIX_CACHE_DAEMONDIR";
const FACT_ENV_VARS_PRESENT = "required_env_vars_present";
const FACT_SENT_SIGTERM = "sent_sigterm";
const FACT_DIFF_STORE_ENABLED = "diff_store";
const FACT_ALREADY_RUNNING = "noop_mode";
@ -363,21 +365,25 @@ class MagicNixCacheAction extends DetSysAction {
actionsCore.debug(`killing daemon process ${pid}`);
try {
// Repeatedly signal 0 the daemon to test if it is up.
// If it exits, kill will raise an exception which breaks us out of this control flow and skips the sigterm.
// If magic-nix-cache doesn't exit in 30s, we SIGTERM it.
for (let i = 0; i < 30 * 10; i++) {
process.kill(pid, 0);
await setTimeout(100);
}
this.addFact(FACT_SENT_SIGTERM, true);
actionsCore.info(`Sending Magic Nix Cache a SIGTERM`);
process.kill(pid, "SIGTERM");
} catch (e: unknown) {
if (typeof e === "object" && e && "code" in e && e.code !== "ESRCH") {
// Throw an error only in strict mode, otherwise ignore because
// we're in the post phase and shutting down after this anyway
if (this.strictMode) {
throw e;
}
}
} finally {
if (actionsCore.isDebug()) {
actionsCore.info("Entire log:");
const entireLog = readFileSync(path.join(this.daemonDir, "daemon.log"));
actionsCore.info(entireLog.toString());
}
} catch {
// Perfectly normal to get an exception here, because the process shut down.
}
if (actionsCore.isDebug()) {
actionsCore.info("Entire log:");
const entireLog = readFileSync(path.join(this.daemonDir, "daemon.log"));
actionsCore.info(entireLog.toString());
}
}