Skip to content
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

/cookbook_artifacts support for in-memory and FILE_STORE backends (not ChefFS) #178

Merged
merged 1 commit into from
Dec 10, 2015

Conversation

randomcamel
Copy link
Contributor

No description provided.

delete_data(request)

# go through the recipes and delete stuff in the file store.
identified_cookbook_data["recipes"].each do |r|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect there to be more than recipes here. Shouldn't it go through all segments of the cookbook files?

@jkeiser
Copy link
Contributor

jkeiser commented Dec 10, 2015

Just the one comment, then 👍 otherwise.

Can you create a bug for hoovering unused checksums on DELETE or PUT of a cookbook? i.e. when a cookbook no longer references a checksum, the file can be deleted as long as no other cookbook references it either.

cookbook['metadata']['dependencies'] ||= {}
cookbook['metadata']['attributes'] ||= {}
cookbook['metadata']['recipes'] ||= {}
end
cookbook['json_class'] ||= 'Chef::CookbookVersion'

# not sure if there is a material reason for these differences.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because when json_class is present, Chef's default API client code will try to convert the JSON to a custom ruby object. I didn't want that behavior when dealing with cookbook artifact objects.

@tyler-ball
Copy link
Contributor

👍

randomcamel added a commit that referenced this pull request Dec 10, 2015
@randomcamel randomcamel merged commit 003900d into master Dec 10, 2015
@randomcamel randomcamel deleted the cd/cookbook_artifacts branch December 10, 2015 23:14
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants