• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • cvs-plugin

      As presented in the user group: https://groups.google.com/forum/?fromgroups#!topic/jenkinsci-users/Dvv0I3FBNW4

      We've been running Jenkins 1.451 and 1.454 on Windows XP against a CVS repository for a few weeks now, without any problems. The CVS plugin (v1.6) was using the local cvsnt install.

      We've since upgraded the CVS plugin to version 2.1 (by manually pinning the plugin) and since then, CVS changes are not detected. The CVS polling log is triggered properly, tons of "cvs rlog" instructions are sent, but at the end "No changes" is displayed.

      Using CVS plugin 1.6 the cvs polling command looked like this (executed at 5:26:21 PM EDT):
      cvs -q -z3 -n update -PdC -r d-chg00014229_op_brc_preimp-op-2012-02-27 -D "Thursday, March 22, 2012 9:26:21 PM UTC"

      Using CVS plugin 2.1, the last cvs checkout command looked like this (executed at 11:56:16 AM EDT):
      cvs checkout -P -r d-chg00014229_op_brc_preimp-op-2012-02-27 -D 23 Mar 2012 11:56:16 EDT -d portailInt portailInt

      We're in Montreal, so Eastern Time Zone with Daylight Saving Time in effect.

          [JENKINS-13227] CVS plugin 2.1 does not detect changes

          Amir: I'm going to fix the issue with losing settings when upgrading from the previous version to the current version then do a release. I'll look at your other issue after I've done the release as otherwise we'll never get this fix live.

          Michael Clarke added a comment - Amir: I'm going to fix the issue with losing settings when upgrading from the previous version to the current version then do a release. I'll look at your other issue after I've done the release as otherwise we'll never get this fix live.

          Amir Isfy added a comment - - edited

          Sounds like a plan.

          Michael, I am getting this with this new snapshot. It is during the 'rlog' command.

          First member of my matrix checks out and builds fine. Its rlog command is:

          08:20:30 cvs rlog -S -d30 May 2012 17:13:58 -0600<31 May 2012 08:13:55 -0600 Module_name

          The second member of the matrix, checking out the same exact code, rlog command is:

          08:57:51 cvs rlog -S -d17 May 2012 09:30:15 -0600<31 May 2012 08:13:55 -0600 Module_name

          Note the times! The second command fails with:

          17:25:04 FATAL: No file version found for the specified tag. Looking for branch_name in
          17:25:04 java.lang.RuntimeException: No file version found for the specified tag. Looking for branch_name in
          17:25:04 at hudson.scm.CvsChangeLogHelper.getCurrentFileVersion(CvsChangeLogHelper.java:273)
          17:25:04 at hudson.scm.CvsChangeLogHelper.mapCvsLog(CvsChangeLogHelper.java:151)
          17:25:04 at hudson.scm.CVSSCM.calculateChangeLog(CVSSCM.java:419)
          17:25:04 at hudson.scm.CVSSCM.checkout(CVSSCM.java:831)
          17:25:04 at hudson.model.AbstractProject.checkout(AbstractProject.java:1218)
          17:25:04 at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:586)
          17:25:04 at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:475)
          17:25:04 at hudson.model.Run.run(Run.java:1434)
          17:25:04 at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
          17:25:04 at hudson.model.ResourceController.execute(ResourceController.java:88)
          17:25:04 at hudson.model.Executor.run(Executor.java:239)

          This is after the very last rlog message on the console output!!

          On other slaves, I have this happening on the first member of the matrix or even on the master before triggering the first member of the matrix.

          Sometimes when I clean the workspace and relaunch, it goes one step further, for example if it had failed on the master, now it passes and fails at the first member of the matrix on the slave!

          Amir Isfy added a comment - - edited Sounds like a plan. Michael, I am getting this with this new snapshot. It is during the 'rlog' command. First member of my matrix checks out and builds fine. Its rlog command is: 08:20:30 cvs rlog -S -d30 May 2012 17:13:58 -0600<31 May 2012 08:13:55 -0600 Module_name The second member of the matrix, checking out the same exact code, rlog command is: 08:57:51 cvs rlog -S -d17 May 2012 09:30:15 -0600<31 May 2012 08:13:55 -0600 Module_name Note the times! The second command fails with: 17:25:04 FATAL: No file version found for the specified tag. Looking for branch_name in 17:25:04 java.lang.RuntimeException: No file version found for the specified tag. Looking for branch_name in 17:25:04 at hudson.scm.CvsChangeLogHelper.getCurrentFileVersion(CvsChangeLogHelper.java:273) 17:25:04 at hudson.scm.CvsChangeLogHelper.mapCvsLog(CvsChangeLogHelper.java:151) 17:25:04 at hudson.scm.CVSSCM.calculateChangeLog(CVSSCM.java:419) 17:25:04 at hudson.scm.CVSSCM.checkout(CVSSCM.java:831) 17:25:04 at hudson.model.AbstractProject.checkout(AbstractProject.java:1218) 17:25:04 at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:586) 17:25:04 at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:475) 17:25:04 at hudson.model.Run.run(Run.java:1434) 17:25:04 at hudson.matrix.MatrixRun.run(MatrixRun.java:146) 17:25:04 at hudson.model.ResourceController.execute(ResourceController.java:88) 17:25:04 at hudson.model.Executor.run(Executor.java:239) This is after the very last rlog message on the console output!! On other slaves, I have this happening on the first member of the matrix or even on the master before triggering the first member of the matrix. Sometimes when I clean the workspace and relaunch, it goes one step further, for example if it had failed on the master, now it passes and fails at the first member of the matrix on the slave!

          I know why the exception is thrown and can resolve that. I don't understand the different timestamps but can take a guess (someone with more knowledge of matrix builds will have to confirm my ideas).

          The CVS plugin does all commands with timestamps from the last completed (non-cancelled) job. Since matrix builds are really a set of different builds grouped under one run, different matrix configuration (I think it refers to them as axis) could potentially give different timestamps for a completed run. Can you look at your jobs and let me know if you can see any timestamps differing for last run start time (or end time) so I can either exclude this as an issue or try and investigate further.

          I'll fix the exception in the meantime (some files could be changed in CVS and not be on the branch/tag we're looking at, when we set a filter on RLOG to only bring back a specific branch this was valid, but the assumption is now incorrect and likely to be broken).

          Michael Clarke added a comment - I know why the exception is thrown and can resolve that. I don't understand the different timestamps but can take a guess (someone with more knowledge of matrix builds will have to confirm my ideas). The CVS plugin does all commands with timestamps from the last completed (non-cancelled) job. Since matrix builds are really a set of different builds grouped under one run, different matrix configuration (I think it refers to them as axis) could potentially give different timestamps for a completed run. Can you look at your jobs and let me know if you can see any timestamps differing for last run start time (or end time) so I can either exclude this as an issue or try and investigate further. I'll fix the exception in the meantime (some files could be changed in CVS and not be on the branch/tag we're looking at, when we set a filter on RLOG to only bring back a specific branch this was valid, but the assumption is now incorrect and likely to be broken).

          Code changed in jenkins
          User: mc1arke
          Path:
          src/main/java/hudson/scm/CvsChangeLogHelper.java
          http://jenkins-ci.org/commit/cvs-plugin/cd691b3c0d97c04249a5f60db2d7a961f2d680eb
          Log:
          [FIXED JENKINS-13227] skip files not in current tag rather than throw exception

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: mc1arke Path: src/main/java/hudson/scm/CvsChangeLogHelper.java http://jenkins-ci.org/commit/cvs-plugin/cd691b3c0d97c04249a5f60db2d7a961f2d680eb Log: [FIXED JENKINS-13227] skip files not in current tag rather than throw exception

          Using the latest 2.4 snapshot from May 31, Jenkins is now able to detect changes for me, and it fixed the "No file version found for the specified tag" issue that I started seeing as well. I am back to making regular builds, thanks for the fixes!

          James Gustafson added a comment - Using the latest 2.4 snapshot from May 31, Jenkins is now able to detect changes for me, and it fixed the "No file version found for the specified tag" issue that I started seeing as well. I am back to making regular builds, thanks for the fixes!

          Amir Isfy added a comment -

          Michael,

          I am using the snapshot from build 21. The 'Use Head If Not Found' seems to be broken. Even though it is checked, it tried to get that branch of the module which does not exist, therefore that module does not get checkout at all and I end up with an empty folder.

          Amir Isfy added a comment - Michael, I am using the snapshot from build 21. The 'Use Head If Not Found' seems to be broken. Even though it is checked, it tried to get that branch of the module which does not exist, therefore that module does not get checkout at all and I end up with an empty folder.

          Amir: Your issue does not sounds like a polling or changelog failure so shouldn't be listed under this issue.

          If you continue to have a problem then switch to the latest released version of the CVS plugin (currently 2.4) and try the failing action again. If it still doesn't work then check JIRA for any issues that sound the same and add the details of your failure to that issue, otherwise raise a new issue attaching your job config, console output and any other details that may be relevant to allow investigation.

          Be aware that 'use head if not found' required the tag/branch you've asked for to at least exist in the repository - you can't just select a random tag name and expect it to switch to head on failing to find that tag.

          Michael Clarke added a comment - Amir: Your issue does not sounds like a polling or changelog failure so shouldn't be listed under this issue. If you continue to have a problem then switch to the latest released version of the CVS plugin (currently 2.4) and try the failing action again. If it still doesn't work then check JIRA for any issues that sound the same and add the details of your failure to that issue, otherwise raise a new issue attaching your job config, console output and any other details that may be relevant to allow investigation. Be aware that 'use head if not found' required the tag/branch you've asked for to at least exist in the repository - you can't just select a random tag name and expect it to switch to head on failing to find that tag.

          Hi Michael,

          Now, change detection is working with CVS Plugin 2.4

          Thanks.

          David Iglesias added a comment - Hi Michael, Now, change detection is working with CVS Plugin 2.4 Thanks.

          Amir Isfy added a comment -

          I am checking out multiple modules but only one of them has the branch I am specifying, the rest of them should come from the head. In version 2.3 the branch/head option could be specified per module but not in this snapshot, here I can only select 'Use Head If Not Found.' I will switch to 2.4 release and research this issue on JIRA.

          Amir Isfy added a comment - I am checking out multiple modules but only one of them has the branch I am specifying, the rest of them should come from the head. In version 2.3 the branch/head option could be specified per module but not in this snapshot, here I can only select 'Use Head If Not Found.' I will switch to 2.4 release and research this issue on JIRA.

          Just came back from vacation, switched to the 2.4 release and everything works like a charm. Thank you so much Michael!

          Guillaume Bilodeau added a comment - Just came back from vacation, switched to the 2.4 release and everything works like a charm. Thank you so much Michael!

            mc1arke Michael Clarke
            gbilodeau Guillaume Bilodeau
            Votes:
            7 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: