Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Add service class to GC cookbook_artifacts #463

Merged
merged 1 commit into from
Aug 12, 2015

Conversation

danielsdeleo
Copy link
Contributor

This relies on some APIs that don't exist yet, so it cannot work until those are created.

Adds a service object that traverses policies and cookbook artifacts to determine which cookbook artifacts are no longer referenced by any policy revision, then deletes those.

It has to fetch every policy revision from the server, and also must make a delete call for each unreferenced cookbook. This is probably pretty slow in a larger organization, but I think this is okay for now because it's a periodic maintenance command, not something you'd run frequently. It also will probably be faster if you cleanup policy revisions first, which I will note in the documentation.

@danielsdeleo danielsdeleo merged commit 6af1ed8 into master Aug 12, 2015
@danielsdeleo danielsdeleo deleted the clean-policy-cookbooks branch August 12, 2015 23:06
@chef-boneyard chef-boneyard locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants