Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
PUP 5.5.6
-
None
-
-
Platform Core
-
Needs Assessment
-
Deprecation
-
-
Needs Assessment
Description
Puppet Version: 5.5.6
Puppet Server Version: N/A
OS Name/Version: Centos 7, same on Windows 10
Per the discussion in PUP-1467, all Ruby code in Types and Providers is supposed to receive undef values as nil. However, in at least some circumstances, I am receiving the Symbol :undef instead.
For example, given the following resource declaration:
foo { 'bar': |
baz => {
|
quux => undef,
|
},
|
}
|
Desired Behavior:
Inside the provider, resource[:baz] evaluates to {'quux' => nil}
Actual Behavior:
Inside the provider, resource[:baz] evaluates to {'quux' => :undef}
Additional Context
Besides behaving contrary to the discussions in PUP-1467 (which is the closest I could find to documentation on :undef vs nil, this is also problematic when the provider is constructing JSON, perhaps to communicate with an API; the desired JSON string would be {"quux": null}, but instead you end up with {"quux": "undef"}.
Attachments
Issue Links
- relates to
-
MODULES-7768 stdlib : fixes for Puppet 6 (PUP-9112)
-
- Resolved
-
-
MODULES-7814 Tomcat: Unable to run on puppet 6
-
- Resolved
-
-
MODULES-7835 stdlib : delete_undef_values doesn't seem to work under Puppet 6
-
- Resolved
-
-
PUP-1467 DIE :undef, DIE!
-
- Closed
-