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

CVS "Tag this build" extremely slow

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: cvs-plugin
    • Labels:
    • Environment:
      Linux 2.6.24-16 i686 ; Jenkins 1.486
    • Similar Issues:

      Description

      After a build has been completed, it is possible to tag this build.
      I'm using CVS.
      After typing the tag name, heres the log :
      Build #190
      Application d'un nom (tag) est en cours:
      Using locally configured password for connection to :pserver:***@**:/***
      Using locally configured password for connection to :pserver:***@**:/***
      Using locally configured password for connection to :pserver:***@**:/***
      Using locally configured password for connection to :pserver:***@**:/***
      etc. etc.

      Many many identical lines, about 2 per second. Tagging is extremely slow, in comparison with the same action using my Eclipse environment.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Michael Clarke
          Path:
          src/main/java/hudson/scm/AbstractCvs.java
          src/main/java/hudson/scm/cvstagging/CvsTagActionWorker.java
          http://jenkins-ci.org/commit/cvs-plugin/8155c0eb0a1c784aa239bc5a50356ff70edf9f59
          Log:
          [FIXED JENKINS-15735] Group files together to improve cvs rlog efficiency


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Clarke Path: src/main/java/hudson/scm/AbstractCvs.java src/main/java/hudson/scm/cvstagging/CvsTagActionWorker.java http://jenkins-ci.org/commit/cvs-plugin/8155c0eb0a1c784aa239bc5a50356ff70edf9f59 Log: [FIXED JENKINS-15735] Group files together to improve cvs rlog efficiency – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .
          Hide
          lapsus63 Olivier Chorier added a comment -

          Great news, thank you very much.
          Do you know what is the targeted version for this fix ?

          Show
          lapsus63 Olivier Chorier added a comment - Great news, thank you very much. Do you know what is the targeted version for this fix ?
          Hide
          ralf_eisele Ralf Eisele added a comment - - edited

          With cvs plugin 2.8 tagging is working.
          with cvs plugin 2.9 is does not work.

          The Bug is in class CVSTagActionWorker.java. Please replace line:

          isSuccess = isSuccess || cvsClient.executeCommand(rtagCommand, globalOptions);
          

          with

          isSuccess |= cvsClient.executeCommand(rtagCommand, globalOptions);
          

          Then everything works as expected.

          Show
          ralf_eisele Ralf Eisele added a comment - - edited With cvs plugin 2.8 tagging is working. with cvs plugin 2.9 is does not work. The Bug is in class CVSTagActionWorker.java. Please replace line: isSuccess = isSuccess || cvsClient.executeCommand(rtagCommand, globalOptions); with isSuccess |= cvsClient.executeCommand(rtagCommand, globalOptions); Then everything works as expected.
          Hide
          mc1arke Michael Clarke added a comment -

          Ralf: could you give some more detail to 'does not work' - what errors do you see, what steps do you take to replicate that error, and how is your fix overcoming this?

          Show
          mc1arke Michael Clarke added a comment - Ralf: could you give some more detail to 'does not work' - what errors do you see, what steps do you take to replicate that error, and how is your fix overcoming this?
          Hide
          ralf_eisele Ralf Eisele added a comment -

          Hi Michael,

          nice to here from you. I will try to explain the bug.

          If the variable isSuccess becomes "true" then the second part of the condition "cvsClient.executeCommand(rtagCommand, globalOptions);" will never be executed anymore.
          In the for loop only the first iteration will execute the cvsClient command, and the other iterations (other projects) will not be tagged.

          Maybe the "isSuccess |= cvsClient.executeCommand(rtagCommand, globalOptions);" is not correct too. All projects are tagged, but the last iteration returns the state if "the for loop" is successful or not. I think an "and" expression is better, to get the "overall" state.

          Show
          ralf_eisele Ralf Eisele added a comment - Hi Michael, nice to here from you. I will try to explain the bug. If the variable isSuccess becomes "true" then the second part of the condition "cvsClient.executeCommand(rtagCommand, globalOptions);" will never be executed anymore. In the for loop only the first iteration will execute the cvsClient command, and the other iterations (other projects) will not be tagged. Maybe the "isSuccess |= cvsClient.executeCommand(rtagCommand, globalOptions);" is not correct too. All projects are tagged, but the last iteration returns the state if "the for loop" is successful or not. I think an "and" expression is better, to get the "overall" state.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Michael Clarke
          Path:
          src/main/java/hudson/scm/cvstagging/CvsTagActionWorker.java
          http://jenkins-ci.org/commit/cvs-plugin/0f47d5cae5647ffec2c58c843badb8d8f51e3fb0
          Log:
          [FIXED JENKINS-15735] Correct tagging action across multiple modules

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Clarke Path: src/main/java/hudson/scm/cvstagging/CvsTagActionWorker.java http://jenkins-ci.org/commit/cvs-plugin/0f47d5cae5647ffec2c58c843badb8d8f51e3fb0 Log: [FIXED JENKINS-15735] Correct tagging action across multiple modules
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Michael Clarke
          Path:
          src/main/java/hudson/scm/cvstagging/CvsTagActionWorker.java
          http://jenkins-ci.org/commit/cvs-plugin/612c500c8f9dbeb8febc83f0c0f7a617b0c22287
          Log:
          [FIXED JENKINS-15735] Correct tagging action across multiple modules

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Clarke Path: src/main/java/hudson/scm/cvstagging/CvsTagActionWorker.java http://jenkins-ci.org/commit/cvs-plugin/612c500c8f9dbeb8febc83f0c0f7a617b0c22287 Log: [FIXED JENKINS-15735] Correct tagging action across multiple modules
          Hide
          mc1arke Michael Clarke added a comment -

          Ok - the previous logic shortcut meant that any module after the first successful one was skipped, unless a subsequent module tagging action failed. This also meant that the result was potentially misreported if a module failed but subsequent modules passed.

          I've changed the logic to run until a module fails, at which point no further modules are tagged and the result is reported to the user.

          Thanks for your report.

          Show
          mc1arke Michael Clarke added a comment - Ok - the previous logic shortcut meant that any module after the first successful one was skipped, unless a subsequent module tagging action failed. This also meant that the result was potentially misreported if a module failed but subsequent modules passed. I've changed the logic to run until a module fails, at which point no further modules are tagged and the result is reported to the user. Thanks for your report.

            People

            • Assignee:
              Unassigned
              Reporter:
              lapsus63 Olivier Chorier
            • Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: