[PUP-7017] Use newer puppetlabs_spec_helper that does metadata-json-lint as part of validation Created: 2016/12/14  Updated: 2017/06/28  Resolved: 2017/06/23

Status: Closed
Project: Puppet
Component/s: PMT
Affects Version/s: None
Fix Version/s: PUP 5.0.0

Type: Improvement Priority: Normal
Reporter: garrett honeycutt Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relates to PUP-7694 metadata.json created with `puppet mo... Closed
Team: Agent
Sprint: Agent 2017-06-28
Release Notes: New Feature
Release Notes Summary: Puppet Module Tool’s gem dependencies are updated to use puppetlabs_spec_helper 1.2.0 or later (which will run `metadata-json-lint` as part of the `validate` rake task).
QA Risk Assessment: Manual


As of puppetlabs_spec_helper 1.2.0, metadata-json-lint no longer needs to be a separate rake task as it is part of the validate task. The generated skeleton for a puppet module should reflect this.

Comment by garrett honeycutt [ 2016/12/14 ]

PR - https://github.com/puppetlabs/puppet/pull/5438

Comment by garrett honeycutt [ 2017/05/15 ]

This is a very minor change and already widely adopted in the community. Could this please be merged?

Comment by Glenn Sarti [ 2017/06/20 ]

Merged into master at;

Comment by John Duarte [ 2017/06/23 ]

Using puppet-agent at SHA de8df49 containing puppet at SHA 3e66932 on Centos 7 x86_64, this passes manual validation.

The lint validation of the metadata.json file successfully takes place when performing a rake validate task.

NOTE: Currently, this validation produces an ERROR when the metadata.json file is generated with the --skip-interview option. This has been filed as a separate issue in PUP-7694

Output of validation session

[root@rd6vm0wayc4sdfm ~]# puppet --version
[root@rd6vm0wayc4sdfm ~]# cat /opt/puppetlabs/puppet/VERSION
[root@rd6vm0wayc4sdfm ~]# /opt/puppetlabs/puppet/bin/gem install bundler
Fetching: bundler-1.15.1.gem (100%)
Successfully installed bundler-1.15.1
Parsing documentation for bundler-1.15.1
Installing ri documentation for bundler-1.15.1
Done installing documentation for bundler after 5 seconds
1 gem installed
[root@rd6vm0wayc4sdfm ~]# puppet module generate --skip-interview foo-bar
Notice: Generating module at /root/bar...
Notice: Populating templates...
Finished; module generated in bar.
[root@rd6vm0wayc4sdfm ~]# cd bar/
[root@rd6vm0wayc4sdfm bar]# /opt/puppetlabs/puppet/bin/bundle install
Bundle complete! 7 Gemfile dependencies, 36 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
[root@rd6vm0wayc4sdfm bar]# /opt/puppetlabs/puppet/bin/rake validate
---> syntax:manifests
---> syntax:templates
---> syntax:hiera:yaml
(WARN) dependencies: Dependency puppetlabs-stdlib has an open ended dependency version requirement >= 1.0.0
(ERROR) required_fields: Required field 'summary' not found in metadata.json.
Errors found in metadata.json

Generated at Sun Jul 12 22:30:44 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.