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

Jenkins 1.509 has different behaviour with symlink handling of e.g. lastSuccessful

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • core
    • None

      I upgraded a system to Jenkins v1.509 and noticed a custom script breaks now which used to work fine. The reason seems to be a change which seems to have been introduced somewhere around v1.509 if I'm not mistaken.

      Old behaviour:

      1. ls -la /var/lib/jenkins/jobs/foo/lastSuccessful
        lrwxrwxrwx 1 jenkins nogroup 26 Feb 1 22:00 /var/lib/jenkins/jobs/foo/lastSuccessful -> builds/2013-02-01_22-00-34/

      New behaviour:

      1. ls -la /var/lib/jenkins/jobs/foo/lastSuccessful
        lrwxrwxrwx 1 jenkins nogroup 26 Apr 3 07:02 /var/lib/jenkins/jobs/foo/lastSuccessful -> builds/lastSuccessfulBuild/

      People using the target's name of the symlink (like "2013-02-01_22-00-34" in my example) inside scripts for further processing might have broken scripts due to that change.

      Could someone please confirm this change and the reason for that change?

          [JENKINS-17449] Jenkins 1.509 has different behaviour with symlink handling of e.g. lastSuccessful

          kutzi added a comment -

          kutzi added a comment - Probably related to JENKINS-16089 resp. https://github.com/jenkinsci/jenkins/commit/88feabb4296d6483bdb5c85fed489e5014161ca5

          kutzi added a comment - - edited

          AFAIK the format of these links has been defined nowhere, so I guess it's very hard to argue that this change is a bug.
          If your external script is depending on some detail on how the links were generated and is failing now because of how they are generated now than that's IMHO just a problem of your script - because it's seemingly not following the symlink to the end.

          kutzi added a comment - - edited AFAIK the format of these links has been defined nowhere, so I guess it's very hard to argue that this change is a bug. If your external script is depending on some detail on how the links were generated and is failing now because of how they are generated now than that's IMHO just a problem of your script - because it's seemingly not following the symlink to the end.

          ACK, the fix was easy for me. I just wanted to report this issue since other people might stumble upon it as well. So if developers decide that this is not an issue feel free to close it, I just wanted to report it since this change broke a real-life setup.

          Michael Prokop added a comment - ACK, the fix was easy for me. I just wanted to report this issue since other people might stumble upon it as well. So if developers decide that this is not an issue feel free to close it, I just wanted to report it since this change broke a real-life setup.

            Unassigned Unassigned
            mika Michael Prokop
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: