HomePhorge

(PUP-1299) Stop stripping arrays in future parser
423bd5f5277eUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-1299) Stop stripping arrays in future parser

Resource values that were arrays used to be converted to a single value
iff the array only had one element. This created a lot of confusion for
type and provider authors when the value they would set in a manifest
would not be the value they would get in the type. The conversion causes
large amounts of code that would check for values that aren't arrays and
convert them to arrays in various places. There were also often tests
that would be written directly against providers that would then not
catch errors in real use because the author was unaware, or just forgot,
that the array conversion would happen.

Under the future parser this is no longer done. The old behavior,
however, won't issue a deprecation warning because there isn't anything
that can be done about it from a user's perspective. The most likely
outcome from this change is that some manifests may stop working because
a value just happened to be a single-valued array that was on a
parameter that is not supposed to take an array. In such cases the error
would have been masked previously, but now will be uncovered.

Details

Provenance
Andrew Parker <andy@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU1769a14b8533: Merge pull request #2785 from Iristyle/maint/master/PUP-2454-uid-fix-Windows
Branches
Unknown
Tags
Unknown

Event Timeline

Andrew Parker <andy@puppetlabs.com> committed rPU423bd5f5277e: (PUP-1299) Stop stripping arrays in future parser (authored by Andrew Parker <andy@puppetlabs.com>).Jun 20 2014, 2:18 AM