Skip to content
Permalink
Browse files

[JENKINS-19022] Print a warning to the build log when the job seems t…

…o be in trouble due to buildsByBranchName bloat.
  • Loading branch information...
jglick committed Feb 9, 2017
1 parent 16e366e commit 5bb7eed6a9231af15e7c0f5a964f3044381a979d
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/main/java/hudson/plugins/git/GitSCM.java
@@ -1011,6 +1011,10 @@ public EnvVars getEnvironment() {
Build revToBuild = new Build(marked, rev, build.getNumber(), null);
buildData.saveBuild(revToBuild);

if (buildData.getBuildsByBranchName().size() >= 100) {
log.println("JENKINS-19022: warning: possible memory leak due to Git plugin usage; see: https://wiki.jenkins-ci.org/display/JENKINS/Remove+Git+Plugin+BuildsByBranch+BuildData");
}

if (candidates.size() > 1) {
log.println("Multiple candidate revisions");
Job<?, ?> job = build.getParent();

0 comments on commit 5bb7eed

Please sign in to comment.
You can’t perform that action at this time.