osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mistral] Publish field in workflow tasks


Ali,

Iâ??m for the option 2.a because itâ??s not so difficult to implement but itâ??ll be the best effort to handle a situation more gracefully if someone puts â??publishâ?? in both places (old syntax and advanced syntax). Over time weâ??ll deprecate the old â??publishâ?? completely though.

Thanks

Renat Akhmerov
@Nokia
On 28 Aug 2019, 15:37 +0700, Ali Abdelal <maxget7 at gmail.com>, wrote:
> Hello,
>
> Currently, there are two "publish" fields, one in the task(regular "publish")-the scope is branch and not global,
> and another under "on-success", â??on-errorâ?? or â??on-completeâ??.
>
> In the current behavior, regular "publish" is ignored if there is "publish" under "on-success", â??on-errorâ?? or â??on-completeâ?? [1].
>
> For example:-
> (a)
> version: '2.0'
> wf1:
>     tasks:
>       t1:
>         publish:
>           res_x1: 1
>         on-success:
>           publish:
>             branch:
>               res_x2: 2
>
> (b)
> version: '2.0'
> wf2:
>     tasks:
>       t1:
>         publish:
>           res_x1: 1
>
> "res_x1" won't be published in (a), but it will in (b).
>
>
> We can either:-
>
> 1) Invalidate such syntax.
> 2) Merge the two publishes together and if there are duplicate keys, there are two options:-
>    a) What takes priority is what's in publish under "on-success" or â??on-errorâ?? or â??on-complete.
>    b) Not allow having a duplicate.
>
>
> What is your opinion?
> And please tell us if you have other suggestions.
>
> [1] https://bugs.launchpad.net/mistral/+bug/1791449
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190909/e46ee95b/attachment.html>