Need for feedback regarding sort_merged_arrays vs sort_merge_arrays lookup behavior

8 views
Skip to first unread message

Martin Alfke

unread,
Jul 31, 2017, 6:53:55 AM7/31/17
to puppet-dev
Hi,

we (example42) are in need of feedback regarding sort_merged_arrays vs. sort_merge_arrays when having to support multiple Puppet versions.

http://www.example42.com/2017/07/31/sort_merged_array-fix/

Best,
Martin

Ryan Whitehurst

unread,
Jul 31, 2017, 12:33:11 PM7/31/17
to puppe...@googlegroups.com
Given that sort_merge_arrays never actually worked, if you need to support versions before the fix landed, it seems to me that you can't rely on the behavior anyway, so the only actual solution would be to not use sort_merged_arrays at all and instead make sure to sort the results in the puppet code when you use them.
 
Best,
Martin

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/4D05248C-E006-4BA8-AE90-4C336D9EC8EF%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Hallgren

unread,
Aug 1, 2017, 2:56:14 AM8/1/17
to puppe...@googlegroups.com
I reacted to the formulation "Puppet 4.10.4/5.0.1 or earlier: success - but no functionality". There was never a success but rather a hidden failure (which is worse than an apparent one).

Puppet never officially named the option to "sort_merge_arrays". The documentation has always had the correct spelling and we fixed the typo as soon as we became aware of it on July 5 (reported in ticket PUP-7751). The fact that you've been using the "correct" misspelling in psick since beginning of June is of course very unfortunate since it means that it has been broken since that time. In my view, our fix didn't break psick. It made the malfunction apparent.

I agree with Ryan's assessment. There is no way to get consistent behavior when using sort_merged_arrays over multiple versions. It was really broken for some time, and for that, there's no workaround but to refrain from using it.

- thomas

Martin Alfke

unread,
Aug 1, 2017, 6:35:10 AM8/1/17
to puppe...@googlegroups.com
Many thanks for the feedback.
We decided to remove sort_merged_arrays option and re-add it once we drop support for Puppet < 4.10.5

> On 01 Aug 2017, at 08:56, Thomas Hallgren <thomas....@puppet.com> wrote:
>
> I reacted to the formulation "Puppet 4.10.4/5.0.1 or earlier: success - but no functionality". There was never a success but rather a hidden failure (which is worse than an apparent one).
>
> Puppet never officially named the option to "sort_merge_arrays". The documentation has always had the correct spelling and we fixed the typo as soon as we became aware of it on July 5 (reported in ticket PUP-7751). The fact that you've been using the "correct" misspelling in psick since beginning of June is of course very unfortunate since it means that it has been broken since that time. In my view, our fix didn't break psick. It made the malfunction apparent.
>
> I agree with Ryan's assessment. There is no way to get consistent behavior when using sort_merged_arrays over multiple versions. It was really broken for some time, and for that, there's no workaround but to refrain from using it.
>
> - thomas
>
> On Mon, Jul 31, 2017 at 6:32 PM, Ryan Whitehurst <r...@puppet.com> wrote:
> On Mon, Jul 31, 2017 at 3:53 AM, Martin Alfke <tux...@gmail.com> wrote:
> Hi,
>
> we (example42) are in need of feedback regarding sort_merged_arrays vs. sort_merge_arrays when having to support multiple Puppet versions.
>
> http://www.example42.com/2017/07/31/sort_merged_array-fix/
>
>
> Given that sort_merge_arrays never actually worked, if you need to support versions before the fix landed, it seems to me that you can't rely on the behavior anyway, so the only actual solution would be to not use sort_merged_arrays at all and instead make sure to sort the results in the puppet code when you use them.
>
> Best,
> Martin
>
> --
> 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/4D05248C-E006-4BA8-AE90-4C336D9EC8EF%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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.
> --
> 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/CAO5TtCt4t6JSMzA2_3%2Bdc1nRVfTbsVEe9dmiOi%3Dx%3DgC5LgRDxw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages