Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Reverting some pins #775

Merged
merged 3 commits into from
Apr 5, 2016
Merged

Reverting some pins #775

merged 3 commits into from
Apr 5, 2016

Conversation

tyler-ball
Copy link
Contributor

Reverting two PRS:

  1. Temporarily pinning net-ssh to 3.0.2 until we can get Specinfra updated to 3.1 #768 because Allowing the use of net-ssh < 4.0 if using Ruby 2.0+ mizzy/specinfra#538 was merged and now the entire ChefDK omnibus should be using net-ssh 3.1.1
  2. Pin jmespath to 1.1.x to avoid json_pure (build break) #772 because TypeError when using json_pure with Chef jmespath/jmespath.rb#20 was fixed and should prevent load order issues with json vs json_pure

NOTE: the first commit shouldn't actually be merged, we should merge chef/omnibus-software#643 and switch the code here back to using master

@tyler-ball
Copy link
Contributor Author

For anyone coming across this later:

The reason we now include gem 'json' in this Gemfile is to ensure that someone running bundle exec does not use the json_pure gem. When using the json_pure gem there is an error we encounter trying to serialize a hash into JSON using .to_json. Ultimately we should fix that bug but I couldn't repro it locally and this was the fastest fix to get our build matrix green again.

json_pure is included by jmespath (which is included by aws-sdk-ruby). json_pure is included so that jmespath is compatible with older versions of Ruby which do not include the pre-built JSON extensions. Jmespath first tries to load the included json gem and then falls back to json/pure if the included gem is not available.

Because we build our own omnibus and ensure that we are using recent version of Ruby, we should always have the included json gem available.

But an issue arrises when trying to run bundle exec when the JSON gem is not included in the Gemfile. The gem 'json' call fails with a LoadError because the JSON gem is not included in the Gemfile, so json_pure is loaded. That is why this PR adds the JSON gem to the bundle - so that gem 'json' will succeed and json_pure will not be loaded.

@danielsdeleo
Copy link
Contributor

👍

1 similar comment
@mwrock
Copy link
Contributor

mwrock commented Apr 5, 2016

👍

released with an update that prevents load issues with json vs json_pure
…assing an error it has until we can fix that error
@tyler-ball tyler-ball merged commit 6f24b10 into master Apr 5, 2016
@tyler-ball tyler-ball deleted the revert_pins branch April 5, 2016 22:15
@chef-boneyard chef-boneyard locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants