-
Notifications
You must be signed in to change notification settings - Fork 2.2k
(PUP-11123) make Function unwrap more tolerant #8651
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
(PUP-11123) make Function unwrap more tolerant #8651
Conversation
|
Hi @cocker-cc, thanks for submitting a pull request! Can you provide more detail about your use case? Is the value originating in hiera or in a different module? |
In the Process of transitioning several Component-Modules to be sensitive-aware, but stay backwards-compatible, I frequently have a Block like: With the suggested Pullrequest this would reduce to just |
ekohl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also thought about this. It would certainly be useful to be able to treat Sensitive[String] and String the same in code. Right now I consider Sensitive mostly useless and just a painful thing which is why I've never bothered to use it. Being able to say "I need the raw value now, I know what I'm doing" vs "just log what you have and if it's sensitive, obscure the value" can certainly be a step in the right direction.
|
Thanks for your contribution @cocker-cc! Could you file a JIRA ticket in the PUP project and Also I wanted to note that |
Done.
Great. I copied the Variablenames from there to keep it consistent. |
joshcooper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Note main branch is for 7.x releases. I'd be fine releasing this in 6.x, you'd just need to retarget your PR against the 6.x branch.
I rebased it against |
- as there is no Function unwrap_if_necessary() we make the Function unwrap() more tolerant and let it return a non-sensitive Value just like it is
|
This was merged to |
|
@ekohl we have automation that promotes/merges up commits from |
|
Thanks for your contribution @cocker-cc! This should be released in the next set of releases in July. |
unwrap_if_necessary()we make the Functionunwrap()more tolerant and let it return a non-sensitive Value just like it is