Jira (PUP-8951) Strict %{lookup()} interpolation for hiera 5, should fail on not found

9 views
Skip to first unread message

Henrik Lindberg (JIRA)

unread,
Jun 20, 2018, 7:49:04 AM6/20/18
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
 
Puppet / New Feature PUP-8951
Strict %{lookup()} interpolation for hiera 5, should fail on not found
Change By: Henrik Lindberg
Summary: Strict %{lookup()} interpolation for hiera 5, should fail on lookup failure not found
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Jun 20, 2018, 7:55:02 AM6/20/18
to puppe...@googlegroups.com
Henrik Lindberg commented on New Feature PUP-8951
 
Re: Strict %{lookup()} interpolation for hiera 5, should fail on not found

I reread the description of the problem... isn't it just a matter of raising an error instead of simply returning "not-found". I mean, It seems the idea is to stop the compilation when this occurs and raising an error would do that. I don't see what we should otherwise do with a strict lookup.

Julian Taylor Can your custom backend detect misconfiguration etc. and signal as something other than "not found" ?

Julian Taylor (JIRA)

unread,
Jun 20, 2018, 8:08:04 AM6/20/18
to puppe...@googlegroups.com
Julian Taylor commented on New Feature PUP-8951

yes sure my backend can (and does already) raise am error that is not `not_found` and abort the whole lookup chain, but that seems like a hack.

My backend is already raising a not_found exception as documented when the key is not found. The problem is how this exception is treated by hiera. The lookup function just treats it as an empty string which for a custom backend is most likely the completely wrong behaviour.

Puppet lookup() (when not provided with an explicit default) treats it as a compilation aborting error. This is the behavior I would like for the hiera lookup.

Sure for backward compatibility the default hiera lookup must probably stay, but it could get a strict argument or a completely new function which has same not_found behavior as puppet.

Henrik Lindberg (JIRA)

unread,
Jun 20, 2018, 12:36:02 PM6/20/18
to puppe...@googlegroups.com

I don't see raising an error as a hack. That is what some other kind of support for this would come down to anyway.

For the rest we seem to agree on what the options are (as I posted earlier).

Josh Cooper (JIRA)

unread,
Jun 26, 2018, 4:43:04 PM6/26/18
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Jun 26, 2018, 4:43:05 PM6/26/18
to puppe...@googlegroups.com

David McTavish (Jira)

unread,
Dec 6, 2021, 3:50:02 PM12/6/21
to puppe...@googlegroups.com
David McTavish assigned an issue to David McTavish
Change By: David McTavish
Assignee: David McTavish
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

David McTavish (Jira)

unread,
Dec 6, 2021, 3:50:02 PM12/6/21
to puppe...@googlegroups.com

David McTavish (Jira)

unread,
Dec 6, 2021, 3:50:03 PM12/6/21
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jan 13, 2022, 1:36:02 AM1/13/22
to puppe...@googlegroups.com
Josh Cooper commented on New Feature PUP-8951
 
Re: Strict %{lookup()} interpolation for hiera 5, should fail on not found

We don't have plans on changing hiera 3 or 5 behavior, so I'm going to close this as won't fix.

This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages