Closed root-expert closed 2 years ago
Puppetfiles
.These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.
Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.
I don't think it's a cryptic error, it clearly states that a specific parameter must be declared in order for it to work 🤔
It fails to auto-detect the distro so the user must explicitly set it (or install lsb-release)
What I call a cryptic error message is the following when adding a random resource:
Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Operator '[]' is not applicable to an Undef Value. (file: /etc/puppetlabs/code/environments/production/modules/apt/manifests/source.pp, line: 102, column: 9) (file: /etc/puppetlabs/code/environments/production/modules/elastic_stack/manifests/repo.pp, line: 71) on node ubuntu1804-64.example.com
While the root problem is that a package is missing.
As it is right now, the PR fix the catalog but I can imagine cases where this will produce broken apt config. I did a test for the above module but it seems to be okay (https://github.com/voxpupuli/puppet-elasticsearch/pull/1149) so maybe I am paranoid? :shrug: :smile:
@smortex in that elasticsearch test run, why is it complaining about source.pp line 102? That's just a variable assignment. 🤔
@smortex in that elasticsearch test run, why is it complaining about source.pp line 102? That's just a variable assignment. thinking
Line 102 in the latest release, but line 103 on main
ATM:
if ($facts['os']['distro']['codename'] in $_transport_https_releases) and $_location =~ /(?i:^https:\/\/)/ {
Without lsb-release
, with facter 3, $facts['os']['distro']
is undef
@smortex in that elasticsearch test run, why is it complaining about source.pp line 102? That's just a variable assignment. thinking
Line 102 in the latest release, but line 103 on
main
ATM:if ($facts['os']['distro']['codename'] in $_transport_https_releases) and $_location =~ /(?i:^https:\/\/)/ {
Without
lsb-release
, with facter 3,$facts['os']['distro']
isundef
Ah I see you point. Yea that was the only part which the module doesn't fail. Failing directly on the apt
class maybe it's too harsh? I would maybe opt out to fail per-class although not a strong opinion here.
A few times I've forgotten to merge after approving but having to wait for the tests. If I do, please ping me.
lsb-release
to resolve os.distro.* facts which may not always be available. Using $facts hash cause errors like "Evaluation Error: Operator '[]' is not applicable to an Undef Value." because os.distro is undefined causing the catalog to fail. Use fact() to identify Undef facts and throw an error to the user.Releated: