Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
Puppet Developer Experience
-
1
-
PDE 2017-01-25, PDE 2017-02-08
-
Bug Fix
-
-
No Action
-
internal changes, covered by existing tests
Description
When an instance of class Puppet::Module is created, the initialize method will first call has_metadata? to check if the metadata.json file is present and valid. This method will do a full parse of the file to check its validity. Next, the initializer will call the method load_metadata. It parses the same file once again.
Suggestion:
- Add a validity check to the load_metadata method by adding a begin/rescue around its PSON.parse
- Remove the call to has_metadata? from the initialize method