Skip to content

Commit

Permalink
[JENKINS-22395] more diagnostics
Browse files Browse the repository at this point in the history
Just in case the previous fix didn't address the root cause of ZD-11985 (and given the time it takes for changes like this to land in LTS), I'm adding additional diagnostics that let us track how previous/next builds are getting discovered

(cherry picked from commit aa8e0b4)
  • Loading branch information
kohsuke authored and jglick committed Jul 11, 2014
1 parent ad65cec commit 921001d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java
Expand Up @@ -46,6 +46,8 @@
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.DoNotUse;

import static java.util.logging.Level.FINER;

/**
* Makes it easier to use a lazy {@link RunMap} from a {@link Job} implementation.
* Provides method implementations for some abstract {@link Job} methods,
Expand Down Expand Up @@ -359,6 +361,7 @@ public final RunT getPreviousBuild() {
if (pb != null) {
pb.getRunMixIn().nextBuildR = createReference(); // establish bi-di link
this.previousBuildR = pb.getRunMixIn().createReference();
LOGGER.log(FINER, "Linked {0}<->{1} in getPreviousBuild()", new Object[]{this, pb});
return pb;
} else {
this.previousBuildR = none();
Expand Down Expand Up @@ -392,6 +395,7 @@ public final RunT getNextBuild() {
if (nb != null) {
nb.getRunMixIn().previousBuildR = createReference(); // establish bi-di link
this.nextBuildR = nb.getRunMixIn().createReference();
LOGGER.log(FINER, "Linked {0}<->{1} in getNextBuild()", new Object[]{this, nb});
return nb;
} else {
this.nextBuildR = none();
Expand Down

0 comments on commit 921001d

Please sign in to comment.