Skip to content

Fix Testnode prune deleting too much

Jérome Perrin requested to merge fix/testnode-prune-too-much into master

fcb6ca2a (testnode: run slapos node prune periodically, 2026-02-10) is wrong, sometimes it runs slapos node prune but missing some software directories, causing deletion of shared parts that are actually used.

Because we'll need to deploy a new testnode version soon, implement the requested feature of reporting git clone errors. This feature was implemented by just using the existing reportTaskFailure API, which suffers from a problem that failed task reports are retrying forever, like we already see when a tested software does not build. To improve this situation, the server side was also updated to stop retrying a given revision after 12 failures. This number 12 was chosen because after 10 build errors, testnode will remove the software folder and re-install from scratch, so we let testnode a change to rebuild from scratch.

Another difficulty with the new feature of reporting errors is that we need a revision to report a failure, but in that case git failed so we do not really have a revision. Instead, we use the git error message as revision, which serves two purposes:

  • the same error will only be reported 12 times
  • when another error happens, a new test result is created, which can be good for transient errors such as when gitlab is down
Edited by Jérome Perrin

Merge request reports