Jira (PUP-11546) Request feature to normalize case in Hiera interpolation tokens within hiera.yaml

6 views
Skip to first unread message

Taika Augustaitis (Jira)

unread,
Jun 2, 2022, 6:01:02 PM6/2/22
to puppe...@googlegroups.com
Taika Augustaitis created an issue
 
Puppet / New Feature PUP-11546
Request feature to normalize case in Hiera interpolation tokens within hiera.yaml
Issue Type: New Feature New Feature
Assignee: Unassigned
Components: Hiera & Lookup
Created: 2022/06/02 3:00 PM
Priority: Normal Normal
Reporter: Taika Augustaitis

Desired Behavior:  Requesting a feature to normalize case similar to the downcase function within Hiera interpolation tokens in hiera.yaml. This is needed to minimize the need to duplicate yaml files because fact values may have different case. 

Actual Behavior: Currently the workarounds include creating multiple yaml files with the same contents and creating custom facts. 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Taika Augustaitis (Jira)

unread,
Jun 3, 2022, 9:17:02 AM6/3/22
to puppe...@googlegroups.com
Taika Augustaitis updated an issue
Change By: Taika Augustaitis
*Desired Behavior:*  Requesting a feature to normalize case similar to the downcase function within Hiera interpolation tokens in hiera.yaml. This is needed to minimize the need to duplicate yaml files because fact values may have different case. 

*Actual Behavior:*
  Currently the some workarounds include creating multiple yaml files with the same contents and or creating custom facts. 

Nirupama Mantha (Jira)

unread,
Jun 7, 2022, 4:16:03 PM6/7/22
to puppe...@googlegroups.com
Nirupama Mantha commented on New Feature PUP-11546
 
Re: Request feature to normalize case in Hiera interpolation tokens within hiera.yaml

taika.augustaitis can you help us understand where the facts are defined, whether the fact can downcase the value so we don't have to add complexity to the hiera lookup

Frank Hagney (Jira)

unread,
Jun 22, 2022, 9:50:01 AM6/22/22
to puppe...@googlegroups.com

Frank Hagney (Jira)

unread,
Aug 12, 2022, 12:28:02 PM8/12/22
to puppe...@googlegroups.com
Frank Hagney commented on New Feature PUP-11546
 
Re: Request feature to normalize case in Hiera interpolation tokens within hiera.yaml

I have a call with Walmart on Monday afternoon. 

Can I get an update / status on this issue please.

This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Henrik Lindberg (Jira)

unread,
Aug 21, 2022, 10:12:02 AM8/21/22
to puppe...@googlegroups.com

Seems far better to normalize the facts values.

An open ended solution would be to make the interpolation syntax of values in hiera.yaml be able to describe arbitrary function calls (to puppet functions) thereby making it possible to transform values used in paths. This would cater to other requests as well were users need to process values in other ways. This is somewhat difficult though due to the syntax of hiera interpolations so it can be hard to find suitable operators without causing breaking changes. An alternative discussed in the past was to allow one or more function calls to be listed in the hiera.yaml under a new top level key - each entry would name a (new) variable and the returned value of the function call would be the value. Those variables would be local to hiera.yaml. For example:

derived_variables: 
  normalized:
    my_facts_normalizer

And a normalized value could then be interpolated with something like (assuming normalized is a hash of all normalized facts of interest):

 

"somewhere/%

{normalized.foo_fact}

/x.yaml"

Erwin Solis (Jira)

unread,
Sep 8, 2022, 12:59:01 PM9/8/22
to puppe...@googlegroups.com
Erwin Solis commented on New Feature PUP-11546

I noticed this has gone unassigned - but status is accepted. Is that right?

Josh Cooper (Jira)

unread,
Oct 4, 2022, 11:25:03 PM10/4/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Oct 5, 2022, 12:28:01 PM10/5/22
to puppe...@googlegroups.com

David Piekny (Jira)

unread,
Oct 6, 2022, 3:50:03 PM10/6/22
to puppe...@googlegroups.com

David Piekny (Jira)

unread,
Oct 6, 2022, 3:52:03 PM10/6/22
to puppe...@googlegroups.com
David Piekny commented on New Feature PUP-11546
 
Re: Request feature to normalize case in Hiera interpolation tokens within hiera.yaml

Erwin Solis Josh Cooper I've raised the priority of this ticket within this epic (which is a collection of independent maintenance items).

Josh Cooper (Jira)

unread,
Oct 7, 2022, 11:52:03 AM10/7/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Oct 7, 2022, 1:32:03 PM10/7/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Oct 7, 2022, 1:51:01 PM10/7/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Oct 7, 2022, 1:59:02 PM10/7/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Oct 19, 2022, 2:14:03 PM10/19/22
to puppe...@googlegroups.com
Josh Cooper commented on New Feature PUP-11546
 
Re: Request feature to normalize case in Hiera interpolation tokens within hiera.yaml

The docs mention one significant limitation with hiera interpolation docs:

Note: You cannot use interpolation functions in hiera.yaml. They’re only for use in data sources.

This means we can't simply add a "downcase" interpolation function to normalize data source paths.
 

David Piekny (Jira)

unread,
Oct 20, 2022, 1:29:02 PM10/20/22
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages