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

FSSCM Does Not Update File Modifiers

    Details

    • Type: Bug
    • Status: In Progress (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: filesystem_scm-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.60.3
      Filesystem SCM Plugin 2.0
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            genmad 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.

            Show
            genmad 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.
            Hide
            oleg_nenashev 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

            Show
            oleg_nenashev 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
            Hide
            znerd 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?

            Show
            znerd 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?
            Hide
            genmad 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. 

             

            Show
            genmad 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.   
            Hide
            genmad Jens Rogalli added a comment -

            Oleg Nenashev Ok then  I will implement it as an extra option. 

             

            Show
            genmad Jens Rogalli added a comment - Oleg Nenashev Ok then  I will implement it as an extra option.   
            Hide
            genmad 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.

            Show
            genmad 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.

              People

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

                Dates

                • Created:
                  Updated: