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

Differences in config spec detected when config spec is read from file

    XMLWordPrintable

Details

    Description

      Hello *,

      I'm currently updating jenkins clearcase plugin to version 1.3.14.
      The feature that the config spec can be read from a file is great because it will save me a lot of work.

      Unfortunately it is not working in my configuration.

      Description:
      The config spec file contains e.g. the following line:
      element /MyVOB/... .../MyBranch/LATEST

      Jenkins is running on a Windows7 machine. The "cleartool catcs" command will print the above line with backslash instead of slash:
      element \MyVOB\... ...\MyBranch\LASTEST

      Jenkins therefore permanently detects changes in the config spec and is building the project although it is not necessary.

      The plugin should be able to deal with \ and /.

      EDIT:
      Seems like this problem is not directly related to the "read config spec from file" option.
      The new plugin always detects changes in the config spec, even when I disable this feature.
      Configuration was working with Plugin 1.3.6.
      See attached screenshot for configuration details of 1.3.6.

      Attachments

        Activity

          thomasw Thomas Wendel created issue -
          thomasw Thomas Wendel made changes -
          Field Original Value New Value
          Attachment Screenshot.png [ 23282 ]
          Description Hello *,

          I'm currently updating jenkins clearcase plugin to version 1.3.14.
          The feature that the config spec can be read from a file is great because it will save me a lot of work.

          Unfortunately it is not working in my configuration.

          Description:
          The config spec file contains e.g. the following line:
          element /MyVOB/... .../MyBranch/LATEST

          Jenkins is running on a Windows7 machine. The "cleartool catcs" command will print the above line with backslash instead of slash:
          element \MyVOB\... ...\MyBranch\LASTEST

          Jenkins therefore permanently detects changes in the config spec and is building the project although it is not necessary.

          The plugin should be able to deal with \ and /.
          Hello *,

          I'm currently updating jenkins clearcase plugin to version 1.3.14.
          The feature that the config spec can be read from a file is great because it will save me a lot of work.

          Unfortunately it is not working in my configuration.

          Description:
          The config spec file contains e.g. the following line:
          element /MyVOB/... .../MyBranch/LATEST

          Jenkins is running on a Windows7 machine. The "cleartool catcs" command will print the above line with backslash instead of slash:
          element \MyVOB\... ...\MyBranch\LASTEST

          Jenkins therefore permanently detects changes in the config spec and is building the project although it is not necessary.

          The plugin should be able to deal with \ and /.


          EDIT:
          Seems like this problem is not directly related to the "read config spec from file" option.
          The new plugin always detects changes in the config spec, even when I disable this feature.
          Configuration was working with Plugin 1.3.6.
          See attached screenshot for configuration details of 1.3.6.
          tomshi Thomas Birkl added a comment -

          I fell into that pit, too.
          It seems to be intependent if the CS is read from file or defined static in the Jenkins job.
          When Jenkins sets the config-spec on Windows platforms it obviously converts slashes to backslashes,
          which results in the mentioned CS mismatch (and e.g. triggers SCM polled builds).
          I fixed it by changing the CS definition in Jenkins to use backslashes.

          Accepting both by the plugin would be nice. However, at least in our environments VOBs
          are located below the root directory on Windows and below /vobs on Unix.
          So config-specs at least for us are platform specific.

          tomshi Thomas Birkl added a comment - I fell into that pit, too. It seems to be intependent if the CS is read from file or defined static in the Jenkins job. When Jenkins sets the config-spec on Windows platforms it obviously converts slashes to backslashes, which results in the mentioned CS mismatch (and e.g. triggers SCM polled builds). I fixed it by changing the CS definition in Jenkins to use backslashes. Accepting both by the plugin would be nice. However, at least in our environments VOBs are located below the root directory on Windows and below /vobs on Unix. So config-specs at least for us are platform specific.

          Hi all,

          I am new to this so please excuse if I did something wrong but I tried to fix this in
          hudson.plugins.clearcase.ConfigSpec.equals
          method.

          Please see my fix on cspCompareFix branch.

          siggae Michael Siggelkow added a comment - Hi all, I am new to this so please excuse if I did something wrong but I tried to fix this in hudson.plugins.clearcase.ConfigSpec.equals method. Please see my fix on cspCompareFix branch.
          siggae Michael Siggelkow made changes -
          Status Open [ 1 ] In Progress [ 3 ]

          I raised the following Pull request now which should solve the issue:
          https://github.com/jenkinsci/clearcase-plugin/pull/23

          siggae Michael Siggelkow added a comment - I raised the following Pull request now which should solve the issue: https://github.com/jenkinsci/clearcase-plugin/pull/23

          Code changed in jenkins
          User: Vincent Latombe
          Path:
          src/main/java/hudson/plugins/clearcase/ConfigSpec.java
          src/test/java/hudson/plugins/clearcase/ConfigSpecTest.java
          src/test/resources/hudson/plugins/clearcase/ct-catcs-2-CRLF.log
          src/test/resources/hudson/plugins/clearcase/ct-catcs-2-LF.log
          http://jenkins-ci.org/commit/clearcase-plugin/732b41ecd594ad6b662edafbcea8cf0b046a9f0e
          Log:
          JENKINS-17096 Convert OS specific separators upfront in ConfigSpec

          Raw config spec may have been defined with different OS separators,
          leading to issues when comparing them.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: src/main/java/hudson/plugins/clearcase/ConfigSpec.java src/test/java/hudson/plugins/clearcase/ConfigSpecTest.java src/test/resources/hudson/plugins/clearcase/ct-catcs-2-CRLF.log src/test/resources/hudson/plugins/clearcase/ct-catcs-2-LF.log http://jenkins-ci.org/commit/clearcase-plugin/732b41ecd594ad6b662edafbcea8cf0b046a9f0e Log: JENKINS-17096 Convert OS specific separators upfront in ConfigSpec Raw config spec may have been defined with different OS separators, leading to issues when comparing them.

          Code changed in jenkins
          User: Vincent Latombe
          Path:
          src/main/java/hudson/plugins/clearcase/ConfigSpec.java
          src/test/java/hudson/plugins/clearcase/ConfigSpecTest.java
          src/test/resources/hudson/plugins/clearcase/ct-catcs-2-CRLF.log
          src/test/resources/hudson/plugins/clearcase/ct-catcs-2-LF.log
          http://jenkins-ci.org/commit/clearcase-plugin/89001f301e1983f7ab165fde1c8c4bb64d02ee57
          Log:
          JENKINS-17096 Convert OS specific separators upfront in ConfigSpec

          Raw config spec may have been defined with different OS separators,
          leading to issues when comparing them.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: src/main/java/hudson/plugins/clearcase/ConfigSpec.java src/test/java/hudson/plugins/clearcase/ConfigSpecTest.java src/test/resources/hudson/plugins/clearcase/ct-catcs-2-CRLF.log src/test/resources/hudson/plugins/clearcase/ct-catcs-2-LF.log http://jenkins-ci.org/commit/clearcase-plugin/89001f301e1983f7ab165fde1c8c4bb64d02ee57 Log: JENKINS-17096 Convert OS specific separators upfront in ConfigSpec Raw config spec may have been defined with different OS separators, leading to issues when comparing them.
          thomasw Thomas Wendel added a comment -

          Hi!

          The bug report and especially the fix has already had birthday.... is there a chance to get this into a released version??

          thomasw Thomas Wendel added a comment - Hi! The bug report and especially the fix has already had birthday.... is there a chance to get this into a released version??

          According to the commit information, this has been included since release 1.4 but I forgot to update the issue.

          vlatombe Vincent Latombe added a comment - According to the commit information, this has been included since release 1.4 but I forgot to update the issue.
          vlatombe Vincent Latombe made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 147927 ] JNJira + In-Review [ 192647 ]

          People

            vlatombe Vincent Latombe
            thomasw Thomas Wendel
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: