You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 15, 2022. It is now read-only.
All of the above code is terrible and should be deleted.
This function takes an argument as args but that in handled in the second block below... What is this block doing then? It calls to_hash seemingly out of no where, and that takes the catalog's scope and turns it into a hash, supposedly to look for variables "at top scope" that come from some data source (like the old puppet enterprise console) but it has no safety and will pick up ANY variables in the namespace, including facts. This is a terrible design and seriously bad side-effects.
I mean, this function says "okay, I was called with args but before using that I'm just going to see if I can find anything else that could possibly have been passed to me but wasn't" and then tries to execute it.
Also, the raises in the begin just get captured by the rescue block that then raises again with the same message. Wat.
quote from @hunner:
All of the above code is terrible and should be deleted.
This function takes an argument as args but that in handled in the second block below... What is this block doing then? It calls to_hash seemingly out of no where, and that takes the catalog's scope and turns it into a hash, supposedly to look for variables "at top scope" that come from some data source (like the old puppet enterprise console) but it has no safety and will pick up ANY variables in the namespace, including facts. This is a terrible design and seriously bad side-effects.
I mean, this function says "okay, I was called with args but before using that I'm just going to see if I can find anything else that could possibly have been passed to me but wasn't" and then tries to execute it.
Also, the raises in the begin just get captured by the rescue block that then raises again with the same message. Wat.
based on a discussion in voxpupuli/puppet-bacula#37 (comment)