Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-16057

If the latest build result does not have a completed date, time based expiry will not run

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 6.0.0
    • None
    • Expiry
    • None

    Description

      If the latest build result does not have a completed date, time based expiry will not run.

      Steps to replicate
      1. Disable all agents
      2. Start a plan and watch it go into queue
      3. Shutdown Bamboo
      4. Restart Bamboo
      5. Run a time based expiry (example: expire builds more than 1 day ago)

      This message shows up in the log for the tested plan:

       Last build completed date for 'com.atlassian.bamboo.chains.DefaultChain@185ba707:com.atlassian.bamboo.chains.ChainResultsSummaryImpl@c161b50e' is null. No builds will be expired.
      Analysis

      This behavior is caused by the following code in bamboo/components/bamboo-core/src/main/java/com/atlassian/bamboo/build/expiry/BuildExpiryBeanImpl.java

      if (lastBuildDate == null)
                 {
                     log.warn("Last build completed date for '" + plan + ":" + lastResultsSummary + "' is null. No builds will be expired.");
                     return 0;
                 }
      Workaround

      Re-run the build and stop it immediately so that a completed date appears.

      Attachments

        Issue Links

          Activity

            People

              mgardias Marcin Gardias
              dlee@atlassian.com Deric Lee (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: