From f2d8b14ac1b38cb1623898514328bbb73d635f51 Mon Sep 17 00:00:00 2001 From: "Brad P. Crochet" Date: Thu, 15 Mar 2018 08:29:27 -0400 Subject: [PATCH] Clarify usage of break-on and continue-on Usage of break-on and continue-on are not very clear. This hopefully gives some pointers on their usage. Change-Id: Ide237a23ab85fac7342a8fc9bf748fd0b78bf41d --- doc/source/main_features.rst | 8 ++++++++ doc/source/user/wf_lang_v2.rst | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/doc/source/main_features.rst b/doc/source/main_features.rst index 9e6758e51..3c76634a5 100644 --- a/doc/source/main_features.rst +++ b/doc/source/main_features.rst @@ -138,6 +138,14 @@ There are different types of policies in Mistral. All parameter values for any policy can be defined as YAQL expressions. +**NOTE:** It would be rare to use both break-on and continue-on in the same +retry block. *break-on* should be used when one expects the action to be in an +ERROR state for some amount of tries, but may eventually go to a SUCCESS state, +thereby stopping the loop. But if *break-on* is *'true'* then the retries will +stop and the task will be in ERROR. *continue-on* should be used if the action +will usually return *SUCCESS*, but the action has other results that can be +used to signal whether to continue the loop or not. + Join ---- diff --git a/doc/source/user/wf_lang_v2.rst b/doc/source/user/wf_lang_v2.rst index f0579ead8..28ad2e359 100644 --- a/doc/source/user/wf_lang_v2.rst +++ b/doc/source/user/wf_lang_v2.rst @@ -385,6 +385,14 @@ Retry policy can also be configured on a single line as: All parameter values for any policy can be defined as YAQL/Jinja2 expressions. +**NOTE:** It would be rare to use both break-on and continue-on in the same +retry block. *break-on* should be used when one expects the action to be in an +ERROR state for some amount of tries, but may eventually go to a SUCCESS state, +thereby stopping the loop. But if *break-on* is *'true'* then the retries will +stop and the task will be in ERROR. *continue-on* should be used if the action +will usually return *SUCCESS*, but the action has other results that can be +used to signal whether to continue the loop or not. + Input syntax ''''''''''''