Latest chef changed API again
Closed this issue · 10 comments
Chef version 10.0.4
Discussion:
<_hoodoos> who written chef reciept for riak? :) i have a question about DelegateClass used in Helper class. I'm not a ruby pro, but I replaced it with usual subclass
<_hoodoos> cuz, I got an error on chef reload saying that ERROR: TypeError: superclass mismatch for class TTuple
<_seancribbs> i felt like using the DelegateClass at the time
<_hoodoos> well, it doesn't work for some reason
<_seancribbs> give me a backtrace
<_hoodoos> something like https://gist.github.com/1151831
<_seancribbs> that should only happen if it's being loaded twice :(
<_seancribbs> hoodoos: it doesn't need to be a delegate class, i will fix and push a new version
<_seancribbs> ok, well clearly it needs to be changed
<hoodoos> https://gist.github.com/1151920 look at lines 102-107
<hoodoos> riak['sasl']['sasl_error_logger'] draws Array instead of {file, "/var/log/riak/sasl-error.log"}
<chip> I would do HANDSTANDS if the chef cookbook was chef 0.10.x compatible
<_seancribbs> i would do handstands if chef quit changing its api
Was there any every progress on this? I'm getting the same issue...
Same problem here. Any news?
This issue is over a year old. I can't run my specs because it breaks any recipe that includes it...
What the heck, if Basho haven't deigned to fix this in over a year, I'll just scrap their faulty cookbook and make my own from scratch. The situation is pretty absurd.
eh. I wouldn't say it's crappy. I'd recommend forking and submitting a PR. I'm not sure what the actual problem is though...
Peter, The cookbook is OpenSource. Feel free to submit a PR, we love contributions.
So to answer @sethvargo and for anyone who is curious - the issue is that the DelegateClass (for whatever reason) gets loaded twice. Easiest way to repro is to setup a vagrant instance using the chef-solo provisioner and point it to a cookbooks directory with more than one copy of the cookbook. I can't claim a significant amount of Ruby expertise here so I'm sure there is a deeper/better explanation.
@PeterBengtson I should have been on it since it has bit me in the past but it's not as if we don't care - it just hadn't bubbled up on the mailing list, IRC, or from customers. I've pushed a fix at 9080ff8. I'll also be updating for the latest 1.2 release very shortly. I apologize for the frustration but to echo what @densone said, it's open source so forking and submitting a PR is the approach to take.
Oh and please let me know if this doesn't fix it for you or presents any new issues!
So it looks like my fix totally broke things and I reverted it in the 1.2 updates - we have another solution that is being worked on and I'll update ASAP.
This issue was resolved with the introduction of the ErlangTemplateHelper.