[openstack-dev] [Heat] Conditionals, was: New function: first_nonnull
Stan Lagun
slagun at mirantis.com
Wed Nov 12 15:45:12 UTC 2014
My point is that quoting problem do exists probably but it exists even
without YAQL being used anywhere.
For example consider Mistral workbook containing value: { get_attr:
[my_instance, first_address] }. get_attr in Mistral may have nothing to to
with Heat's get_attr and even if it is it may be just a HOT snippet that
cannot be evaluated at the moment. For example it may be part of a HOT
template embedded into Mistral workbook and Mistral workflow is going to
create another Heat stack using that template. Now if you embed such
workbook into HOT template (and thus get HOT embedded into Mistral embedded
into HOT :) ) you need to make sure that Heat's parser is not going to try
to parse that workbook but treats it like a black box. This is regardless
of YAQL being even exist. But if you treat workbooks like
black-boxes/arbitrary JSON you should not care if it contains YAQL or not.
As for Murano this may cause some problems in cases when someone just took
YAML HOT and copy-paste it into MuranoPL class without double-checking. But
those errors can be easily fixed and such issues do exist even with current
HOT syntax without YAQL being used at all.
What I'm really confused by is why we have
> a new weird ugly language like YAQL (sorry, it, like JQ, is hideous),
>
YAQL syntax is almost identical to Python's or JS if you narrow them to
one-line expressions. The only noticeable difference is that all
variable/parameter names are prefixed with '$' as in PHP/Perl which are
both popular languages. I can hardly imagine why such negligible difference
from JS or Python (languages you do like) makes language "weird ugly"
Sincerely yours,
Stan Lagun
Principal Software Engineer @ Mirantis
<slagun at mirantis.com>
On Wed, Nov 12, 2014 at 6:10 PM, Clint Byrum <clint at fewbar.com> wrote:
> Excerpts from Zane Bitter's message of 2014-11-11 13:06:17 -0800:
> > On 11/11/14 13:34, Ryan Brown wrote:
> > > I am strongly against allowing arbitrary Javascript functions for
> > > complexity reasons. It's already difficult enough to get meaningful
> > > errors when you **** up your YAML syntax.
> >
> > Agreed, and FWIW literally everyone that Clint has pitched the JS idea
> > to thought it was crazy ;)
> >
>
> So far nobody has stepped up to defend me, so I'll accept that maybe
> people do think it is crazy. What I'm really confused by is why we have
> a new weird ugly language like YAQL (sorry, it, like JQ, is hideous),
> and that would somehow be less crazy than a well known mature language
> that has always been meant for embedding such as javascript.
>
> Anyway, I'd prefer YAQL over trying to get the intrinsic functions in
> HOT just right. Users will want to do things we don't expect. I say, let
> them, or large sections of the users will simply move on to something
> else.
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141112/6e4c0525/attachment.html>
More information about the OpenStack-dev
mailing list