Skip to content

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

Open
tskirvin wants to merge 5 commits into
voxpupuli:masterfrom
tskirvin:optional-raise
Open

Allow the user to prevent the lookup from raising an exception#118
tskirvin wants to merge 5 commits into
voxpupuli:masterfrom
tskirvin:optional-raise

Conversation

@tskirvin

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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