Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87214,7 +87214,7 @@ var cache = __nccwpck_require__(7389);
const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:child_process");
;// CONCATENATED MODULE: external "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 __export = (target, all) => {
for (var name in all)
Expand Down Expand Up @@ -87442,16 +87442,24 @@ function stringifyError(e) {


var START_SLOP_SECONDS = 5;
async function collectBacktraces(prefixes, startTimestampMs) {
async function collectBacktraces(prefixes, programNameDenyList, startTimestampMs) {
if (isMacOS) {
return await collectBacktracesMacOS(prefixes, startTimestampMs);
return await collectBacktracesMacOS(
prefixes,
programNameDenyList,
startTimestampMs
);
}
if (isLinux) {
return await collectBacktracesSystemd(prefixes, startTimestampMs);
return await collectBacktracesSystemd(
prefixes,
programNameDenyList,
startTimestampMs
);
}
return /* @__PURE__ */ new Map();
}
async function collectBacktracesMacOS(prefixes, startTimestampMs) {
async function collectBacktracesMacOS(prefixes, programNameDenyList, startTimestampMs) {
const backtraces = /* @__PURE__ */ new Map();
try {
const { stdout: logJson } = await exec.getExecOutput(
Expand Down Expand Up @@ -87493,6 +87501,10 @@ async function collectBacktracesMacOS(prefixes, startTimestampMs) {
for (const [source, dir] of dirs) {
const fileNames = (await (0,promises_namespaceObject.readdir)(dir)).filter((fileName) => {
return prefixes.some((prefix) => fileName.startsWith(prefix));
}).filter((fileName) => {
return !programNameDenyList.some(
(programName) => fileName.startsWith(`${programName}_${(/* @__PURE__ */ new Date()).getFullYear()}`)
);
}).filter((fileName) => {
return !fileName.endsWith(".diag");
});
Expand All @@ -87517,7 +87529,7 @@ async function collectBacktracesMacOS(prefixes, startTimestampMs) {
}
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 backtraces = /* @__PURE__ */ new Map();
const coredumps = [];
Expand All @@ -87539,7 +87551,7 @@ async function collectBacktracesSystemd(prefixes, startTimestampMs) {
if (typeof sussyObject.exe == "string" && typeof sussyObject.pid == "number") {
const execParts = sussyObject.exe.split("/");
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({
exe: sussyObject.exe,
pid: sussyObject.pid
Expand Down Expand Up @@ -88107,6 +88119,7 @@ var STATE_KEY_CROSS_PHASE_ID = "detsys_cross_phase_id";
var STATE_BACKTRACE_START_TIMESTAMP = "detsys_backtrace_start_timestamp";
var DIAGNOSTIC_ENDPOINT_TIMEOUT_MS = 1e4;
var CHECK_IN_ENDPOINT_TIMEOUT_MS = 1e3;
var PROGRAM_NAME_CRASH_DENY_LIST = ["nix-expr-tests"];
var DetSysAction = class {
determineExecutionPhase() {
const currentPhase = core.getState(STATE_KEY_EXECUTION_PHASE);
Expand Down Expand Up @@ -88654,6 +88667,7 @@ var DetSysAction = class {
}
const backtraces = await collectBacktraces(
this.actionOptions.binaryNamePrefixes,
this.actionOptions.binaryNamesDenyList,
parseInt(core.getState(STATE_BACKTRACE_START_TIMESTAMP))
);
core.debug(`Backtraces identified: ${backtraces.size}`);
Expand Down Expand Up @@ -88798,7 +88812,8 @@ function makeOptionsConfident(actionOptions) {
"nix",
"determinate-nixd",
actionOptions.name
]
],
binaryNamesDenyList: actionOptions.binaryNamePrefixes ?? PROGRAM_NAME_CRASH_DENY_LIST
};
core.debug("idslib options:");
core.debug(JSON.stringify(finalOpts, void 0, 2));
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading