Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Jorie Tappa updated an issue Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Change By: Jorie Tappa Release Notes Summary: It is not now possible to specify {{lookup_options}} using a regular _expression_ for the keys the options apply to. The regular _expression_ must start with a '^' to be recognized as a regular _expression_. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Thomas Hallgren assigned an issue to qa Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Change By: Thomas Hallgren Status: Ready for CI Test Assignee: qa Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Eric Thompson commented on PUP-6982 Re: Allow keys to be specified by pattern in lookup_options excellent. thanks Thomas! Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Eric Thompson updated an issue Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Change By: Eric Thompson QA Risk Assessment: Automate No Action Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Eric Thompson updated an issue Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Change By: Eric Thompson QA Risk Assessment Reason: covered by unit tests Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Thomas Hallgren commented on PUP-6982 Re: Allow keys to be specified by pattern in lookup_options I don't see any benefit from adding more tests. The unit tests covers all aspects of this addition. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Thomas Hallgren commented on PUP-6982 Re: Allow keys to be specified by pattern in lookup_options Here is a test that patterns must start with module name. The fact that a lookup_option trumps merge behavior is not part of this ticket, but here is a test for that. The fact that a lookup_option always wins (not part of this ticket either) is covered in this test. Here are the main reasons for choosing the '^' character over '/ /'. 1. The patterns live in the same namespace as other keys. It's not unlikely that users have keys that are paths. A Path may start and end with '/' 2. The '^' character anchors the pattern at the start, and it must be anchored. If it isn't, we cannot verify that it starts with a module name. 3. '/ /' is normally used instead of quotes. We cannot do that here since the parser will be JSON, YAML (or Hocon or something else). So the string must be quoted anyway. #2 above also answers the question regarding "line start-with". The '^' is indeed part of the regexp. It's not just a marker for a pattern. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Eric Thompson commented on PUP-6982 Re: Allow keys to be specified by pattern in lookup_options i'm not aware of unit tests for: It is forbidden for a module to include pattern based keys that are not prefixed with the module name. A lookup_option specifying merge for a key trumps the global merge behavior specified in a hiera.yaml version 3 (versions 4 and 5 does not support the global setting). A lookup_option given explicitly in a call to lookup wins over data specified and hiera.yaml specified merge options. the main portion of this ticket is covered by unit tests. do we need acceptance for the above? the module key portion (first bullet) is covered by other acceptance tests. patterns are regular expressions a key is a pattern if the key starts with ^ is there a reason behind this char to start a regex vs {{ / / }}? can i specify a "line start-with" regex anchor with {{ ^ }}? would it be e.g. {{ ^^string }} would match only lines starting with "string"? i find it a bit confusing. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Eric Thompson updated an issue Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Change By: Eric Thompson QA Risk Assessment: Needs Assessment Automate Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Henrik Lindberg assigned an issue to Unassigned Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Change By: Henrik Lindberg Assignee: Henrik Lindberg Release Notes Summary: It is not possible to specify {{lookup_options}} using a regular _expression_ for the keys the options apply to. The regular _expression_ must start with a '^' to be recognized as a regular _expression_. Release Notes: New Feature Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Henrik Lindberg commented on PUP-6982 Re: Allow keys to be specified by pattern in lookup_options merged to master at: fb8aa56 Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Thomas Hallgren assigned an issue to Henrik Lindberg Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Change By: Thomas Hallgren Assignee: Thomas Hallgren Henrik Lindberg Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Henrik Lindberg assigned an issue to Thomas Hallgren Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Change By: Henrik Lindberg Assignee: Thomas Hallgren Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Thomas Hallgren assigned an issue to Unassigned Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Change By: Thomas Hallgren Assignee: Thomas Hallgren Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Henrik Lindberg updated an issue Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Change By: Henrik Lindberg Allow keys to be specified by pattern in lookup_options. The reason for wanting this feature is that can become very tedious to specify all keys. While not a big deal when constructing new logic, it becomes a real chore when moving from a {{hiera.yaml}} with global merge behavior specified as that potentially could mean adding thousands of entries if moving the hierarchy to an environment hiera 5 hiera.yaml.It is also a chore having to list a large number of parameters for classes such as apache where it would be beneficial to state one pattern that applies to the majority and then single out those that are different.The rules for the pattern based entries are as follows:* if a key is specified with an exact match it wins over one specified with a pattern in the same layer - this makes it easier to handle exclusions* if a key is specified with a pattern, the first pattern that matches in a layer wins (subsequent patterns in the same layer are ignored).* patterns are regular expressions* a key is a pattern if the key contains any of the characters '( ) \{ \} \[ \] * ? starts with ^ $' * as the lookup options are merged - a pattern match key is merged with an identical pattern match in a higher layer - thus ' ^ mymodule::.\*' in a global layer merges with ' ^ mymodule::.\*' in the environment layer, but ' ^ my\[m\]odule::.\*' would not merge.* It is forbidden for a module to include pattern based keys that are not prefixed with the module name.* A {{lookup_option}} specifying merge for a key trumps the global merge behavior specified in a {{hiera.yaml}} version 3 (versions 4 and 5 does not support the global setting).* A {{lookup_option}} given explicitly in a call to {{lookup}} wins over data specified and {{hiera.yaml}} specified merge options. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Henrik Lindberg commented on PUP-6982 Re: Allow keys to be specified by pattern in lookup_options I like that idea: '^' first in a key signals that it is a pattern, it must be anchored anyway. I have updated the description to reflect this. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Thomas Hallgren commented on PUP-6982 Re: Allow keys to be specified by pattern in lookup_options Just an idea. Let's assume that we do not use '*' but instead use '^' with the meaning "keys beneath are patterns anchored at the beginning". For a module named 'mod', we would instead use '^mod::', thus removing the need for patterns beneath to be prefixed. The ability to use '^xxx' would of course be generic. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Thomas Hallgren commented on PUP-6982 Re: Allow keys to be specified by pattern in lookup_options I like the '*' alternative better. It's not optimal to scan all keys for special characters. It's also not uncommon to use patterns that doesn't have wildcards in them (all patterns including some string) or where wildcards are dots. Only drawback using '*' is that all strings are valid keys, including '*' so by using it, we also say that the key '*' cannot have lookup options. I assume that the patterns are not anchored, i.e. the criteria for a match would be: Regexp.compile(pattern) ~= the_key which means that the description bullet "It is forbidden for a module to include pattern based keys that are not prefixed with the module name." will mean that for a module named 'mod', any pattern that doesn't start with either "\Amod::' or '^mod::' would be forbidden. Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Thomas Hallgren updated an issue Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Change By: Thomas Hallgren Sprint: PDE 2017-01-11 Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Thomas Hallgren assigned an issue to Thomas Hallgren Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Change By: Thomas Hallgren Assignee: Thomas Hallgren Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Henrik Lindberg commented on PUP-6982 Re: Allow keys to be specified by pattern in lookup_options An alternative, and possibly simpler implementation would be to place all patterns under a special key (for example '*') as that would make it easier to differentiate between verbatim and pattern based keys. (The main problem is that keys and special things need to be in the same lookup_options hash). Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-6982) Allow keys to be specified by pattern in lookup_options
Title: Message Title Henrik Lindberg created an issue Puppet / PUP-6982 Allow keys to be specified by pattern in lookup_options Issue Type: New Feature Assignee: Unassigned Created: 2016/12/07 8:15 AM Fix Versions: PUP 4.9.0 Priority: Normal Reporter: Henrik Lindberg Allow keys to be specified by pattern in lookup_options. The reason for wanting this feature is that can become very tedious to specify all keys. While not a big deal when constructing new logic, it becomes a real chore when moving from a hiera.yaml with global merge behavior specified as that potentially could mean adding thousands of entries if moving the hierarchy to an environment hiera 5 hiera.yaml. It is also a chore having to list a large number of parameters for classes such as apache where it would be beneficial to state one pattern that applies to the majority and then single out those that are different. The rules for the pattern based entries are as follows: if a key is specified with an exact match it wins over one specified with a pattern in the same layer - this makes it easier to handle exclusions if a key is specified with a pattern, the first pattern that matches in a layer wins (subsequent patterns in the same layer are ignored).