mirror of
https://github.com/DeterminateSystems/update-flake-lock.git
synced 2025-04-20 08:50:16 +03:00
Update detsys-ts
for: Merge pull request #81 from DeterminateSystems/dont-capture-some-crashes
(8d9725c4856301321cd2508f5b8725cfb99366e2
)
This commit is contained in:
parent
9e4b6cbbef
commit
8b0105d445
2 changed files with 27 additions and 12 deletions
31
dist/index.js
vendored
31
dist/index.js
vendored
|
@ -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)
|
||||
|
@ -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(
|
||||
|
@ -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");
|
||||
});
|
||||
|
@ -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 = [];
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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}`);
|
||||
|
@ -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));
|
||||
|
|
|
@ -16,7 +16,7 @@ importers:
|
|||
version: 1.1.1
|
||||
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:
|
||||
'@trivago/prettier-plugin-sort-imports':
|
||||
specifier: ^4.3.0
|
||||
|
@ -1014,8 +1014,8 @@ packages:
|
|||
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
|
||||
detsys-ts@https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/38df301720b69972f084538dd44c181269f264b0:
|
||||
resolution: {tarball: 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/8d9725c4856301321cd2508f5b8725cfb99366e2}
|
||||
version: 1.0.0
|
||||
|
||||
dir-glob@3.0.1:
|
||||
|
@ -3360,7 +3360,7 @@ snapshots:
|
|||
|
||||
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:
|
||||
'@actions/cache': 4.0.3
|
||||
'@actions/core': 1.11.1
|
||||
|
|
Loading…
Reference in a new issue