Skip to content

Commit

Permalink
RHINENG-14707: Reduce trace data for Patch issues (#575)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexwhite authored Dec 4, 2024
1 parent 26cbff5 commit 067c8d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/generator/factories/CVEFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ module.exports = class CVEFactory extends Factory {
throw errors.unknownIssue(id);
}

trace.event(`Disambiguate resolution: ${JSON.stringify(resolutions)}`);
trace.event(`Disambiguate resolution...`);
const disambiguatedResolution = this.disambiguate(resolutions, resolution, id, strict);
trace.event(`Disambiguated resolution: ${disambiguatedResolution}`);
trace.event(`Disambiguated resolution.`);

trace.event('Create erratum play...');
const result = new ErratumPlay(id, hosts, disambiguatedResolution, disambiguatedResolution.description);

trace.leave(`Returning: ${JSON.stringify(result)}`);
trace.leave();
return result;
}
};
5 changes: 3 additions & 2 deletions src/generator/generator.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ exports.playbookPipeline = async function ({issues, auto_reboot = true}, remedia
version: resolution.version || null,
hosts}))
};
trace.event(`Canonical definition: ${JSON.stringify(definition)}`);

trace.event('Aggregate erratum plays...');
issues = erratumPlayAggregator.process(issues);
Expand Down Expand Up @@ -128,7 +127,9 @@ exports.resolveSystems = async function (issues, strict = true) {
trace.enter('generator.controller.resolveSystems');

const systemIds = _(issues).flatMap('systems').uniq().value();
trace.event(`System IDs: ${JSON.stringify(systemIds)}`);
if (systemIds.length <= 25) { // avoid logging huge list...
trace.event(`System IDs: ${JSON.stringify(systemIds)}`);
}

// bypass cache as ansible_host may change so we want to grab the latest one
trace.event('Get system details...');
Expand Down

0 comments on commit 067c8d8

Please sign in to comment.