Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Retry Failure Condition Seems Wrong #16

tomz ·

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?

  • replies 2
  • views 964
  • stars 1
JShelton ·

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:


  1. Build task runs past 30 seconds.
  2. QuickBuild terminates process (Timeout = 30).
  3. 'Retry Steps' activates using this logic: If specified script evaluates to true:
groovy:

return (step.isFailed() || step.isTimeout() || step.isCancelled());

Retry 3
Interval 1

  1. Build task completes successfully within 15 seconds.
  2. 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)
}
robinshen ADMIN ·