Today marks one month since Nathen Harvey wrote about our plans for the Chef Supermarket and our newly expanded Cookbook Engineering Team (https://www.chef.io/blog/2015/09/08/the-state-of-the-public-supermarket/). I thought at this point we should probably give a bit of an update to let everyone know some of the work we’ve accomplished over the last month.
Getting the house in order:
We maintain 130+ community cookbooks at Chef and for several years many of those had not been updated. Our first priority was general cleanup of these cookbooks so we can evaluate fixes and features to work on next:
- All cookbooks have been moved from opscode-cookbooks to chef-cookbooks
- We created a new single repository for Contributing and Testing documents (https://github.com/chef-cookbooks/community_cookbook_documentation). All repos now have TESTING.MD and CONTRIBUTING.MD files that point here with up to date instructions. No more references to JIRA!
- We added MAINTAINERS.toml and MAINTAINERS.md files with a list of cookbook maintainers you can contact. As we loop in community members to help maintain these cookbook they’ll be listed in these files.
- All references to Opscode have been replaced with Chef Software
- Cookbook version badges have been added to all cookbooks so you can easily see the latest published release
- README.md files have been expanded with requirements sections that list support versions of chef, supported platforms, and required cookbooks
- The new issues_url and source_url metadata have been added for Supermarket
- Standardized .gitignore and chefignore files have been added to all repos
- Berksfiles have been updated to the 3.X format
- Apache 2.0 license files have been added to the root of every repo
We at Chef are firm believers in testing infrastructure, but many of our cookbooks were created well before the technology existed to do so. We’ve begun the process of rolling up to date testing out to all of our community cookbooks. Obvious extensive testing will take time, but this gives us a solid baseline to work from.
- We’ve turned Travis on for all repos, and added Travis badges to all Readme.md files. Travis had actually been turned off for sometime, but the badges remained in many cookbooks giving a false sense of security. Travis is also using pre-release ChefDK debs now instead of testing via gems, which allows us to test on the latest Chef before we ship. Expect a lot of red here for the time being as we still have a significant amount of cookbook cleanup to perform.
- We updated all Test Kitchen configs to the new format and added additional platforms so we’re testing common use cases. We also added Test Kitchen configs to any cookbook that was lacking them.
- All existing Chefspecs have been updated to the 4.X format. We also added basic convergence specs to any cookbook lacking Chefspecs.
- We released Foodcritic 5.0 and began testing all of our cookbooks with that in Travis. Supermarket is also using 5.0 to test uploaded cookbooks
- There’s a new standard .rubocop.yml file with a sane set of rules and good portion of the warnings have been resolved.
- For local testing we added a Rakefile with several tasks to speed up the testing process
- All of the development Gems have been updated and broken out into groups in the Gemfiles
- We’ve begun rolling out Test Kitchen running via Docker in Travis so we can run full integration tests on every commit See https://github.com/chef-cookbooks/activemq for an example of how that works.
Issues and PRs:
With 130 repositories it’s easy to become overwhelmed by the number of issues and PRs we receive. We’re working to stay on top of the existing PRs and to better identify where work is necessary.
- Our Github org is now polled daily and we save off the issue count and PR count per repo so we can compare how we’re doing over time, and see where work is needed.
- We’ve merged a large number of PRs. How many? Well on 9/4 when we began polling we had 380 open PRs and today we have 292 PRs even though a large number of new PRs have been opened in the last month. With our testing in place we hope to begin rapidly merging PRs where the CLA has been signed.
- We’ve released 46 Chef managed cookbooks in the last month with a large number of bug fixes, improved platform support, and new features.
We think we’ve come fairly far in the last month, but there’s certainly more to come. Expect our open PR / issue count to drop, and many new cookbooks released to Supermarket in the coming months. Additionally expect to see higher quality cookbooks with our expanded testing and the Cookbook Quality Metrics (https://github.com/chef-cookbooks/cookbook-quality-metrics). If you have any questions or advice of where to focus our efforts now feel free to reach out to me.