Skip to content

Allow the user to prevent the lookup from raising an exception #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tskirvin
Copy link

This is a quick attempt to merge in #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
Copy link
Author

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.

@bastelfreak
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optionally prevent vault lookup from raising exceptions
3 participants