-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the initial destruction of cookbooks out of basic retention #1
Conversation
dbf0439
to
7df1b58
Compare
@jonathanmorley care to take a look? Would like some feedback on how we can get this to the same place our other package retention policies run. |
|
||
def version_info_for_cookbook(cookbook_name) | ||
nodes = all_nodes_for_cookbook(cookbook_name) | ||
versions = Chef::CookbookVersion.available_versions(cookbook_name).map! do |version| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why map!
, compared to map
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what happens when you refactor and miss something
|
||
def version_info_for_cookbook(cookbook_name) | ||
nodes = all_nodes_for_cookbook(cookbook_name) | ||
versions = Chef::CookbookVersion.available_versions(cookbook_name).map! do |version| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to assign to unused variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is used
Adds a function to remove cookbooks that are not being used. It essentially does the following:
Things to consider.