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

Continuous polling bug in svn

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have a build where polling always returns:

      Started on Apr 9, 2010 1:30:48 AM
      Workspace doesn't contain http://host/trunk/java-projects/project/com.cut.xyz.resources. Need a new build.
      Done. Took 1.1 sec
      Changes found

      even though there have been no changes.

      The reason is that the resource is checked out directly as an svn resources, but also occurs as a pinned external in a different svn resource.

      Therefore, the revision.txt of the build looks like this:

      [lastStable] dlpweiss01| cat revision.txt
      http://host/trunk/java-projects/project/com.cut.xyz/src/main/ddl/305218
      http://host/trunk/java-projects/project/com.us.base/358810
      http://host/trunk/java-projects/project/com.cut.xyz.desktop/357413
      http://host/trunk/java-projects/project/com.cut.xyz.resources/296160
      http://host/trunk/java-projects/project/com.us.xyz.resources/357643
      http://host/trunk/web-development/ops/applications/com.cut.xyz-httpd/343381
      http://host/trunk/java-projects/project/com.us.ddlutils/357413
      http://host/trunk/java-projects/project/com.us.sdk/360232
      http://host/trunk/web-development/tools/maven/com.us.web.maven/360350
      http://host/trunk/java-projects/project/com.cut.xyz/360531
      http://host/trunk/java-projects/project/com.us.utilities/360193
      http://host/trunk/java-projects/project/com.us.businessdata/358152
      http://host/trunk/java-projects/project/com.us.resources/357413
      http://host/trunk/java-projects/project/com.us.thirdparty.resources/357413
      http://host/trunk/java-projects/project/com.us.xyz.doc/359896
      http://host/trunk/web-development/ops/applications/com.cut.xyz-webapp/347246
      http://host/trunk/java-projects/project/com.cut.utilities/359707

      But the svnexternals.txt looks like this:

      <?xml version='1.0' encoding='UTF-8'?>
      <list>
        <external>
          <path>com.us.xyz.doc//ddl</path>
          <url>http://host/trunk/java-projects/project/com.cut.xyz/src/main/ddl</url>
          <revision>305218</revision>
        </external>
        <external>
          <path>com.us.xyz.doc//com.cut.xyz.resources</path>
          <url>http://host/trunk/java-projects/project/com.cut.xyz.resources</url>
          <revision>296160</revision>
        </external>
      </list>
      

      And because the resource is a pinned external, this code removes it from the revisions:

          @Override
          public SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException {
              // exclude locations that are svn:external-ed with a fixed revision.                                                                                                       
              Map<String,Long> wsRev = parseRevisionFile(build,true);
              for (External e : parseExternalsFile(build.getProject()))
                  if (e.isRevisionFixed())
                      wsRev.remove(e.url);
              return new SVNRevisionState(wsRev);
          }
      

      Then this code causes the error:

                  // are the locations checked out in the workspace consistent with the current configuration?                                                                           
                  for (ModuleLocation loc : getLocations(lastCompletedBuild)) {
                      if (!baseline.revisions.containsKey(loc.getURL())) {
                          listener.getLogger().println(
                                  Messages.SubversionSCM_pollChanges_locationNotInWorkspace(loc.getURL()));
                          return BUILD_NOW;
                      }
                  }
              }
      

      because we've removed the key from baseline.revisions.

      Not yet sure how to fix this.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: kutzi
            Path:
            src/main/java/hudson/scm/SubversionSCM.java
            src/test/java/hudson/scm/SubversionSCMTest.java
            src/test/resources/hudson/scm/JENKINS-6209.zip
            http://jenkins-ci.org/commit/subversion-plugin/9fddd92a00f3e651becbf3fcde510b1d7b01dad2
            Log:
            merged fix for JENKINS-6209 from pgweiss

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: kutzi Path: src/main/java/hudson/scm/SubversionSCM.java src/test/java/hudson/scm/SubversionSCMTest.java src/test/resources/hudson/scm/ JENKINS-6209 .zip http://jenkins-ci.org/commit/subversion-plugin/9fddd92a00f3e651becbf3fcde510b1d7b01dad2 Log: merged fix for JENKINS-6209 from pgweiss
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: kutzi
            Path:
            src/main/java/hudson/scm/SubversionSCM.java
            src/test/java/hudson/scm/SubversionSCMTest.java
            src/test/resources/hudson/scm/JENKINS-6209.zip
            http://jenkins-ci.org/commit/subversion-plugin/9fddd92a00f3e651becbf3fcde510b1d7b01dad2
            Log:
            merged fix for JENKINS-6209 from pgweiss

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: kutzi Path: src/main/java/hudson/scm/SubversionSCM.java src/test/java/hudson/scm/SubversionSCMTest.java src/test/resources/hudson/scm/ JENKINS-6209 .zip http://jenkins-ci.org/commit/subversion-plugin/9fddd92a00f3e651becbf3fcde510b1d7b01dad2 Log: merged fix for JENKINS-6209 from pgweiss
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            This change is released as a part of 1.30.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - This change is released as a part of 1.30.
            Hide
            ronenpg Ronen Peleg added a comment - - edited

            I have the same issue with continuous build (Jenkins 1.472, Subversion Plugin 1.34).

            scm-polling log:
            Workspace doesn't contain http://svn-server.xyz.net/svn/MyProduct. Need a new build.
            Done. Took 0.28 sec
            Changes found

            SCM Poll causing non-stop builds even though there have been no changes.

            Show
            ronenpg Ronen Peleg added a comment - - edited I have the same issue with continuous build (Jenkins 1.472, Subversion Plugin 1.34). scm-polling log: Workspace doesn't contain http://svn-server.xyz.net/svn/MyProduct . Need a new build. Done. Took 0.28 sec Changes found SCM Poll causing non-stop builds even though there have been no changes.
            Hide
            ronenpg Ronen Peleg added a comment - - edited

            Subversion repository URL must be in lowercase!

            Example:

            NOT GOOD: http://MYCOMPANY.domain.com/svn/xxx
            GOOD: http://mycompany.domain.com/svn/xxx

            Show
            ronenpg Ronen Peleg added a comment - - edited Subversion repository URL must be in lowercase! Example: NOT GOOD: http://MYCOMPANY.domain.com/svn/xxx GOOD: http://mycompany.domain.com/svn/xxx

              People

              • Assignee:
                ronenpg Ronen Peleg
                Reporter:
                pgweiss pgweiss
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: