[openstack-dev] [mistral] Break_on in Retry policy

Renat Akhmerov rakhmerov at mirantis.com
Thu Apr 23 07:52:30 UTC 2015

> On 22 Apr 2015, at 20:46, Dmitri Zimine <dzimine at stackstorm.com> wrote:
> 1) if break-on expression contains the reference to task result, like 
> break-on: <% $.my_task.foo.bar = true %> 
> but action returns ERROR and task payload is None (desired behavior: don’t puke, evaluate to false and don’t break)

I’m a little confused now. I remember we discussed it with you already but I’m just trying to see in what cases we may get action result (=> task result) but have action in ERROR state. The only case that I see is when we use “with-items” and part of actions completed successfully by the time that some action (iteration of “with-items”) failed. Then in $.my_task we would be able to provide a partial (incomplete) result consisting of those successful action results. It’s not how it’s supposed to work now though. If at least one action fails then all successful iterations get invalidated too.

> 2) if break-on contains the value from (e.g. published variable, updated by other branch of workflow) - desired behavior - evaluate my_global_flag on every iteration: 
> break-on <%  $.my_global_flag = true %>

Yes, that would be cool to do. The implementation I think is not going to be easy though..

> 3) a combination of the two
> break-on <%  $.my_global_counter > $.my_task.counter  %>

Yes. We need to clarify 1)

> On Apr 22, 2015, at 6:55 AM, Nikolay Makhotkin <nmakhotkin at mirantis.com <mailto:nmakhotkin at mirantis.com>> wrote:
>> So, in this case I guess 'break-on' will work correctly now: https://github.com/stackforge/mistral/blob/master/mistral/engine/policies.py#L295-L296 <https://github.com/stackforge/mistral/blob/master/mistral/engine/policies.py#L295-L296>
Yes, you’re right. It seems like it works now as I described.

Renat Akhmerov
@ Mirantis Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150423/e57796e7/attachment.html>

More information about the OpenStack-dev mailing list