On Sep 3, 2014, at 11:00 AM, Andy Parker <a...@puppetlabs.com> wrote:

> On Wed, Sep 3, 2014 at 4:32 AM, Erik Dalén <erik.gustav.da...@gmail.com> 
> wrote:
> It would be nice to remove the document_type from the PSON hashes for Puppet 
> 4. This would be a modification of the API though, so it is a backwards 
> incompatible change. But it is data that AFAIK the agent throws away anyway 
> when it receives it.
> 
> The benefit of doing this change is that the API would look the same for all 
> serialisation formats, and a bunch of code for the PSON special handling 
> could be removed. It should be completely backwards compatible for Puppet, 
> but other consumers of the API might be affected.
> 
> 
> Here is a example of code that adds this information to the API reply 
> (there's a bunch of places that does this):
> https://github.com/puppetlabs/puppet/blob/puppet-4/lib/puppet/resource/catalog.rb#L390-L403
> 
> And here is the code that throws away that info:
> https://github.com/puppetlabs/puppet/blob/puppet-4/lib/puppet/network/formats.rb#L157-L167
> 
> What do you others think about doing that change?
> 
> 
> I think that is pretty reasonable. The information can't be very important if 
> puppet doesn't need it in any way. Does anyone know of any consumers of the 
> puppet REST api that depend on this being there?


I don't think anything uses it.  I put that in there on the assumption that you 
wouldn't always be able to do point to point communication, so you'd need some 
kind of typing.  E.g., if you put that on a message bus, you need some way to 
know what kind of document it is.  REST is all about talking to specific end 
points, and we expect the caller to know where to send each kind of document, 
so it ends up not being used.

This was supposed to turn into an envelope format that allowed us to version 
the data structures and such, but it doesn't look like it ever evolved into 
that.  No idea if this is because we've never changed the formats, found 
another means of versioning them, or what.

-- 
http://puppetlabs.com/ | http://about.me/lak | @puppetmasterd

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/42C5958D-B52E-4448-AD1A-3859EEDA92DE%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to