• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • filesystem_scm-plugin
    • None
    • Jenkins ver. 2.60.3
      Filesystem SCM Plugin 2.0

      Steps to reproduce:

      1. Have a Jenkins job that uses the FSSCM plugin to copy from the file system into the workspace.
      2. Execute the job at least once.
      3. Change the modifiers on one of the files in the origin location, e.g. change the x (executable) bit from off to on (e.g. chmod +x filename)
      4. Re-execute the job.

      Expected result:

      1. The modifier bit changes also in the checked-out version of the respective file.

      Actual result:

      1. The modifier bit does not change.

          [JENKINS-49561] FSSCM Does Not Update File Modifiers

          Jens Rogalli added a comment - - edited

          I checked the code and yes you are right this will happen.

          Why is it happening: The code checks for modification dates, but changing file Permissions / modifiers does not change the date.

          File permissions seem to be be a troublesome topic, especially in Windows. So any code modification to achieve the desired behavior, will lead, in my opinion to more bug reports. Or to an exclusion list like File Permissions will be checked but, .... under windows x with Java y it might not work.

          Maybe this topic should be rested as a known bug and be documented. 

          Lets ask oleg_nenashev. I could implement it if he approves the topic to be worthwhile implementing.

          Jens Rogalli added a comment - - edited I checked the code and yes you are right this will happen. Why is it happening: The code checks for modification dates, but changing file Permissions / modifiers does not change the date. File permissions seem to be be a troublesome topic, especially in Windows. So any code modification to achieve the desired behavior, will lead, in my opinion to more bug reports. Or to an exclusion list like File Permissions will be checked but, .... under windows x with Java y it might not work. Maybe this topic should be rested as a known bug and be documented.  Lets ask oleg_nenashev . I could implement it if he approves the topic to be worthwhile implementing.

          Oleg Nenashev added a comment -

          I agree that fixing this bug is regression-prone. OTOH it is always possible the behavior changes opt-in and configurable via advanced options. If you do so, jt will be safe to experiment with behaviors. You could even mark the new flag as experinental so that theee will be a room for breaking changes before it gets fully fixed

          P.S: Personally I use the plugin only for read-only data

          Oleg Nenashev added a comment - I agree that fixing this bug is regression-prone. OTOH it is always possible the behavior changes opt-in and configurable via advanced options. If you do so, jt will be safe to experiment with behaviors. You could even mark the new flag as experinental so that theee will be a room for breaking changes before it gets fully fixed P.S: Personally I use the plugin only for read-only data

          Ernst de Haan added a comment -

          Would it make sense to just implement something very simple, like this:

          • if the permissions are different, just copy the whole file again

          Would that cause potential regression / defects?

          Ernst de Haan added a comment - Would it make sense to just implement something very simple, like this: if the permissions are different, just copy the whole file again Would that cause potential regression / defects?

          Jens Rogalli added a comment -

          That does not make any difference. The implementation would be that simple anyway. 

          The problems arise by the underlying implementations see: https://stackoverflow.com/questions/10783677/how-to-check-file-permissions-in-java-os-independently just as one example. 

           

          Jens Rogalli added a comment - That does not make any difference. The implementation would be that simple anyway.  The problems arise by the underlying implementations see: https://stackoverflow.com/questions/10783677/how-to-check-file-permissions-in-java-os-independently  just as one example.   

          Jens Rogalli added a comment -

          oleg_nenashev Ok then  I will implement it as an extra option. 

           

          Jens Rogalli added a comment - oleg_nenashev Ok then  I will implement it as an extra option.   

          Jens Rogalli added a comment - - edited

           This is the Mergerequest which should resolve this issue.

          Ernst can you check it out and test it? Thank you.

          Jens Rogalli added a comment - - edited  This is the Mergerequest which should resolve this issue. Ernst can you check it out and test it? Thank you.

            genmad Jens Rogalli
            znerd Ernst de Haan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: