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

Default matrix execution strategy produces NPE in latest p4 plugin

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • p4-plugin
    • P4 Plugin 1.2.3
      Jenkins 1.609.1

      I recently upgraded to the latest P4 Plugin version (1.2.3), and it started erroring out with a null pointer exception whenever a matrix build would attempt to run. The essence of the problem is PerforceScm#getMatrixOptions (PerforceScm..java, line 330). This function returns null if the execution strategy is not an instance of MatrixOptions. The only thing this appears to be used for is to figure out the "buildParent" configuration option.

      It seems to me better in this scenario to assume buildParent is meant to be false if it is not explicitly turned on, and if the "Classic" execution strategy is used instead.

      If instead you want to absolutely require people use the perforce execution strategy, then you should document this in an obvious place (like your README?). It was not immediately obvious to us how to fix this. Even better: there should be some kind of validation / warning somewhere in the UI if you don't have "Perforce: Matrix options" set.

            Unassigned Unassigned
            matthauck Matt Hauck
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: