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

jobs fail to "parse changelog" for pull requests with "catch-up" merges from destination branch

      the latest git + git-client combination that worked is:

      plugin version
      git 2.4.1
      git-client 1.19.2

      I have upgraded from the above combination to 2.4.2 + 1.19.6, and then I've started experiencing the following problem for pull requests that had a "catchup" (one or more merges FROM destination branch before the pull request):

      20:22:31 java.io.IOException: Failed to parse changelog
      20:22:31 	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:625)
      20:22:31 	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      20:22:31 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      20:22:31 	at hudson.model.Run.execute(Run.java:1738)
      20:22:31 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      20:22:31 	at hudson.model.ResourceController.execute(ResourceController.java:98)
      20:22:31 	at hudson.model.Executor.run(Executor.java:410)
      20:22:31 Caused by: java.lang.NullPointerException
      20:22:31 	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
      20:22:31 	at com.google.jenkins.plugins.metadata.scm.SourceMetadata.<init>(SourceMetadata.java:62)
      20:22:31 	at com.google.jenkins.plugins.metadata.scm.SourceMetadataExtractor$FromGitBuildActions.getSourceMetadata(SourceMetadataExtractor.java:242)
      20:22:31 	at com.google.jenkins.plugins.metadata.scm.SourceMetadataExtractor$FromBuildActions.extract(SourceMetadataExtractor.java:139)
      20:22:31 	at com.google.jenkins.plugins.metadata.scm.SourceMetadataExtractor.extract(SourceMetadataExtractor.java:101)
      20:22:31 	at com.google.jenkins.plugins.metadata.scm.SourceMetadataBuildListener.onChangeLogParsed(SourceMetadataBuildListener.java:50)
      20:22:31 	at hudson.model.listeners.SCMListener.onChangeLogParsed(SCMListener.java:120)
      20:22:31 	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:623)
      20:22:31 	... 6 more
      

          [JENKINS-33433] jobs fail to "parse changelog" for pull requests with "catch-up" merges from destination branch

          Max Kovgan created issue -

          Mark Waite added a comment - - edited

          The stack trace seems to indicate that a null pointer exception is happening in the google-source-plugin. It does not seem willing to accept that sometimes the value of branch may be null.

          I don't know what would have changed between the previous plugin versions and the new plugin versions which would cause that. Can you provide more information about your configuration and the job which is showing that null pointer exception? As far as I can tell, the google source plugin has not changed since its original 0.1 release in 2014, so this must be due to one of the changes in either the git plugin or the git client plugin.

          I don't understand what you mean by a "pull request that has a catch-up". Can you explain further which source control system you're using (github, bitbucket, gitlab, something else) and how the pull request is represented which is causing the null pointer exception?

          Mark Waite added a comment - - edited The stack trace seems to indicate that a null pointer exception is happening in the google-source-plugin . It does not seem willing to accept that sometimes the value of branch may be null. I don't know what would have changed between the previous plugin versions and the new plugin versions which would cause that. Can you provide more information about your configuration and the job which is showing that null pointer exception? As far as I can tell, the google source plugin has not changed since its original 0.1 release in 2014, so this must be due to one of the changes in either the git plugin or the git client plugin. I don't understand what you mean by a "pull request that has a catch-up". Can you explain further which source control system you're using (github, bitbucket, gitlab, something else) and how the pull request is represented which is causing the null pointer exception?
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]

          Max Kovgan added a comment -

          hi, markewaite
          The problem reproduces on github enterprise and on github.com.
          I suspect it has nothing to do with github, though I don't have the time to dig into this.

          catchup

          I am calling "catchup" a merge from target branch into the feature branch before the merge of feature branch into the target branch:
          i.e. if you're branching out from master, and working in your branch feature_coolness, do 3 commits, and in the meanwhile 5 commites were pushed into master, and one of them prevents you from merging, or you just want to make sure you have the latest changes from master for another reason.
          So, let's call the above "catchup" of a feature branch from target branch.

          A feature branch can have 0 or MORE catchups.
          The issue reproduces upon pull request that has 1 or MORE catchups.
          The issue does not reproduce on pull requests with 0 catchups.

          Is this clearer ?

          Max Kovgan added a comment - hi, markewaite The problem reproduces on github enterprise and on github.com. I suspect it has nothing to do with github, though I don't have the time to dig into this. catchup I am calling "catchup" a merge from target branch into the feature branch before the merge of feature branch into the target branch: i.e. if you're branching out from master , and working in your branch feature_coolness , do 3 commits, and in the meanwhile 5 commites were pushed into master , and one of them prevents you from merging, or you just want to make sure you have the latest changes from master for another reason. So, let's call the above "catchup" of a feature branch from target branch. A feature branch can have 0 or MORE catchups. The issue reproduces upon pull request that has 1 or MORE catchups. The issue does not reproduce on pull requests with 0 catchups. Is this clearer ?

          Max Kovgan added a comment - - edited

          Below is a catchup:

          Max Kovgan added a comment - - edited Below is a catchup:
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 169350 ] New: JNJira + In-Review [ 183460 ]

          Raphaël UNIQUE added a comment - - edited

          +1

          but with svn:

          11:17:18 No changes for http://svn.dsgfdfqsg/dsfgdfgdfgdfs/pkg since the previous build
          11:17:18 java.io.IOException: Failed to parse changelog
          11:17:18 	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
          11:17:18 	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          11:17:18 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
          11:17:18 	at hudson.model.Run.execute(Run.java:1720)
          11:17:18 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          11:17:18 	at hudson.model.ResourceController.execute(ResourceController.java:98)
          11:17:18 	at hudson.model.Executor.run(Executor.java:404)
          11:17:18 Caused by: java.lang.NullPointerException
          11:17:18 	at java.lang.String.indexOf(String.java:1718)
          11:17:18 	at java.lang.String.indexOf(String.java:1698)
          11:17:18 	at com.hp.application.automation.tools.octane.model.processors.scm.SvnSCMProcessor.getRevisionIdFromBuild(SvnSCMProcessor.java:153)
          11:17:18 	at com.hp.application.automation.tools.octane.model.processors.scm.SvnSCMProcessor.getBuiltRevId(SvnSCMProcessor.java:132)
          11:17:18 	at com.hp.application.automation.tools.octane.model.processors.scm.SvnSCMProcessor.getSCMData(SvnSCMProcessor.java:67)
          11:17:18 	at com.hp.application.automation.tools.octane.events.SCMListenerImpl.createSCMData(SCMListenerImpl.java:103)
          11:17:18 	at com.hp.application.automation.tools.octane.events.SCMListenerImpl.onChangeLogParsed(SCMListenerImpl.java:71)
          11:17:18 	at hudson.model.listeners.SCMListener.onChangeLogParsed(SCMListener.java:120)
          11:17:18 	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:620)
          11:17:18 	... 6 more
          
          

          after having restored these plugins, it's ok:

          • scm-api
          • credentials
          • github-api
          • git
          • subversion
          • hp-application-automation-tools-plugin

          Raphaël UNIQUE added a comment - - edited +1 but with svn: 11:17:18 No changes for http: //svn.dsgfdfqsg/dsfgdfgdfgdfs/pkg since the previous build 11:17:18 java.io.IOException: Failed to parse changelog 11:17:18 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622) 11:17:18 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 11:17:18 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 11:17:18 at hudson.model.Run.execute(Run.java:1720) 11:17:18 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 11:17:18 at hudson.model.ResourceController.execute(ResourceController.java:98) 11:17:18 at hudson.model.Executor.run(Executor.java:404) 11:17:18 Caused by: java.lang.NullPointerException 11:17:18 at java.lang. String .indexOf( String .java:1718) 11:17:18 at java.lang. String .indexOf( String .java:1698) 11:17:18 at com.hp.application.automation.tools.octane.model.processors.scm.SvnSCMProcessor.getRevisionIdFromBuild(SvnSCMProcessor.java:153) 11:17:18 at com.hp.application.automation.tools.octane.model.processors.scm.SvnSCMProcessor.getBuiltRevId(SvnSCMProcessor.java:132) 11:17:18 at com.hp.application.automation.tools.octane.model.processors.scm.SvnSCMProcessor.getSCMData(SvnSCMProcessor.java:67) 11:17:18 at com.hp.application.automation.tools.octane.events.SCMListenerImpl.createSCMData(SCMListenerImpl.java:103) 11:17:18 at com.hp.application.automation.tools.octane.events.SCMListenerImpl.onChangeLogParsed(SCMListenerImpl.java:71) 11:17:18 at hudson.model.listeners.SCMListener.onChangeLogParsed(SCMListener.java:120) 11:17:18 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:620) 11:17:18 ... 6 more after having restored these plugins, it's ok: scm-api credentials github-api git subversion hp-application-automation-tools-plugin
          Raphaël UNIQUE made changes -
          Priority Original: Minor [ 4 ] New: Critical [ 2 ]
          Raphaël UNIQUE made changes -
          Component/s New: scm-api-plugin [ 18054 ]
          Raphaël UNIQUE made changes -
          Component/s New: subversion-plugin [ 15485 ]

            yafim_kazak Yafim Kazak
            mvk Max Kovgan
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: