Using the new retry functionality in QB 8, it seems to set steps to failed if any attempts failed, as opposed to only if the last attempt failed. Is this by design? If so, is there a way to determine if the last attempt succeeded, and make sure that the step is considered a success for the build process in that case?
We're seeing the issue as described above as well, but only on timeouts (for regular failures, it appears to work fine). It's as if a failure due to timeout can never be altered by step retry for any reason. This is how it happens:
- Build task runs past 30 seconds.
- QuickBuild terminates process (Timeout = 30).
- 'Retry Steps' activates using this logic: If specified script evaluates to true:
groovy:
return (step.isFailed() || step.isTimeout() || step.isCancelled());
Retry 3
Interval 1
- Build task completes successfully within 15 seconds.
- Build still marked as FAIL.
I was able to reproduce this by creating a variable failCounter, setting it to have a value of fail, and then running the following code as Misc > Execute Script (with timeout to 30, and step retry as specified above):
groovy:
def failCounterVar=vars.getValue('failCounter')
logger.info('DEBUG - failCounter is at '+failCounterVar)
if (failCounterVar.equals('fail')) {
vars.get('failCounter').setValue('pass',false)
logger.info('DEBUG - Set failCounter to: '+vars.get('failCounter'))
logger.info('DEBUG - About to sleep for 31 seconds to timeout the build')
Thread.sleep(31 * 1000)
}
if (failCounterVar.equals('pass')) {
logger.info('DEBUG - failCounter is at '+failCounterVar+'. About to sleep and exit successfully')
Thread.sleep(5 * 1000)
}
Thanks for the detailed information. The step retrying has a bug when step is timed out. Please watch below bug to get notified: