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

LastSuccessful and LastStable symlinks are invalid under Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      Windows Server 2008, NTFS, Jenkins runs as Windows Service
    • Similar Issues:

      Description

      The lastStable and LastSuccessful links are created as invalid symlinks with no destination under Windows. These Files cause the backup to fail, since they are not valid and cause all sorts of zip archivers to fail.

        Attachments

          Issue Links

            Activity

            Hide
            endquote Josh Santangelo added a comment -

            @jesse @joe – My apologies, I'm pretty new to Jenkins and I don't really know how Maven fits in. I'm not specifically doing anything with Maven, but maybe it's involved in all builds?

            The behavior that I'm seeing is that these symlinks can't be followed in the Windows Explorer GUI without applying that fsutil command above. Further, if I look at them from a command line, I see this:

            01/09/2014 05:22 PM <SYMLINK> lastFailedBuild [-1]
            01/10/2014 01:02 PM <SYMLINKD> lastStableBuild [162]
            01/10/2014 01:02 PM <SYMLINKD> lastSuccessfulBuild [162]
            01/05/2014 03:14 PM <SYMLINK> lastUnstableBuild [-1]
            01/09/2014 05:22 PM <SYMLINK> lastUnsuccessfulBuild [-1]

            A regular symlink would show the target of the link instead of a numeric code. I am trying to parse the target in a deployment script.

            If I should enter this bug elsewhere, let me know. Thanks for responding.

            Show
            endquote Josh Santangelo added a comment - @jesse @joe – My apologies, I'm pretty new to Jenkins and I don't really know how Maven fits in. I'm not specifically doing anything with Maven, but maybe it's involved in all builds? The behavior that I'm seeing is that these symlinks can't be followed in the Windows Explorer GUI without applying that fsutil command above. Further, if I look at them from a command line, I see this: 01/09/2014 05:22 PM <SYMLINK> lastFailedBuild [-1] 01/10/2014 01:02 PM <SYMLINKD> lastStableBuild [162] 01/10/2014 01:02 PM <SYMLINKD> lastSuccessfulBuild [162] 01/05/2014 03:14 PM <SYMLINK> lastUnstableBuild [-1] 01/09/2014 05:22 PM <SYMLINK> lastUnsuccessfulBuild [-1] A regular symlink would show the target of the link instead of a numeric code. I am trying to parse the target in a deployment script. If I should enter this bug elsewhere, let me know. Thanks for responding.
            Hide
            endquote Josh Santangelo added a comment -

            Expanding on the above directory listing, note how the links to build numbers show the target, but the "last*" ones don't.

            01/10/2014 02:25 PM <DIR> .
            01/10/2014 02:25 PM <DIR> ..
            01/09/2014 02:09 PM <SYMLINKD> 152 [2014-01-09_14-08-58]
            01/09/2014 03:24 PM <SYMLINKD> 153 [2014-01-09_15-24-00]
            01/09/2014 03:29 PM <SYMLINKD> 154 [2014-01-09_15-29-22]
            01/09/2014 03:44 PM <SYMLINKD> 155 [2014-01-09_15-44-02]
            01/09/2014 04:09 PM <SYMLINKD> 156 [2014-01-09_16-09-01]
            01/09/2014 05:19 PM <SYMLINKD> 157 [2014-01-09_17-19-02]
            01/09/2014 06:29 PM <SYMLINKD> 158 [2014-01-09_18-28-59]
            01/10/2014 11:09 AM <SYMLINKD> 159 [2014-01-10_11-09-02]
            01/10/2014 12:31 PM <SYMLINKD> 160 [2014-01-10_12-31-32]
            01/10/2014 12:49 PM <SYMLINKD> 161 [2014-01-10_12-48-59]
            01/10/2014 12:58 PM <SYMLINKD> 162 [2014-01-10_12-58-51]
            01/09/2014 02:12 PM <DIR> 2014-01-09_14-08-58
            01/09/2014 03:27 PM <DIR> 2014-01-09_15-24-00
            01/09/2014 03:33 PM <DIR> 2014-01-09_15-29-22
            01/09/2014 03:47 PM <DIR> 2014-01-09_15-44-02
            01/09/2014 04:12 PM <DIR> 2014-01-09_16-09-01
            01/09/2014 05:22 PM <DIR> 2014-01-09_17-19-02
            01/09/2014 06:32 PM <DIR> 2014-01-09_18-28-59
            01/10/2014 11:13 AM <DIR> 2014-01-10_11-09-02
            01/10/2014 12:35 PM <DIR> 2014-01-10_12-31-32
            01/10/2014 12:52 PM <DIR> 2014-01-10_12-48-59
            01/10/2014 01:02 PM <DIR> 2014-01-10_12-58-51
            01/08/2014 10:24 PM <DIR> archive
            01/09/2014 05:22 PM <SYMLINK> lastFailedBuild [-1]
            01/10/2014 01:02 PM <SYMLINKD> lastStableBuild [162]
            01/10/2014 01:02 PM <SYMLINKD> lastSuccessfulBuild [162]
            01/05/2014 03:14 PM <SYMLINK> lastUnstableBuild [-1]
            01/09/2014 05:22 PM <SYMLINK> lastUnsuccessfulBuild [-1]

            Show
            endquote Josh Santangelo added a comment - Expanding on the above directory listing, note how the links to build numbers show the target, but the "last*" ones don't. 01/10/2014 02:25 PM <DIR> . 01/10/2014 02:25 PM <DIR> .. 01/09/2014 02:09 PM <SYMLINKD> 152 [2014-01-09_14-08-58] 01/09/2014 03:24 PM <SYMLINKD> 153 [2014-01-09_15-24-00] 01/09/2014 03:29 PM <SYMLINKD> 154 [2014-01-09_15-29-22] 01/09/2014 03:44 PM <SYMLINKD> 155 [2014-01-09_15-44-02] 01/09/2014 04:09 PM <SYMLINKD> 156 [2014-01-09_16-09-01] 01/09/2014 05:19 PM <SYMLINKD> 157 [2014-01-09_17-19-02] 01/09/2014 06:29 PM <SYMLINKD> 158 [2014-01-09_18-28-59] 01/10/2014 11:09 AM <SYMLINKD> 159 [2014-01-10_11-09-02] 01/10/2014 12:31 PM <SYMLINKD> 160 [2014-01-10_12-31-32] 01/10/2014 12:49 PM <SYMLINKD> 161 [2014-01-10_12-48-59] 01/10/2014 12:58 PM <SYMLINKD> 162 [2014-01-10_12-58-51] 01/09/2014 02:12 PM <DIR> 2014-01-09_14-08-58 01/09/2014 03:27 PM <DIR> 2014-01-09_15-24-00 01/09/2014 03:33 PM <DIR> 2014-01-09_15-29-22 01/09/2014 03:47 PM <DIR> 2014-01-09_15-44-02 01/09/2014 04:12 PM <DIR> 2014-01-09_16-09-01 01/09/2014 05:22 PM <DIR> 2014-01-09_17-19-02 01/09/2014 06:32 PM <DIR> 2014-01-09_18-28-59 01/10/2014 11:13 AM <DIR> 2014-01-10_11-09-02 01/10/2014 12:35 PM <DIR> 2014-01-10_12-31-32 01/10/2014 12:52 PM <DIR> 2014-01-10_12-48-59 01/10/2014 01:02 PM <DIR> 2014-01-10_12-58-51 01/08/2014 10:24 PM <DIR> archive 01/09/2014 05:22 PM <SYMLINK> lastFailedBuild [-1] 01/10/2014 01:02 PM <SYMLINKD> lastStableBuild [162] 01/10/2014 01:02 PM <SYMLINKD> lastSuccessfulBuild [162] 01/05/2014 03:14 PM <SYMLINK> lastUnstableBuild [-1] 01/09/2014 05:22 PM <SYMLINK> lastUnsuccessfulBuild [-1]
            Hide
            jglick Jesse Glick added a comment -

            <SYMLINK> lastFailedBuild [-1]
            <SYMLINKD> lastStableBuild [162]

            looks right to me. There are no failed builds, which the bogus target -1 indicates. The last stable build is #162, so lastStableBuild links to that (which is itself a symlink to the actual build directory, 2014-01-10_12-58-51).

            Whether or not the Explorer GUI allows (valid) symlinks to be traversed is a secondary consideration, so long as Jenkins code can read the symlink target.

            Show
            jglick Jesse Glick added a comment - <SYMLINK> lastFailedBuild [-1] <SYMLINKD> lastStableBuild [162] looks right to me. There are no failed builds, which the bogus target -1 indicates. The last stable build is #162, so lastStableBuild links to that (which is itself a symlink to the actual build directory, 2014-01-10_12-58-51 ). Whether or not the Explorer GUI allows (valid) symlinks to be traversed is a secondary consideration, so long as Jenkins code can read the symlink target.
            Hide
            endquote Josh Santangelo added a comment -

            You know, you're right. I was misinterpreting that number. This should work fine for my needs.

            The issue with explorer not following the links by default is real, though.

            Show
            endquote Josh Santangelo added a comment - You know, you're right. I was misinterpreting that number. This should work fine for my needs. The issue with explorer not following the links by default is real, though.
            Hide
            jglick Jesse Glick added a comment -

            If you can find a command which can be run as the Jenkins user which detects whether the fsutil command needs be run (as an administrator), file an RFE for Jenkins to warn you of this, most simply via a console warning but ideally using an AdministrativeMonitor. (Even better would be for Jenkins to offer to run it after you supply an administrator login, using the Windows equivalent of sudo if there is such a thing.)

            Show
            jglick Jesse Glick added a comment - If you can find a command which can be run as the Jenkins user which detects whether the fsutil command needs be run (as an administrator), file an RFE for Jenkins to warn you of this, most simply via a console warning but ideally using an AdministrativeMonitor . (Even better would be for Jenkins to offer to run it after you supply an administrator login, using the Windows equivalent of sudo if there is such a thing.)

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                fabian_tietz Fabian Tietz
              • Votes:
                0 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: