Puppet currently produces and consumes data in several formats which:
- are not explicitly documented
- are sometimes modified by mistake (e.g. when a developer adds a private
instance variable to a class, and that instance variable gets automatically
serialized to YAML)
- are sometimes modified without a full appreciation of the consequences of
the changes (e.g. a format change is introduced which creates
incompatibilities between old and new versions of Puppet, or between
desynchronized versions of Puppet and Dashboard).

Jesse Wolfe, Markus Roberts, Randall Hansen, and I had a discussion the
other day about how to improve this situation, and we have a proposal for a
first step.  This initial proposal affects Puppet's JSON formats only:

- Vendor the "json_shape" library, a lightweight JSON schema validator (
https://github.com/jes5199/json_shape).
- Create a subdirectory of the Puppet project called "serialization_schema"
in which we store schemas for the various JSON data formats used by Puppet.
- Create spec tests which validate each of Puppet's JSON output formats
against these schemas.
- Publish the contents of the "serialization_schema" directory on our web
site so that users and 3rd party developers will know how what to expect
from our data formats.
- Subject the contents of the "serialization_schema" directory to a more
rigid change control process than the rest of Puppet, so that we don't
unintentionally introduce changes to our file formats while fixing bugs and
adding features.

Our hope is that once this is implemented we can build similar techniques to
address YAML formats.

Comments welcome.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to