Chef 13 Upgrade: knife-cookbook-doc gem upgrade

As part of an upgrade from Chef 12 to Chef 13, this is one of the posts in which I've been detailing the issues I've encountered, and how I've resolved them .

I use the gem knife-cookbook-doc to autogenerate documentation from my Chef cookbooks. It allows me to ensure that documentation is kept right next to source files, which promotes changing of documentation at the same time as code, as well as make it easier to keep updated as it's a task that can be automated.

However, when upgrading to Chef 13, I found that my README.md's dependencies section had:

* #<Logger:0x0000000004397548> () (Recommended but not required)
* #<Logger:0x0000000004397548> () (Suggested but not required)
* Conflicts with #<Logger:0x0000000004397548> ()

Digging into the code, I found this was triggered by the recommendations, suggestions and conflicting methods, which read from the corresponding recommends, suggests and conflicts fields within the cookbook's metadata. As those fields no longer existed, a Logger was returned, instead of the valid metadata.

I raised a PR which was merged within a few hours and released as v0.25.0, and can be installed with:

chef gem install knife-cookbook-doc -v 0.25.0

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

#blogumentation #chef-13-upgrade #chef #knife-cookbook-doc #chef-13 #documentation.

This post was filed under articles.

Has this content helped you? Please consider supporting me so I can continue to create content like this!

Related Posts

Other posts you may be interested in:

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.