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

Setting 0 in the "Number of builds to keep" fields produce strange behavior

    XMLWordPrintable

    Details

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

      Description

      If you set the number of builds to keep on a project to zero, successfull and
      unstable builds behave right but failed builds are simply ignored (no history,
      no red bullet, nothing ...).

      On a projet with such a setup, when the build fails nothing particular is logged
      but in the build console you get this :

      [HUDSON] Archiving /srv/var/hudson/jobs/dumb/workspace/checkout/pom.xml to
      /srv/var/hudson/jobs/dumb/modules/foo$dumb/builds/2009-07-27_09-27-51/archive/foo/dumb/1.0.0-SNAPSHOT/pom.xml
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Compilation failure
      Failure executing javac, but could not parse the error:
      Fatal Error: Unable to find package java.lang in classpath or bootclasspath

      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 7 seconds
      [INFO] Finished at: Mon Jul 27 09:28:01 UTC 2009
      <html><head><title>Error 404</title></head><body bgcolor="#ffffff"><h1>Status
      Code: 404</h1>Exception: <br>Stacktrace: <pre>(none)
      </pre><br><hr size="1" width="90%"><i>Generated by Winstone Servlet Engine
      v0.9.10 at Mon Jul 27 09:28:02 UTC 2009</i></body></html>

      I don't know how this can be solved, maybe by preventing a value of zero in this
      field.

        Attachments

          Activity

          eskatos eskatos created issue -
          Hide
          mindless Alan Harder added a comment -

          I would argue that the behavior you describe is correct.. you told it to save no
          builds, though Hudson will exceed your limits in some cases in order to save a
          successful build. So it saves 1 stable/unstable build even though you said save
          none, and when there is a failed build it deletes it right away and keeps the
          stable/unstable build instead.

          That said, a zero setting doesn't make much sense.. so I've added a validator
          warning if you enter zero.

          Show
          mindless Alan Harder added a comment - I would argue that the behavior you describe is correct.. you told it to save no builds, though Hudson will exceed your limits in some cases in order to save a successful build. So it saves 1 stable/unstable build even though you said save none, and when there is a failed build it deletes it right away and keeps the stable/unstable build instead. That said, a zero setting doesn't make much sense.. so I've added a validator warning if you enter zero.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/resources/hudson/tasks/LogRotator/config.jelly
          trunk/hudson/main/war/resources/scripts/hudson-behavior.js
          http://fisheye4.cenqua.com/changelog/hudson/?cs=20559
          Log:
          [FIXED JENKINS-4110] show warning if zero value entered for #builds/#days to save

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/resources/hudson/tasks/LogRotator/config.jelly trunk/hudson/main/war/resources/scripts/hudson-behavior.js http://fisheye4.cenqua.com/changelog/hudson/?cs=20559 Log: [FIXED JENKINS-4110] show warning if zero value entered for #builds/#days to save
          scm_issue_link SCM/JIRA link daemon made changes -
          Field Original Value New Value
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          abayer Andrew Bayer made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 134183 ] JNJira + In-Review [ 202666 ]

            People

            Assignee:
            mindless Alan Harder
            Reporter:
            eskatos eskatos
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: