(PUP-10772) Only accept msgpack if gem is installed #8431
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously the agent always advertised that it accepted the rich data msgpack
format (application/vnd.puppet.rich+msgpack) even if the agent didn't have the
msgpack gem installed locally. If the msgpack gem was installed on the server,
and the server selected the rich data msgpack format, then the agent would fail
to deserialize the catalog.
Now we call the
suitable?method in the superclass so the msgpack featureconstrain is taken into account. Calling the super
supported?method triggersa bunch of other logic around whether or not the format implements required
methods, so avoid that.
Note the "raw" msgpack format didn't have this issue because it didn't override
the "supported?" method.