fix(netfault): report repeated tc batch errors only once - #476
Conversation
tc -batch reports one error per failed batch line. Actions installing many rules (e.g. network delay) rendered the same error message dozens of times in the user-facing details. Deduplicate identical messages when rendering batchErrors, keeping the first occurrence and appending the number of further occurrences.
|
Claude finished @achoimet's task in 2m 16s —— View job Claude's Review
SummaryReviewed Went through the logic in detail:
One minor edge case worth being aware of (not a bug introduced by this PR, and not blocking): if Overall this is a small, well-tested, low-risk change. No bugs, security, or performance issues found. |
|



Context
Businessmap ticket 12109: running a network delay attack on a custom Ubuntu image showed the same error message many times in the action's error details.
tc -force -batchreports one error per failed batch line. Since a delay attack installs many filter rules, the rendered error repeatedError: Parent Qdisc doesn't exists. / We have an error talking to the kernelonce per rule.Change
Deduplicate identical messages when rendering
batchErrors: the first occurrence is kept and repeats collapse into an(and N more)suffix on itsCommand failed -:<line>line.The parsed error list itself is unchanged —
filterBatchErrorsignore handling and the kernel-config hints behave exactly as before.Example output after this change:
Extensions (extension-container, extension-host) pick this up via a regular
action_kit_commonsdependency bump — no changes needed there.