puppet-vault_lookup icon indicating copy to clipboard operation
puppet-vault_lookup copied to clipboard

Allow the user to prevent the lookup from raising an exception

Open tskirvin opened this issue 8 months ago • 2 comments
trafficstars

This is a quick attempt to merge in https://github.com/voxpupuli/puppet-vault_lookup/pull/12 into the current module world. It adds a 'raise_exceptions' option to lookup code to fail with an error message rather than failing out of the whole puppet process.

I haven't tested yet. Original comments, from @Magisus:

If a lookup function raises an exception, the whole catalog compilation will fail. This PR adds the ability to configure the lookup to not raise and instead simply log and return nil if it encounters an error, so that the users can structure their manifests to only conditionally depend on the result of the lookup.

We're not sure if this is useful or not, and are looking for use cases and feedback on the approach.

Fixes #13

tskirvin avatar Feb 26 '25 16:02 tskirvin

The static validations stuff - I'm not sure if that's a problem with the test suite in general or in the code I merged in.

tskirvin avatar Feb 26 '25 16:02 tskirvin

CI fails because the ruby code isn't valid anymore, please have a look.

bastelfreak avatar Feb 27 '25 10:02 bastelfreak