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

Subversion SCM Polling: notifyCommit post-commit hook only reads first line

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: subversion-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: Linux
    • Similar Issues:

      Description

      we are using version 1.327

      Hi, we've been trying to setup SCM polling to alert hudson to changes in our
      subversion repos as documented in:
      http://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin

      It seems there's a bug in that the mechanism only reads the first line of the
      POST http body, thus only the first SVN url in the changeset will be compared
      against to determine what jobs are polled.

      We've setup some debug scripts to manually send notifies in the same way we'd
      trigger via a subversion post-commit hook, and are able to examine the data
      we're sending and verify that all the lines from our "svnlook changed" are being
      sent correctly in the request.

      Cranking up the debug output in hudson shows that the class handling the
      response is only reading in the first line. The file is
      SubversionRepositoryStatus.java found here:

      https://svn.dev.java.net/svn/hudson/trunk/hudson/plugins/subversion/src/main/java/hudson/scm/SubversionRepositoryStatus.java

      The relevant code:

      while((line=new BufferedReader(req.getReader()).readLine())!=null) {
      LOGGER.finer("Reading line: "+line);
      affectedPath.add(line.substring(4));
      }

      It seems the problem is the while loop, you can typically only invoke
      getReader() once per HTTPServletRequest, so moving it out of the loop should
      resolve the issue.

        Attachments

          Issue Links

            Activity

            fireresq fireresq created issue -
            paoloferracin paoloferracin made changes -
            Field Original Value New Value
            Attachment JENKINS-4741.diff [ 19030 ]
            scm_issue_link SCM/JIRA link daemon made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            abayer Andrew Bayer made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            evernat evernat made changes -
            Link This issue is related to JENKINS-4319 [ JENKINS-4319 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 134814 ] JNJira + In-Review [ 203081 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                fireresq fireresq
              • Votes:
                5 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: