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

lastSuccessful symbolic link is updated before artifact archiving is complete

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • other
    • None
    • Platform: PC, OS: Linux

      I have a hudson task that produces about 1Gb of files, that are archived. The
      archiving step takes quite a long time (>10min).

      During this time the data in lastSuccessful appears not to point to the last
      successful build, but to the "soon to be completed" build.

      Since I use the lastSuccessful link to publish the build result with an rsync
      daemon this behavior gives me problems. If I access the rsync server during the
      "archiving time", I will get inconsistent data (partially copied data).

      I would suggest that the lastSuccessful link should be updated as the very last
      step of the build, or at least after the archiving step is complete.

      (I am quite new to hudson, so I might have missed something obvious, in which
      case I humbly apologize.)

          [JENKINS-2543] lastSuccessful symbolic link is updated before artifact archiving is complete

          Alan Harder added a comment -

          sorry this wasn't looked at for so long.. I just checked the code and the bug still exists. Another problem with this ordering: if the build is successful up to the point where it makes those symlinks then it updates them.. but a post-build action may change the build status, so you may end up with a "lastStable" symlink but Hudson shows the build as failed.

          Alan Harder added a comment - sorry this wasn't looked at for so long.. I just checked the code and the bug still exists. Another problem with this ordering: if the build is successful up to the point where it makes those symlinks then it updates them.. but a post-build action may change the build status, so you may end up with a "lastStable" symlink but Hudson shows the build as failed.

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/model/AbstractBuild.java
          trunk/hudson/main/test/src/test/java/hudson/model/AbstractProjectTest.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=26069
          Log:
          [FIXED JENKINS-2543] don't update lastStable/lastSuccessful symlinks until final
          build result is known (after post-build actions).

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/AbstractBuild.java trunk/hudson/main/test/src/test/java/hudson/model/AbstractProjectTest.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=26069 Log: [FIXED JENKINS-2543] don't update lastStable/lastSuccessful symlinks until final build result is known (after post-build actions).

            mindless Alan Harder
            m95lah m95lah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: