sous-chefs / apt

Development repository for the apt cookbook
https://supermarket.chef.io/cookbooks/apt
Apache License 2.0
202 stars 266 forks source link

Normalize full key name to avoid resource update on identical key names #207

Closed bai closed 8 years ago

bai commented 8 years ago

Description

We have multiple apt repositories that have key names similar enough so the cookbook treats them as the same when performs remote_file cache (due to regex below).

Issues Resolved

This PR makes sure that remote_file caches remote key with a unique name and thus avoids updating resources on every chef run.

Check List

bai commented 8 years ago

Apologies for bumping this: do you think it's something that makes sense @tas50 ?

tas50 commented 8 years ago

Concept seems sound. Passing this over to @thommay as he worked on the cookbook last

bai commented 8 years ago

Friendly bump 👋 : does anyone have objections of shipping this? We've ran it successfully on production for couple of months already.

thommay commented 8 years ago

@bai If you made this same PR against chef/chef ( https://github.com/chef/chef/blob/master/lib/chef/provider/apt_repository.rb#L156 ) we'd take it there, and then it'd get propagated out with compat_resource . In the not so long term we'll remove these resources from the cookbook. Sorry for the slow response!

bai commented 8 years ago

Thanks for taking your time explaining this @thommay — I've just created a similar PR at https://github.com/chef/chef/pull/5290

thommay commented 8 years ago

awesome, thanks. Closing this now.