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

Please consider saner default for "Discard old builds"

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      The current default for "Discard old builds" is not to do so. This is the functional equivalent of "please fill the entire disk until everything breaks."

      Please consider making the default for new projects 'true'. As for the default number of builds to keep/days to keep builds, I would set one to a small number - probably 1. That way it will be very obvious in short order what is happening and how to increase it - instead of the current situation where everything breaks and it's not real obvious why (what happened? which project is the culprit? etc)

      The added advantage is that all that UI/config becomes obvious when the default is true - instead of hidden as it now is. It is far too easy to set up a job and not notice that configuration until things start breaking.

        Attachments

          Activity

          Hide
          danielbeck Daniel Beck added a comment -

          I see no reason to change this.

          1. Create Project Advanced Plugin does exactly that.
          2. Disk Usage Plugin visualizes disk usage.
          3. Jenkins has a feature that warns you when the free disk space on master gets too low (defaulting to 1GB, configurable using the System property hudson.diagnosis.HudsonHomeDiskUsageChecker.freeSpaceThreshold).
          4. Most projects will not have very large builds. A typical enterprise hard drive can hold thousands of builds of Jenkins, for example. (And if your project has extremely large builds, you're probably aware of the problem because all of your disks run full.)
          5. Changing the current default will result in catching existing users unaware, resulting in actual build data loss because of accidental log rotation (which may be very bad for business/traceability reasons).

          Show
          danielbeck Daniel Beck added a comment - I see no reason to change this. 1. Create Project Advanced Plugin does exactly that. 2. Disk Usage Plugin visualizes disk usage. 3. Jenkins has a feature that warns you when the free disk space on master gets too low (defaulting to 1GB, configurable using the System property hudson.diagnosis.HudsonHomeDiskUsageChecker.freeSpaceThreshold ). 4. Most projects will not have very large builds. A typical enterprise hard drive can hold thousands of builds of Jenkins, for example. (And if your project has extremely large builds, you're probably aware of the problem because all of your disks run full.) 5. Changing the current default will result in catching existing users unaware, resulting in actual build data loss because of accidental log rotation (which may be very bad for business/traceability reasons).
          Hide
          kwerle Kurt Werle added a comment -

          Just to address the two points that seem relevant:
          1. Good to know - I'll go install it. Doesn't help the naive user.
          5. I guess this would be a very real issue for anyone creating jobs programmatically. It seems more likely anyone else would notice the change - seeing as it is right at the top of the config and way more obvious when 'true' than 'false'.

          I think it's bad practice for any project's default settings to be self destructive.

          Show
          kwerle Kurt Werle added a comment - Just to address the two points that seem relevant: 1. Good to know - I'll go install it. Doesn't help the naive user. 5. I guess this would be a very real issue for anyone creating jobs programmatically. It seems more likely anyone else would notice the change - seeing as it is right at the top of the config and way more obvious when 'true' than 'false'. I think it's bad practice for any project's default settings to be self destructive.
          Hide
          dsoprea Dustin Oprea added a comment - - edited

          We all have different expectations of what's reasonable.

          Some of our companies are running thousands of builds per day and servicing thousands of developers and vendors with hundreds of jobs, where many people have the ability to create a ton of jobs for many purposes, where people are always coming and going over time.

          There will always be a percentage of jobs that don't correctly get a discard config, and, whether or not it causes a problem (which it will, when you suddenly find that very many of the jobs need to be updated to have one), we might just want to be able to specify reasonable defaults where resource-consumption is concerned.

          Let's try to take the position of what's helpful for users rather than what we can get away with by ignoring.

          This is the proper name/link for the "Create Job Advanced" plugin:

          https://plugins.jenkins.io/createjobadvanced 

          Show
          dsoprea Dustin Oprea added a comment - - edited We all have different expectations of what's reasonable. Some of our companies are running thousands of builds per day and servicing thousands of developers and vendors with hundreds of jobs, where many people have the ability to create a ton of jobs for many purposes, where people are always coming and going over time. There will always be a percentage of jobs that don't correctly get a discard config, and, whether or not it causes a problem (which it will, when you suddenly find that very many of the jobs need to be updated to have one), we might just want to be able to specify reasonable defaults where resource-consumption is concerned. Let's try to take the position of what's helpful for users rather than what we can get away with by ignoring. This is the proper name/link for the "Create Job Advanced" plugin: https://plugins.jenkins.io/createjobadvanced  

            People

            • Assignee:
              Unassigned
              Reporter:
              kwerle Kurt Werle
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: