[[chef-dev]] Re: [[chef-dev]] Moving forward with the JSON gem


Chronological Thread 
  • From: Akzhan Abdulin < >
  • To: Chef Dev < >
  • Subject: [[chef-dev]] Re: [[chef-dev]] Moving forward with the JSON gem
  • Date: Sat, 5 Mar 2011 12:18:57 +0300
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=MrZ65dhlst0Vz1M0CcdAqy2Fm+aFBmN6WqIBYMovuy62nQI89dnv27GXMledOGu/tu azJbR/zZAV69Bsd2qTUyjo6rdmGoG2c4e2WgXsMEWQ9gwcVHngbHzgE0lWgUtoX2xSsb SXgja2U7jPkCNxHswvCFxTif5H64g615TZosw=

I suppose that we need to
1) Move Chef::JSONCompat to ohai gem.
2) Use Ohai::JSONCompat everywhere we need to.
3) Switch to yajl-ruby as last step.

2011/3/5 Bryan McLellan < "> >
Chef initially required json without a version constraint, but json
1.4.3 was pretty broken so Chef 0.8.12 got a constraint of <= 1.4.2
the next day. We became explicitly cautious of changes to the json gem
as a result.

Three months later json 1.4.4 shipped and had some fixes. As part of
CHEF-1548 [1] json 1.4.6 was tested and the constraint was switched to
>= 1.4.4, <= 1.4.6.

FreeBSD ports now uses json 1.5.1, and we're surely falling behind in
other distributions as well (although debian/ubuntu appear to be
packaging a version from the stone age). The plan, in CHEF-2031 [2],
is to test out json 1.5.1 and if we're happy with it we will set the
contraints to >= 1.4.4 <= 1.5.1 for now. It would be nice to not do
this for 0.9-stable, because of our fear of the json gem causing
rampant instability, but we're committed to supporting the stable tree
for a few more months and I we're behind the distributions already. So
I think we have to test json 1.5.1 on 0.9 and 0.10.

We've had issues in the past with Chef and Ohai having different
constraints around the json gem. Since we're planning to do an ohai
release soon, we would need to start testing json 1.5.1 against ohai
and chef now, and release the next version of ohai with the upped
constraint to match the next 0.9-stable release.

There is strong desire in the community to switch from json to
yajl.There are a couple tickets [3][4] for that switch. To fix
CHEF-1292 [5] we added a Chef::JSONCompat (originally Chef::JSON [6])
wrapper for ::JSON which set some values. Akzhan Abdulin noted [7]
that if we switched to always using that class it would be easier to
shoe in yajl.

Does anyone have additional thoughts about the priority of this or
preferred alternatives?

Bryan McLellan

[1] http://tickets.opscode.com/browse/CHEF-1548
[2] http://tickets.opscode.com/browse/CHEF-2031
[3] http://tickets.opscode.com/browse/CHEF-1948
[4] http://tickets.opscode.com/browse/OHAI-244
[5] http://tickets.opscode.com/browse/CHEF-1292
[6] http://tickets.opscode.com/browse/CHEF-2057
[7] http://tickets.opscode.com/browse/CHEF-2059




Archive powered by MHonArc 2.6.16.

§