-
Notifications
You must be signed in to change notification settings - Fork 98
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
Conversation
76641a9
to
5d898a7
Compare
5d898a7
to
02517d7
Compare
02517d7
to
953ec38
Compare
953ec38
to
845299d
Compare
delete_data(request) | ||
|
||
# go through the recipes and delete stuff in the file store. | ||
identified_cookbook_data["recipes"].each do |r| |
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.
I would expect there to be more than recipes here. Shouldn't it go through all segments of the cookbook files?
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. |
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'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.
👍 |
e89295d
to
b7353c8
Compare
/cookbook_artifacts endpoints
No description provided.