Update detsys-ts for: Merge pull request #81 from DeterminateSystems/dont-capture-some-crashes (8d9725c4856301321cd2508f5b8725cfb99366e2)

This commit is contained in:
grahamc 2025-03-27 15:57:16 +00:00 committed by github-actions[bot]
parent 9e4b6cbbef
commit 8b0105d445
2 changed files with 27 additions and 12 deletions

31
dist/index.js vendored
View file

@ -87214,7 +87214,7 @@ var cache = __nccwpck_require__(7389);
const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:child_process"); const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:child_process");
;// CONCATENATED MODULE: external "node:path" ;// CONCATENATED MODULE: external "node:path"
const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path"); const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path");
;// CONCATENATED MODULE: ./node_modules/.pnpm/detsys-ts@https+++codeload.github.com+DeterminateSystems+detsys-ts+tar.gz+38df301720b69_7fd9a17534655bad6bc9b22db661f5b2/node_modules/detsys-ts/dist/index.js ;// CONCATENATED MODULE: ./node_modules/.pnpm/detsys-ts@https+++codeload.github.com+DeterminateSystems+detsys-ts+tar.gz+8d9725c485630_cc2c1096494a1fd83f38014785db8a80/node_modules/detsys-ts/dist/index.js
var __defProp = Object.defineProperty; var __defProp = Object.defineProperty;
var __export = (target, all) => { var __export = (target, all) => {
for (var name in all) for (var name in all)
@ -87442,16 +87442,24 @@ function stringifyError(e) {
var START_SLOP_SECONDS = 5; var START_SLOP_SECONDS = 5;
async function collectBacktraces(prefixes, startTimestampMs) { async function collectBacktraces(prefixes, programNameDenyList, startTimestampMs) {
if (isMacOS) { if (isMacOS) {
return await collectBacktracesMacOS(prefixes, startTimestampMs); return await collectBacktracesMacOS(
prefixes,
programNameDenyList,
startTimestampMs
);
} }
if (isLinux) { if (isLinux) {
return await collectBacktracesSystemd(prefixes, startTimestampMs); return await collectBacktracesSystemd(
prefixes,
programNameDenyList,
startTimestampMs
);
} }
return /* @__PURE__ */ new Map(); return /* @__PURE__ */ new Map();
} }
async function collectBacktracesMacOS(prefixes, startTimestampMs) { async function collectBacktracesMacOS(prefixes, programNameDenyList, startTimestampMs) {
const backtraces = /* @__PURE__ */ new Map(); const backtraces = /* @__PURE__ */ new Map();
try { try {
const { stdout: logJson } = await exec.getExecOutput( const { stdout: logJson } = await exec.getExecOutput(
@ -87493,6 +87501,10 @@ async function collectBacktracesMacOS(prefixes, startTimestampMs) {
for (const [source, dir] of dirs) { for (const [source, dir] of dirs) {
const fileNames = (await (0,promises_namespaceObject.readdir)(dir)).filter((fileName) => { const fileNames = (await (0,promises_namespaceObject.readdir)(dir)).filter((fileName) => {
return prefixes.some((prefix) => fileName.startsWith(prefix)); return prefixes.some((prefix) => fileName.startsWith(prefix));
}).filter((fileName) => {
return !programNameDenyList.some(
(programName) => fileName.startsWith(`${programName}_${(/* @__PURE__ */ new Date()).getFullYear()}`)
);
}).filter((fileName) => { }).filter((fileName) => {
return !fileName.endsWith(".diag"); return !fileName.endsWith(".diag");
}); });
@ -87517,7 +87529,7 @@ async function collectBacktracesMacOS(prefixes, startTimestampMs) {
} }
return backtraces; return backtraces;
} }
async function collectBacktracesSystemd(prefixes, startTimestampMs) { async function collectBacktracesSystemd(prefixes, programNameDenyList, startTimestampMs) {
const sinceSeconds = Math.ceil((Date.now() - startTimestampMs) / 1e3) + START_SLOP_SECONDS; const sinceSeconds = Math.ceil((Date.now() - startTimestampMs) / 1e3) + START_SLOP_SECONDS;
const backtraces = /* @__PURE__ */ new Map(); const backtraces = /* @__PURE__ */ new Map();
const coredumps = []; const coredumps = [];
@ -87539,7 +87551,7 @@ async function collectBacktracesSystemd(prefixes, startTimestampMs) {
if (typeof sussyObject.exe == "string" && typeof sussyObject.pid == "number") { if (typeof sussyObject.exe == "string" && typeof sussyObject.pid == "number") {
const execParts = sussyObject.exe.split("/"); const execParts = sussyObject.exe.split("/");
const binaryName = execParts[execParts.length - 1]; const binaryName = execParts[execParts.length - 1];
if (prefixes.some((prefix) => binaryName.startsWith(prefix))) { if (prefixes.some((prefix) => binaryName.startsWith(prefix)) && !programNameDenyList.includes(binaryName)) {
coredumps.push({ coredumps.push({
exe: sussyObject.exe, exe: sussyObject.exe,
pid: sussyObject.pid pid: sussyObject.pid
@ -88107,6 +88119,7 @@ var STATE_KEY_CROSS_PHASE_ID = "detsys_cross_phase_id";
var STATE_BACKTRACE_START_TIMESTAMP = "detsys_backtrace_start_timestamp"; var STATE_BACKTRACE_START_TIMESTAMP = "detsys_backtrace_start_timestamp";
var DIAGNOSTIC_ENDPOINT_TIMEOUT_MS = 1e4; var DIAGNOSTIC_ENDPOINT_TIMEOUT_MS = 1e4;
var CHECK_IN_ENDPOINT_TIMEOUT_MS = 1e3; var CHECK_IN_ENDPOINT_TIMEOUT_MS = 1e3;
var PROGRAM_NAME_CRASH_DENY_LIST = ["nix-expr-tests"];
var DetSysAction = class { var DetSysAction = class {
determineExecutionPhase() { determineExecutionPhase() {
const currentPhase = core.getState(STATE_KEY_EXECUTION_PHASE); const currentPhase = core.getState(STATE_KEY_EXECUTION_PHASE);
@ -88654,6 +88667,7 @@ var DetSysAction = class {
} }
const backtraces = await collectBacktraces( const backtraces = await collectBacktraces(
this.actionOptions.binaryNamePrefixes, this.actionOptions.binaryNamePrefixes,
this.actionOptions.binaryNamesDenyList,
parseInt(core.getState(STATE_BACKTRACE_START_TIMESTAMP)) parseInt(core.getState(STATE_BACKTRACE_START_TIMESTAMP))
); );
core.debug(`Backtraces identified: ${backtraces.size}`); core.debug(`Backtraces identified: ${backtraces.size}`);
@ -88798,7 +88812,8 @@ function makeOptionsConfident(actionOptions) {
"nix", "nix",
"determinate-nixd", "determinate-nixd",
actionOptions.name actionOptions.name
] ],
binaryNamesDenyList: actionOptions.binaryNamePrefixes ?? PROGRAM_NAME_CRASH_DENY_LIST
}; };
core.debug("idslib options:"); core.debug("idslib options:");
core.debug(JSON.stringify(finalOpts, void 0, 2)); core.debug(JSON.stringify(finalOpts, void 0, 2));

View file

@ -16,7 +16,7 @@ importers:
version: 1.1.1 version: 1.1.1
detsys-ts: detsys-ts:
specifier: github:DeterminateSystems/detsys-ts specifier: github:DeterminateSystems/detsys-ts
version: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/38df301720b69972f084538dd44c181269f264b0 version: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/8d9725c4856301321cd2508f5b8725cfb99366e2
devDependencies: devDependencies:
'@trivago/prettier-plugin-sort-imports': '@trivago/prettier-plugin-sort-imports':
specifier: ^4.3.0 specifier: ^4.3.0
@ -1014,8 +1014,8 @@ packages:
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'} engines: {node: '>=0.4.0'}
detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/38df301720b69972f084538dd44c181269f264b0: detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/8d9725c4856301321cd2508f5b8725cfb99366e2:
resolution: {tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/38df301720b69972f084538dd44c181269f264b0} resolution: {tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/8d9725c4856301321cd2508f5b8725cfb99366e2}
version: 1.0.0 version: 1.0.0
dir-glob@3.0.1: dir-glob@3.0.1:
@ -3360,7 +3360,7 @@ snapshots:
delayed-stream@1.0.0: {} delayed-stream@1.0.0: {}
detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/38df301720b69972f084538dd44c181269f264b0: detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/8d9725c4856301321cd2508f5b8725cfb99366e2:
dependencies: dependencies:
'@actions/cache': 4.0.3 '@actions/cache': 4.0.3
'@actions/core': 1.11.1 '@actions/core': 1.11.1