[JENKINS-73692] Turn off logging from BackgroundGlobalBuildDiscarder
#9663
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JENKINS-73692: I noticed that a support bundle (
support-core
) containedtask-logs/Periodic background build discarder.log
,task-logs/Periodic background build discarder.log.1
, etc., each running around 10Mb. #5802 noted that this could happenbut it was not obvious how serious this was at the time on a large controller with thousands of jobs. While it only runs every hour, and takes just a minute or so in this big controller, each time it spews out close to 2Mb of text. Worse, the log messages are almost completely uninformative since they only depend on the static configuration, not whether or not builds (or their artifacts) were actually deleted!
Testing done
Created two projects, one with a build discarder set, the other not; and configured a global build discarder.
and then watched the file. Every second it would print
With the patch, the file is no longer touched.
Proposed changelog entries
$JENKINS_HOME/logs/tasks/Periodic background build discarder.log
.Proposed upgrade guidelines
N/A
Before the changes are marked as
ready-for-merge
:Maintainer checklist