Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23083

Adding a second project to the list to trigger causes NPE

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • core
    • None
    • RHEL 6.5 X86_64 Jenkins installed from RPM and updated via yum to 1.563

      Adding a second project to the projects to build in 'Post build Actions'
      results in only the first project being triggered and this message concerning an NPE at the end of the parent log.

      BUILD SUCCESSFUL
      Total time: 7 minutes 40 seconds
      Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
      Triggering a new build of prowess_intel #651
      FATAL: null
      java.lang.NullPointerException
      at hudson.model.Result.isBetterOrEqualTo(Result.java:125)
      at jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:133)
      at jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:83)
      at jenkins.triggers.ReverseBuildTrigger$1.shouldTriggerBuild(ReverseBuildTrigger.java:140)
      at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:243)
      at hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:674)
      at hudson.model.Build$BuildExecution.cleanUp(Build.java:193)
      at hudson.model.Run.execute(Run.java:1752)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:231)

          [JENKINS-23083] Adding a second project to the list to trigger causes NPE

          Chris Jones created issue -

          Daniel Beck added a comment -

          It looks more like the downstream project has a reverse trigger ("Trigger after other project completes" or so). Re-save both projects' configuration to get rid of any lingering brokenness due to the fix for JENKINS-16956.

          Daniel Beck added a comment - It looks more like the downstream project has a reverse trigger ("Trigger after other project completes" or so). Re-save both projects' configuration to get rid of any lingering brokenness due to the fix for JENKINS-16956 .

          Daniel Beck added a comment -

          Not a blocker, as there are easy workarounds (e.g. Parameterized Trigger plugin).

          Daniel Beck added a comment - Not a blocker, as there are easy workarounds (e.g. Parameterized Trigger plugin).
          Daniel Beck made changes -
          Priority Original: Blocker [ 1 ] New: Major [ 3 ]

          Andrew Herron added a comment - - edited

          I am also having this issue, I re-saved all of the involved projects but it hasn't helped. My list has 15 projects, it only does 3 before failing. I'll see if I can figure out which project causes the issue but it's going to be tough.

          Andrew Herron added a comment - - edited I am also having this issue, I re-saved all of the involved projects but it hasn't helped. My list has 15 projects, it only does 3 before failing. I'll see if I can figure out which project causes the issue but it's going to be tough.

          Andrew Herron added a comment -

          OK, it wasn't that difficult after all.

          We only recently upgraded from a build older than 1.560, so we are only just starting to use Jenkins with the build trigger change in JENKINS-16956.

          The project causing the NPE had a bunch of projects in it's "build after other projects are built" trigger. This happened because we are still habitually using the previous behaviour where that list mirrored the post-build action "build other projects".

          I re-saved the project causing the NPE, and all projects in the "build after other projects" trigger, but the NPE persisted. Only once I deleted the "other projects" trigger did things return to normal.

          As far as I'm seeing, the reverse trigger is now broken and only the post-build action can be used. We're using 1.570.

          Andrew Herron added a comment - OK, it wasn't that difficult after all. We only recently upgraded from a build older than 1.560, so we are only just starting to use Jenkins with the build trigger change in JENKINS-16956 . The project causing the NPE had a bunch of projects in it's "build after other projects are built" trigger. This happened because we are still habitually using the previous behaviour where that list mirrored the post-build action "build other projects". I re-saved the project causing the NPE, and all projects in the "build after other projects" trigger, but the NPE persisted. Only once I deleted the "other projects" trigger did things return to normal. As far as I'm seeing, the reverse trigger is now broken and only the post-build action can be used. We're using 1.570.

          Daniel Beck added a comment -

          Andrew: JENKINS-23191 should be fixed in 1.570, but you're saying the reverse ("build after other") build trigger is still broken in that version?

          Daniel Beck added a comment - Andrew: JENKINS-23191 should be fixed in 1.570, but you're saying the reverse ("build after other") build trigger is still broken in that version?
          Daniel Beck made changes -
          Link New: This issue is related to JENKINS-23191 [ JENKINS-23191 ]

          Andrew Herron added a comment -

          Yes. Using the same context as JENKINS-23191 for clarity:

          The reverse build trigger now saves correctly, but when Job A finishes, and attempts to trigger Job B, it gets the NPE described in this case (and, I believe, 23191).

          We just added a new Job B type to our system, and had to go around to all of the Job A types it depends on and update the post-build trigger to include Job B.

          Andrew Herron added a comment - Yes. Using the same context as JENKINS-23191 for clarity: The reverse build trigger now saves correctly, but when Job A finishes, and attempts to trigger Job B, it gets the NPE described in this case (and, I believe, 23191). We just added a new Job B type to our system, and had to go around to all of the Job A types it depends on and update the post-build trigger to include Job B.

          Jesse Glick added a comment -

          This really sounds like a duplicate of JENKINS-23191. Can you reproduce this from scratch in a new Jenkins installation containing that fix? Or is it just a matter of your having saved invalid configuration in the past due to JENKINS-23191 and have not since corrected the job configuration in all cases?

          Jesse Glick added a comment - This really sounds like a duplicate of JENKINS-23191 . Can you reproduce this from scratch in a new Jenkins installation containing that fix? Or is it just a matter of your having saved invalid configuration in the past due to JENKINS-23191 and have not since corrected the job configuration in all cases?

            Unassigned Unassigned
            chris_jones Chris Jones
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: