Commit 2d90cbf7 by James Cammarata

Properly fail results with rc != 0

Fixes #11769
parent 787a0c4e
...@@ -327,9 +327,12 @@ class TaskExecutor: ...@@ -327,9 +327,12 @@ class TaskExecutor:
result['failed_when_result'] = result['failed'] = failed_when_result result['failed_when_result'] = result['failed'] = failed_when_result
if failed_when_result: if failed_when_result:
break break
elif 'failed' not in result and result.get('rc', 0) == 0: elif 'failed' not in result:
# if the result is not failed, stop trying if result.get('rc', 0) != 0:
break result['failed'] = True
else:
# if the result is not failed, stop trying
break
if attempt < retries - 1: if attempt < retries - 1:
time.sleep(delay) time.sleep(delay)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment