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

lastStableBuild not preserved

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: other
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      I think Hudson automatically preserves the lastSuccessfulBuild of a job in case
      it has failed a number of times in a row. But apparently it does not preserve
      the lastStableBuild in case it has been unstable for a while! This is a major
      problem because it makes it unsafe to use lastStableBuild in URLs - you could
      get FileNotFoundException's (should really be 404s) if a test is left to fail
      for too long.

      "Discard Old Builds" should never discard the last stable build (if there was one).

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -
                • Issue 2352 has been marked as a duplicate of this issue. ***
            Show
            jglick Jesse Glick added a comment - Issue 2352 has been marked as a duplicate of this issue. ***
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : jglick
            Path:
            trunk/hudson/main/core/src/main/java/hudson/tasks/ArtifactArchiver.java
            trunk/hudson/main/core/src/main/java/hudson/tasks/LogRotator.java
            trunk/hudson/main/core/src/main/resources/hudson/tasks/ArtifactArchiver/config.jelly
            trunk/hudson/main/core/src/main/resources/hudson/tasks/ArtifactArchiver/config.properties
            trunk/hudson/main/test/src/test/java/hudson/tasks/ArtifactArchiverTest.java
            trunk/hudson/main/test/src/test/java/hudson/tasks/LogRotatorTest.java
            trunk/hudson/main/war/resources/help/project-config/log-rotation.html
            trunk/hudson/main/war/resources/help/tasks/artifactArchiver/latestOnly.html
            http://fisheye4.cenqua.com/changelog/hudson/?cs=15587
            Log:
            [FIXED JENKINS-2417] Taking stability into account when deciding which builds & artifacts to keep.
            Previously, Hudson only tried to keep successful builds, meaning it would discard the last stable build
            if there was a long run of unstable builds. This made .../lastStableBuild/... permalinks useless.
            Artifact archiver logic with "latest only" also improved more generally:
            1. Discards old artifacts at the start of the build. It might as well save the disk space sooner rather than later.
            2. Rather than deleting all old artifacts prior to some point, now keeps the latest representatives
            of different stability classes of build: always keeps last stable if available, and also last successful if newer,
            and (just in case) also the last failed if that is newer. Formerly it behaved oddly: during a run of failed builds,
            all of their artifacts would be kept, though these are unlikely to be useful.
            Also introducing tests for all this functionality, which does not seem to have been tested before.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : jglick Path: trunk/hudson/main/core/src/main/java/hudson/tasks/ArtifactArchiver.java trunk/hudson/main/core/src/main/java/hudson/tasks/LogRotator.java trunk/hudson/main/core/src/main/resources/hudson/tasks/ArtifactArchiver/config.jelly trunk/hudson/main/core/src/main/resources/hudson/tasks/ArtifactArchiver/config.properties trunk/hudson/main/test/src/test/java/hudson/tasks/ArtifactArchiverTest.java trunk/hudson/main/test/src/test/java/hudson/tasks/LogRotatorTest.java trunk/hudson/main/war/resources/help/project-config/log-rotation.html trunk/hudson/main/war/resources/help/tasks/artifactArchiver/latestOnly.html http://fisheye4.cenqua.com/changelog/hudson/?cs=15587 Log: [FIXED JENKINS-2417] Taking stability into account when deciding which builds & artifacts to keep. Previously, Hudson only tried to keep successful builds, meaning it would discard the last stable build if there was a long run of unstable builds. This made .../lastStableBuild/... permalinks useless. Artifact archiver logic with "latest only" also improved more generally: 1. Discards old artifacts at the start of the build. It might as well save the disk space sooner rather than later. 2. Rather than deleting all old artifacts prior to some point, now keeps the latest representatives of different stability classes of build: always keeps last stable if available, and also last successful if newer, and (just in case) also the last failed if that is newer. Formerly it behaved oddly: during a run of failed builds, all of their artifacts would be kept, though these are unlikely to be useful. Also introducing tests for all this functionality, which does not seem to have been tested before.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jglick Jesse Glick
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: