Jira (HI-616) Feature request: Add a way to look up undef values

4 views
Skip to first unread message

Mindy Moreland (JIRA)

unread,
Jan 23, 2020, 1:23:03 PM1/23/20
to puppe...@googlegroups.com
Mindy Moreland created an issue
 
Hiera / Improvement HI-616
Feature request: Add a way to look up undef values
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2020/01/23 10:22 AM
Priority: Normal Normal
Reporter: Mindy Moreland

Feedback received on the docs site, January 2020, requested a way to "elegantly handle lookups where the key exists in Hiera but with an undef value." 

Per Henrik: "it would be possible to modify hiera and add a lookup_option that would control if a looked up `undef` results in an `undef` value or `not found` - this would be per key  (as we don't want this to be controlled by a global setting)." 
 
 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Jan 23, 2020, 7:11:06 PM1/23/20
to puppe...@googlegroups.com
Henrik Lindberg commented on Improvement HI-616
 
Re: Feature request: Add a way to look up undef values

This ticket is in the wrong place, it should be moved to PUP project as HI is for the deprecated hiera 3 which is only maintained for security related patches.

The idea for the implementation is to add an option to the features in lookup_options where a user can state that the result should be "not found" if the looked up value otherwise would result in undef. I see no harm in offering such an option as there is no work around when this behaviour is wanted via APL.

(For direct calls to the lookup function it is already possible to differentiate between undef result and "not found", so this is primarily for APL).

Reply all
Reply to author
Forward
0 new messages