Running future parser in production

45 views
Skip to first unread message

Erik Dalén

unread,
Dec 12, 2014, 5:59:41 AM12/12/14
to Puppet Developers, puppet...@googlegroups.com
Just wanted to say that we have now switched completely to the future parser at Spotify, and it is working well. Still have some work to do to take advantage of all the new stuff, it is still mostly the old manifests running on the new parser.

We had some syntax fixes we had to make to get it working, like variable case in some manifests, and some resource references that had a space between the type and name (like File [foo] instead of File[foo]).

But the biggest issue with the migration was some modules that used dynamically scoped variables inside ERB templates. That is quite tricky to detect in any other way than doing --noop runs and comparing the changes.

Trevor Vaughan

unread,
Dec 12, 2014, 1:02:02 PM12/12/14
to puppe...@googlegroups.com, puppet...@googlegroups.com
Hi Erik,

Do you have any plans for a blog post on what it took to get switched?

Almost everything that I've tried has worked well with my biggest issue being String Integer to bare Integer comparison situations.

Thanks!

Trevor

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CAAAzDLd7LLBW6bO%3D%2BGZWcBuzJxqKAh%2BqF2007-xFQ038K6PVsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvau...@onyxpoint.com

-- This account not approved for unencrypted proprietary information --

Henrik Lindberg

unread,
Dec 12, 2014, 1:06:24 PM12/12/14
to puppet...@googlegroups.com, puppe...@googlegroups.com
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users...@googlegroups.com
> <mailto:puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/CAAAzDLd7LLBW6bO%3D%2BGZWcBuzJxqKAh%2BqF2007-xFQ038K6PVsA%40mail.gmail.com
> <https://groups.google.com/d/msgid/puppet-users/CAAAzDLd7LLBW6bO%3D%2BGZWcBuzJxqKAh%2BqF2007-xFQ038K6PVsA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
This is so cool! Thanks for all the testing and feedback.

Does this mean I am on pager duty now? ;-)
- henrik

--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/


Erik Dalén

unread,
Dec 15, 2014, 9:06:49 AM12/15/14
to puppe...@googlegroups.com, puppet...@googlegroups.com
On Fri Dec 12 2014 at 7:01:58 PM Trevor Vaughan <tvau...@onyxpoint.com> wrote:
Hi Erik,

Do you have any plans for a blog post on what it took to get switched?

Almost everything that I've tried has worked well with my biggest issue being String Integer to bare Integer comparison situations.


Right, we had some issues with those, and specifically that integers were sent to functions that cold only handle strings. The most common case of that was that the range function in stdlib didn't handle integer parameters :( 

Another somewhat common number related change we had to make was manifests that used numbers like 05 as the order parameter to concat::fragment or similar resource types. That is interpreted as a octal number in future parser, so the order is just 5 instead of "05". These were all changed to be strings with integers in them instead. Possibly the concat module could be changed to sprintf integers using two digits and 0 padding, but that would be a backwards incompatible change, although it would likely help most users with backwards compatibility :)
These were really easy to find using git grep though.
 
Thanks!

Trevor

On Fri, Dec 12, 2014 at 2:59 AM, Erik Dalén <erik.gus...@gmail.com> wrote:
Just wanted to say that we have now switched completely to the future parser at Spotify, and it is working well. Still have some work to do to take advantage of all the new stuff, it is still mostly the old manifests running on the new parser.

We had some syntax fixes we had to make to get it working, like variable case in some manifests, and some resource references that had a space between the type and name (like File [foo] instead of File[foo]).

But the biggest issue with the migration was some modules that used dynamically scoped variables inside ERB templates. That is quite tricky to detect in any other way than doing --noop runs and comparing the changes.

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CAAAzDLd7LLBW6bO%3D%2BGZWcBuzJxqKAh%2BqF2007-xFQ038K6PVsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvau...@onyxpoint.com

-- This account not approved for unencrypted proprietary information --

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.

Erik Dalén

unread,
Dec 15, 2014, 9:07:29 AM12/15/14
to puppet...@googlegroups.com, puppe...@googlegroups.com
On Fri Dec 12 2014 at 7:06:20 PM Henrik Lindberg <henrik....@cloudsmith.com> wrote:
On 2014-12-12 2:59, Erik Dalén wrote:
> Just wanted to say that we have now switched completely to the future
> parser at Spotify, and it is working well. Still have some work to do
> to take advantage of all the new stuff, it is still mostly the old
> manifests running on the new parser.
>
> We had some syntax fixes we had to make to get it working, like
> variable case in some manifests, and some resource references that had
> a space between the type and name (like File [foo] instead of File[foo]).
>
> But the biggest issue with the migration was some modules that used
> dynamically scoped variables inside ERB templates. That is quite
> tricky to detect in any other way than doing --noop runs and comparing
> the changes.
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send

Yeah, I'll switch it over from Luke Kanies :) 
Reply all
Reply to author
Forward
0 new messages