Jira (PUP-8146) consider combined merge strategies for lookup_option with patterns

5 views
Skip to first unread message

Henrik Lindberg (JIRA)

unread,
Nov 10, 2017, 11:47:02 AM11/10/17
to puppe...@googlegroups.com
Henrik Lindberg created an issue
 
Puppet / Bug PUP-8146
consider combined merge strategies for lookup_option with patterns
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2017/11/10 8:46 AM
Priority: Normal Normal
Reporter: Henrik Lindberg

If a class has many parameters and you want to make all hash parameters have hash or deep merge and all array parameters to have unique merge while all non collection values have firt found strategy then it is not possible to define all of that with one pattern for the class itself. Instead you would need to individually list all keys, or be very clever with the use of suffixes on the parameter names (for example plural 's', or 'list' for arrays, and 'map' or 'hash' on hashes) and the pattern match on those.

It would be great to be able to specify some kind of combined pattern 'first+unique+hash/deep'. and that they apply to the respective data type being found.

This only applies for a pattern based lookup_options since everywhere else the lookup is for a single key - although there is no harm in having this as a "i don't know what the type is" but please merge/unique hashes and arrays...

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Nov 10, 2017, 11:48:02 AM11/10/17
to puppe...@googlegroups.com
Henrik Lindberg updated an issue

See PUP-8144 for the original request (for clarity in documentation).

Change By: Henrik Lindberg
Team: Platform Core

Henrik Lindberg (JIRA)

unread,
Nov 10, 2017, 11:53:02 AM11/10/17
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
Dec 8, 2017, 8:22:02 AM12/8/17
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
If a class has many parameters and you want to make all hash parameters have hash or deep merge and all array parameters to have unique merge while all non collection values have  firt  first  found strategy then it is not possible to define all of that with one pattern for the class itself. Instead you would need to individually list all keys, or be very clever with the use of suffixes on the parameter names (for example plural 's', or 'list' for arrays, and 'map' or 'hash' on hashes) and the pattern match on those.


It would be great to be able to specify some kind of combined pattern 'first+unique+hash/deep'. and that they apply to the respective data type being found.

This only applies for a pattern based lookup_options since everywhere else the lookup is for a  single key - although there is no harm in having this as a "i don't know what the type is" but please merge/unique hashes and arrays...

Maggie Dreyer (JIRA)

unread,
Sep 24, 2019, 7:46:04 PM9/24/19
to puppe...@googlegroups.com
Maggie Dreyer updated an issue
Change By: Maggie Dreyer
Component/s: Language
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Maggie Dreyer (JIRA)

unread,
Sep 24, 2019, 7:47:04 PM9/24/19
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages