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

HTTP redirection on subversion repo causes build loop

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • subversion-plugin
    • None
    • Jenkins 2.150.1

       

      Jenkins re-triggers builds although there are no changes in the subversion repository. This causes an endless building loop on our build server.

      Configuration:
      SCM-Polling is enabled (triggering every 5 minutes) and the repo is set to the following HTTP endpoint: http://svn.server

      Recent configuration change:
      Our subversion repositories switched to HTTPS. HTTP-URLs are redirected to HTTPS (301 Moved Permanently).

      Observation:
      The subversion polling log states that a new build is required as the workspace does not contain http://svn.server. Jenkins seems to understand the redirection when checking out but does not recognize it before the checkout (when it compares the URLs?). That's why it performs a checkout+build on and on.

          [JENKINS-55578] HTTP redirection on subversion repo causes build loop

          David Grierson added a comment - - edited

          See attached consoleText.txt log for a build which continuously checks out the repo because the URL differs due to the 301 redirect received (and correctly interpreted) by the SVN client.

           

          • Plugin version: 2.14.2
          • Jenkins version: 2.289.1

          David Grierson added a comment - - edited See attached consoleText.txt log for a build which continuously checks out the repo because the URL differs due to the 301 redirect received (and correctly interpreted) by the SVN client.   Plugin version: 2.14.2 Jenkins version: 2.289.1

          Issue appears to be in the isSameRepository() method in hudson.scm.subversion.UpdateUpdater class. This seems to be performing a simple string comparison of the URL of configured in the job against the URL in the working copy.

          However, the working copy URL gets updated to the 301 redirected URL resulting in them differing every time.

          David Grierson added a comment - Issue appears to be in the isSameRepository() method in hudson.scm.subversion.UpdateUpdater class. This seems to be performing a simple string comparison of the URL of configured in the job against the URL in the working copy. However, the working copy URL gets updated to the 301 redirected URL resulting in them differing every time.

            Unassigned Unassigned
            np247 Nicolas Peifer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: