voxpupuli / metadata-json-lint

Tool to check the validity of Puppet metadata.json files
Apache License 2.0
29 stars 27 forks source link

Warn when a module supports an OS that is not supported by Puppet (optional) #51

Open rnelson0 opened 7 years ago

rnelson0 commented 7 years ago

https://docs.puppet.com/puppet/latest/system_requirements.html lists the OSes and versions supported by Puppet. In the 1/5/2016 community triage call, it was discussed that module metadata may have compatibility with versions not supported by puppet. Notes from the meeting:

While the forge changes will identify new and existing modules and what compatible OSes are not supported, it would be nice to add a check to metadata-json-lint so that module owners could flag these values in their CI pipeline.

rnelson0 commented 7 years ago

This is currently a placeholder until some decisions are made on the forge solution; I'd like to leverage a dynamic list of supported OSes rather than hardcoding some interpretations of the system requirements page and hope to leverage something from the forge. Maybe akin to rspec-puppet-facts, where supported OSes are stored in an external datastore?

nibalizer commented 7 years ago

I don't like upgrade shaming people. If they're running an old version they almost certainly know it.

However, a module author that wrote Ubuntu 10.04 into a metadata.json file years ago and forgot about it... that person could benefit from this.

Realistically I think this would just flag a bunch of older modules with a warning, when they are unchanged from their ubuntu 12.04/puppet3 configuration and continue to work.

If the reason to change metadata.json is because the forge has a hard time representing the data, that's a forge problem and I don't think we should use metadata-json-lint to push people to fix it.

rnelson0 commented 7 years ago

You got the use case right. Remind the module maintainers that they're supporting a defunct OS (from puppet's POV) and let them decide if they want it to cause red in their CI matrix or not. We just want to give them that information to do with as they desire. -- Rob Nelson

ghoneycutt commented 7 years ago

While I definitely see the value in being alerted to using an outdated platform, I don't think that should be part of m-j-l. A bunch of my modules support ancient systems like Solaris 9 and Suse 9 and will continue to because of their usage in telecom. If I write the metadata.json correctly to show that these are supported, then m-j-l should not bother me by telling me they are unsupported. We know :).

rnelson0 commented 7 years ago

It's not just ancient systems, but systems that Puppet (Labs) doesn't support. It would definitely be an optional check. I don't like the idea of two tools to analyze the same file, but if there is another tool where this would fit better, let me know.

ghoneycutt commented 7 years ago

I think it would be better as its own tool. If you decide to include it in m-j-l, I have no objections though the default should be disabled and then people can opt-in.