Jira (PUP-8529) Remove environment_data_provider setting

21 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Jul 20, 2020, 9:34:04 PM7/20/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Puppet / Task PUP-8529
Remove environment_data_provider setting
Change By: Josh Cooper
Summary: Remove data_binding_terminus environment_data_provider setting
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Jul 20, 2020, 9:35:02 PM7/20/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
The data_binding_terminus and environment_data_provider settings are setting is already deprecated and should be removed now that Hiera 5 is done.

 

Josh Cooper (Jira)

unread,
Jul 20, 2020, 9:38:03 PM7/20/20
to puppe...@googlegroups.com
Josh Cooper commented on Task PUP-8529
 
Re: Remove environment_data_provider setting

I think it's fine to keep the data_binding_terminus, since Puppet::DataBinding is an indirected type, and we have other settings to configure the terminus for indirected types, such as node_terminus, catalog_terminus, facts_terminus. For this ticket, I'm thinking we should remove the deprecation warning from data_binding_terminus and remove the environment_data_provider setting.

Josh Cooper (Jira)

unread,
Jul 22, 2020, 7:37:02 PM7/22/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Epic Link: PUP-10591

Josh Cooper (Jira)

unread,
Aug 17, 2020, 8:24:03 PM8/17/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Froyo Coremunity

Josh Cooper (Jira)

unread,
Aug 27, 2020, 3:35:03 PM8/27/20
to puppe...@googlegroups.com
Josh Cooper commented on Task PUP-8529
 
Re: Remove environment_data_provider setting

Here are my notes about this:

data_binding_terminus

Calls to the hiera_xxx functions use the :hiera terminus

Calls to the lookup function use the Puppet[:data_binding_terminus}. It can be set to hiera, none or the name of a custom terminus for Puppet::DataBinding models. The none terminus can be used to disable automatic parameter lookup. Setting it to a custom value will generate a deprecation warning (under control of strict). There are some examples of 3rd party data_binding_terminus, see https://tickets.puppetlabs.com/browse/PUP-6576?focusedCommentId=332145&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-332145. Based on https://tickets.puppetlabs.com/browse/PUP-6576?focusedCommentId=355340&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-355340 there is/was a desire to remove the data_binding_terminus setting so that there's just a single way of configuring lookups (using hiera.conf and different hiera5 backends).

I think it would be ok to disallow setting data_binding_terminus to something other than none or hiera in Puppet 7, but will follow up on the mailing list. I don't think we want to remove the setting entirely due to wanting to disable APL (see PUP-7802).

environment_data_provider

The environment_data_provider setting is from hiera4 and provides a way of calling a per-environment data provider. Its value can be set to none, function or hiera in environment.conf. If it's set to function, then the environment needs to define a function in environments/<env>/lib/puppet/functions/environment/data.rb as:

with a specific name and implement the data method:

Puppet::Functions.create_function(:'environment::data') do
  def data
    { "key" => "value" }
  end
end

See https://puppet-on-the-edge.blogspot.com/2015/01/puppet-40-data-in-modules-and.html for more context. If the environment_data_provider is set to function, puppet creates an EnvironmentDataProvider as it does for hiera, but its configuration is adapted to V4 so it knows to execute the environment::data function.

It only makes sense to me to remove this setting at the same time we drop Hiera4 support. I'll also post to the mailing list.

Josh Cooper (Jira)

unread,
Sep 9, 2020, 5:40:03 PM9/9/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: platform_7

Josh Cooper (Jira)

unread,
Sep 9, 2020, 5:40:03 PM9/9/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 7.0.0
Fix Version/s: PUP 8.0.0

Josh Cooper (Jira)

unread,
Sep 9, 2020, 5:40:04 PM9/9/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Epic Link: PUP-10591

Josh Cooper (Jira)

unread,
Sep 2, 2022, 3:25:02 PM9/2/22
to puppe...@googlegroups.com
Josh Cooper commented on Task PUP-8529
 
Re: Remove environment_data_provider setting

We don't have plans on removing Hiera 3/4 support given the pain that would cause, so I'm going to remove the fix version.

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

Josh Cooper (Jira)

unread,
Sep 2, 2022, 3:25:03 PM9/2/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 8.0.0
Reply all
Reply to author
Forward
0 new messages