Description
If the latest build result does not have a completed date, time based expiry will not run.
Steps to replicate
- Disable all agents
- Start a plan and watch it go into queue
- Shutdown Bamboo
- Restart Bamboo
- 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
- was cloned as
-
BDEV-9531 Loading...