<div dir="ltr">Hi!<div><br></div><div>The issue with join is just a yaql bug that is already fixed. The problem with yaqluator is that it doesn't use the latest yaql library.</div><div><br></div><div>Another problem is that it does't sets options correctly. As a result it is possible to bring the site down with a query that produces endless collection</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="font-family:arial;font-size:small">Sincerely yours,<br>Stan Lagun<br>Principal Software Engineer @ Mirantis</span></span><br><span style="border-collapse:separate;color:rgb(0,0,0);font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="font-family:arial;font-size:small"><br><a href="mailto:slagun@mirantis.com" target="_blank"></a></span></span></div></div></div>
<br><div class="gmail_quote">On Tue, Jun 28, 2016 at 9:46 AM, Elisha, Moshe (Nokia - IL) <span dir="ltr"><<a href="mailto:moshe.elisha@nokia.com" target="_blank">moshe.elisha@nokia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>
<div style="font-family:Calibri,sans-serif">Hi,</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">Thank you for the kind words, Alexey.</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">I was able to reproduce your bug and I have also found the issue.</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">The problem is that we did not create the parser with the engine_options used in the yaql library by default when using the CLI.</div>
<div style="font-family:Calibri,sans-serif">Specifically, the "yaql.limitIterators" was missing… I am not sure that this settings should have this affect but maybe the Yaql guys can comment on that.</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">If we will change yaqluator to use this setting it will mean that yaqluator will not be consistent with Mistral because Mistral is using YAQL without this engine option (If I use your example in a workflow, Mistral
returns exactly like the yaqluator returns)</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">Workflow:</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<blockquote style="font-family:Calibri,sans-serif;margin:0px 0px 0px 40px;border:none;padding:0px">
<div>
<pre style="background-color:rgb(255,255,255);font-family:Menlo;font-size:9pt">---<br><span style="color:#000080;font-weight:bold">version: </span><span style="color:#008000;font-weight:bold">'2.0'<br></span><span style="color:#008000;font-weight:bold"><br></span><span style="color:#000080;font-weight:bold">test_yaql:<br></span><span style="color:#000080;font-weight:bold"> tasks:<br></span><span style="color:#000080;font-weight:bold"> test_yaql:<br></span><span style="color:#000080;font-weight:bold"> action: </span>std.noop<br> <span style="color:#000080;font-weight:bold">publish:<br></span><span style="color:#000080;font-weight:bold"> output_expr: </span><% [1,2].join([3], true, [$1, $2]) %><br></pre>
</div>
</blockquote>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">Workflow result:</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div>
<div><font face="Courier">[root@s53-19 ~(keystone_admin)]# mistral task-get-published 01d2bce3-20d0-47b2-84f2-7bd1cb2bf9f7</font></div>
<div><font face="Courier">{</font></div>
<div><font face="Courier"> "output_expr": [</font></div>
<div><font face="Courier"> [</font></div>
<div><font face="Courier"> 1,</font></div>
<div><font face="Courier"> 3</font></div>
<div><font face="Courier"> ]</font></div>
<div><font face="Courier"> ]</font></div>
<div><font face="Courier">}</font></div>
</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">As Matthews pointed out, the yaqluator is indeed OpenSource and contributions are welcomed.</div>
<div style="font-family:Calibri,sans-serif">
<div></div>
</div>
</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif">[1] <a href="https://github.com/ALU-CloudBand/yaqluator/commit/e523dacdde716d200b5ed1015543d4c4680c98c2" target="_blank">https://github.com/ALU-CloudBand/yaqluator/commit/e523dacdde716d200b5ed1015543d4c4680c98c2</a></div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<div style="font-family:Calibri,sans-serif"><br>
</div>
<span style="font-family:Calibri,sans-serif">
<div style="font-family:Calibri;font-size:12pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<span style="font-weight:bold">From: </span>Dougal Matthews <<a href="mailto:dougal@redhat.com" target="_blank">dougal@redhat.com</a>><br>
<span style="font-weight:bold">Reply-To: </span>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Date: </span>Monday, 27 June 2016 at 16:44<br>
<span style="font-weight:bold">To: </span>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [openstack-dev] [mistral] [murano] [yaql] yaqluator bug<br>
</div><div><div class="h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On 27 June 2016 at 14:30, Alexey Khivin <span dir="ltr">
<<a href="mailto:akhivin@gmail.com" target="_blank">akhivin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>Hello, Moshe </div>
<div><br>
</div>
<div>Tomorrow I discovered <a href="http://yaqluator.com" target="_blank">yaqluator.com</a> for myself! Thanks for the useful tool!</div>
<div><br>
</div>
<div>But suddenly I was said that the expression </div>
<div>[1,2].join([3], true, [$1, $2]) </div>
<div>evaluated to [[1,3]] on the yaqluator</div>
<div><br>
</div>
<div>A the same time this expression evaluated right when I using raw yaql interpreter.</div>
<div><br>
</div>
<div>Could we fix this issue?</div>
<div><br>
</div>
<div>By the way, don't you want to make yaqluator opensource? If you would transfer yaqluator to Openstack Foundation, then community will be able to fix such kind of bugs</div>
</div>
</blockquote>
<div><br>
</div>
<div>It looks like it is open source, there is a link in the footer: <a href="https://github.com/ALU-CloudBand/yaqluator" target="_blank">
https://github.com/ALU-CloudBand/yaqluator</a><br>
</div>
<div> <br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div><br>
</div>
<div>Thank you!</div>
<div><span style="line-height:1.5">Best regards, Alexey Khivin</span></div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">
OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div></div></span>
</div>
</blockquote></div><br></div>