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

Changelist parsing fails when description contains jobs without fix status

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: perforce-plugin
    • Labels:
      None
    • Environment:
      Perforce 2010.2
    • Similar Issues:

      Description

      Versions are:
      Jenkins ver. 1.466.1
      Perforce Plugin: 1.3.17

      The perforce plug-in is currently throwing exceptions for any changelists which have jobs attached but do not have any "closed or fixed" status associated.

      I checked the code and seems like there is one more case to be checked (<-- below):

      // Line looks like:
      // EXT-84 on 2007/09/25 by mwille closed
      // or
      // EXT-84 on 2007/09/25 closed
      // or
      // EXT-84 on 2007/09/25
      // or
      // EXT-84 on 2007/09/25 by mwille <-- The new case

      Adding details.hasMoreTokens() at line 136 may fix it - I have not checked it of course.

      Exception thrown by the plugin is:

      ===== begin =====
      [xyz] $ p4 describe -s 51820
      Caught exception communicating with perforce. Failed to retrieve changelist.
      Response from perforce was:
      Change 51820 by me@my_workspace on 2012/09/05 04:31:37

      jenkins test

      Jobs fixed ...

      job000162 on 2012/08/25 by p4dtguser

      Test it thoroughly.

      Affected files ...

      ... //Main/Tools/bar.txt#17 edit

      com.tek42.perforce.PerforceException: Failed to retrieve changelist.
      Response from perforce was:
      Change 51820 by me@my_workspace on 2012/09/05 04:31:37

      jenkins test

      Jobs fixed ...

      job000162 on 2012/08/25 by p4dtguser

      Test it thoroughly.

      Affected files ...

      ... //Main/Tools/bar.txt#17 edit

      at com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:207)
      at com.tek42.perforce.parse.Changes.getChangelist(Changes.java:71)
      at com.tek42.perforce.parse.Changes.getChangelistsFromNumbers(Changes.java:433)
      at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:924)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1226)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:586)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:475)
      at hudson.model.Run.run(Run.java:1438)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:239)
      Caused by: java.util.NoSuchElementException
      at java.util.StringTokenizer.nextToken(Unknown Source)
      at com.tek42.perforce.parse.ChangelistBuilder.build(ChangelistBuilder.java:136)
      ... 10 more
      ERROR: Unable to communicate with perforce. Failed to retrieve changelist.
      Response from perforce was:
      Change 51820 by me@my_workspace on 2012/09/05 04:31:37

      jenkins test

      Jobs fixed ...

      job000162 on 2012/08/25 by p4dtguser

      Test it thoroughly.

      Affected files ...

      ... //Main/Tools/bar.txt#17 edit

      ===== end =====

      Thanks.

        Attachments

          Activity

            People

            • Assignee:
              rpetti Rob Petti
              Reporter:
              ajay_kanade Ajay Kanade
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: