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

The CVS changes detector does not exclude changes outside of HEAD if SCM Location Head is selected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: cvs-plugin
    • Labels:
    • Environment:
      SUSE Linux Enterprise Server 11 SP2 on x86-64
    • Similar Issues:

      Description

      Bug found using the Jenkins CVS-Plugin version 2.6:
      The detection for changes for a CVS SCM is actually made with the cvs rlog command.
      The cvs rlog command does not set the revision option (-r) when polling HEAD or any other branches.
      If no -r option is applied all changes of all branches are detected!
      The cvs rlog option -r<branch> has always to be appended.
      If the Head is configured cvs rlog command has to use -rHEAD.

        Attachments

          Activity

          Hide
          mc1arke Michael Clarke added a comment -

          Do you have rlog output and the name of the branch you're building against? We don't apply -r since CvsLog does filtering according to version numbers so should filter out the changes we're not interested in.

          Show
          mc1arke Michael Clarke added a comment - Do you have rlog output and the name of the branch you're building against? We don't apply -r since CvsLog does filtering according to version numbers so should filter out the changes we're not interested in.
          Hide
          hidminds Daniel Fischer added a comment -

          Please see attached file JENKINS-15416.zip .
          As you can see in included file hyperdoc-buildresources-HEAD\config.xml the HEAD is selected.
          The pollingLog file mentions a sourcecode change.
          The changes.htm shows one changed file /iqdoq/product/hyp4x/build/versno.properties with revision no 1.1307.2.18.2.41 .
          To verify that this revision was not checked in to the Head (branch) please see the screenshot file viewvc_screenshot_shows_commit_is_on_branch_hyp-5-3-1-branch_and_not_HEAD.png . The commit was done in branch hyp-5-3-1-branch (not HEAD).

          Also in jenkins.log I am getting numerous warnings like "#65188 warning C/S protocol error (section 5.10). It's regurarly observed with cvs 1.12.xx servers.".

          Show
          hidminds Daniel Fischer added a comment - Please see attached file JENKINS-15416 .zip . As you can see in included file hyperdoc-buildresources-HEAD\config.xml the HEAD is selected. The pollingLog file mentions a sourcecode change. The changes.htm shows one changed file /iqdoq/product/hyp4x/build/versno.properties with revision no 1.1307.2.18.2.41 . To verify that this revision was not checked in to the Head (branch) please see the screenshot file viewvc_screenshot_shows_commit_is_on_branch_hyp-5-3-1-branch_and_not_HEAD.png . The commit was done in branch hyp-5-3-1-branch (not HEAD). Also in jenkins.log I am getting numerous warnings like "#65188 warning C/S protocol error (section 5.10). It's regurarly observed with cvs 1.12.xx servers.".
          Hide
          hidminds Daniel Fischer added a comment -

          I have copied the job hyperdoc-buildresources-HEAD for the build of another branch (hyp-5-4-0-branch). I have named the job hyperdoc-buildresources-5-4-0
          If a commit is done out of that hyp-5-4-0-branch, the job hyperdoc-buildresources-5-4-0 detects no scm changes.
          This leads me to the assumption that the scm changes detector only has problems if the job uses the CVS Head.

          Perhaps the logic has to be changed that when Head is selected the changes detector has to filter out all branches rather than include a specific branch?

          Show
          hidminds Daniel Fischer added a comment - I have copied the job hyperdoc-buildresources-HEAD for the build of another branch (hyp-5-4-0-branch). I have named the job hyperdoc-buildresources-5-4-0 If a commit is done out of that hyp-5-4-0-branch, the job hyperdoc-buildresources-5-4-0 detects no scm changes. This leads me to the assumption that the scm changes detector only has problems if the job uses the CVS Head. Perhaps the logic has to be changed that when Head is selected the changes detector has to filter out all branches rather than include a specific branch?
          Hide
          mc1arke Michael Clarke added a comment -

          The "It's regurarly observed with cvs 1.12.xx servers" warnings are your CVS server not following the CVS protocol properly (they don't set the path to CVS root in their response) and can be safely ignored if you're not having issues (I think we'd have to modify CVS Client if we wanted to prevent this message completely).

          Are you able to provide the output of the rlog command for the period you were building? Feel free to obfuscate any sensitive values (repository names, paths, filenames etc) if needed. This would help greatly in recreating the issue and adding unit tests to prevent it re-occurring. Also, what comment is shown against the change if you select it on the changes page? Is it 'xxxx was originally added on branch xxxx'?

          Show
          mc1arke Michael Clarke added a comment - The "It's regurarly observed with cvs 1.12.xx servers" warnings are your CVS server not following the CVS protocol properly (they don't set the path to CVS root in their response) and can be safely ignored if you're not having issues (I think we'd have to modify CVS Client if we wanted to prevent this message completely). Are you able to provide the output of the rlog command for the period you were building? Feel free to obfuscate any sensitive values (repository names, paths, filenames etc) if needed. This would help greatly in recreating the issue and adding unit tests to prevent it re-occurring. Also, what comment is shown against the change if you select it on the changes page? Is it 'xxxx was originally added on branch xxxx'?
          Hide
          hidminds Daniel Fischer added a comment -

          Please see attached file cvs_rlog_out_hyperdoc-buildresources-HEAD-3.txt .

          I have simply 'replayed' the CVS rlog output command like that on the linux jenkins master command line:
          cvs rlog -S -d"05 Oct 2012 11:00:41 +0200<05 Oct 2012 16:00:53 +0200" iqdoq/product/hyp4x/build 2>&1> cvs_rlog_out_hyperdoc-buildresources-HEAD-3.txt

          Show
          hidminds Daniel Fischer added a comment - Please see attached file cvs_rlog_out_hyperdoc-buildresources-HEAD-3.txt . I have simply 'replayed' the CVS rlog output command like that on the linux jenkins master command line: cvs rlog -S -d"05 Oct 2012 11:00:41 +0200<05 Oct 2012 16:00:53 +0200" iqdoq/product/hyp4x/build 2>&1> cvs_rlog_out_hyperdoc-buildresources-HEAD-3.txt
          Hide
          hidminds Daniel Fischer added a comment -

          The comment on the changes page is:
          Ă„nderungen
          Zusammenfassung

          Autobuild: Release build hyp-5-3-1-28_442

          autobuild:
          Autobuild: Release build hyp-5-3-1-28_442
          The file was modified 1.1307.2.18.2.41 /iqdoq/product/hyp4x/build/versno.properties

          Show
          hidminds Daniel Fischer added a comment - The comment on the changes page is: Ă„nderungen Zusammenfassung Autobuild: Release build hyp-5-3-1-28_442 autobuild: Autobuild: Release build hyp-5-3-1-28_442 The file was modified 1.1307.2.18.2.41 /iqdoq/product/hyp4x/build/versno.properties
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Michael Clarke
          Path:
          src/main/java/hudson/scm/CvsLog.java
          src/test/java/hudson/scm/CvsChangeLogHelperTest.java
          src/test/resources/hudson/scm/cvsRlogOutputHead.txt
          http://jenkins-ci.org/commit/cvs-plugin/1f8811272f1b5b6d0b25b7a9768a34dfb0895f75
          Log:
          [FIXED JENKINS-15416] Filter out non head changes if we're on head

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Clarke Path: src/main/java/hudson/scm/CvsLog.java src/test/java/hudson/scm/CvsChangeLogHelperTest.java src/test/resources/hudson/scm/cvsRlogOutputHead.txt http://jenkins-ci.org/commit/cvs-plugin/1f8811272f1b5b6d0b25b7a9768a34dfb0895f75 Log: [FIXED JENKINS-15416] Filter out non head changes if we're on head
          Hide
          hidminds Daniel Fischer added a comment -

          Fix verified with Jenkins CVS Plug-in version 2.7.

          Show
          hidminds Daniel Fischer added a comment - Fix verified with Jenkins CVS Plug-in version 2.7.

            People

            • Assignee:
              mc1arke Michael Clarke
              Reporter:
              hidminds Daniel Fischer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: