Skip to content

FYI: runtime dependency json 1.8.x #18

Closed

Description

@cdenneen

This is just as FYI:

This gem since Sept when 1.1.3 was accidentally released without json runtime dependency has allowed systems shipped with json in ruby packages (Centos 7 with version 1.7.7) to work just fine for json dependent gems (like aws-sdk).
With the the 1.2.x release the dependency is back and systems that don't have ruby-devel (or equivalent on Windows)

This inadvertently caused systems that didn't realize this dependency was necessary past 7 months in any sort of configuration management, autoscaling scenario, etc to fail because normal "gem install aws-sdk" now would fail because of the missing Ruby Devel dependency to build json with native extensions.

Note is systems built with things like Puppet Enterprise 201x.x.x are shipping with vendored ruby so if one is relying on installed aws-sdk within that using something like "pe_gem" most likely they wouldn't have a reason to have ruby installed on the system.

@puppetlabs @aws

Activity

  1. trevorrowe commented on Mar 31, 2016

    @trevorrowe
    Contributor

    I am open to a discussion on possible work-arounds. I added the explicit dependency back because Ruby 1.9 ships with an older version of JSON. This version can not parse JSON scalar literal values:

    # in json 1.5.5 which ships with 1.9
    JSON.parse('1') #=> raises an error
    
    # in json 1.8.1+ which ships with 2.0+
    JSON.parse('1') #=> 1

    What if I replaced the hard dependency on json >= 1.8.1 and replaced it with the json_pure gem? I could add a small amount of code to attempt to load the normal json gem, and follow-up with a load of json pure.

    I'll put together a pull request as an example.

  2. added a commit that references this issue on Mar 31, 2016
    258fe7d
  3. ScottAllSet commented on Mar 31, 2016

    @ScottAllSet

    This is a blocking issue for my company. We're using aws-sdk in Chef to deploy Windows applications. Thank you for looking into it.

  4. trevorrowe commented on Mar 31, 2016

    @trevorrowe
    Contributor

    I went ahead and merged the change and cut a 1.2.2 patch release.

  5. ScottAllSet commented on Mar 31, 2016

    @ScottAllSet

    Thank you!

  6. cdenneen commented on Apr 1, 2016

    @cdenneen
    Author

    @trevorrowe Thanks... my initial test seems to be good. I'll have my teams test their Windows and Linux builds that were failing but I think we are good with this fix. Thanks again!

  7. xeron commented on Apr 1, 2016

    @xeron

    This PR fixed runtime/gem load issue for us, but now we're getting another one when using aws-sdk and json inside Chef:

    TypeError: wrong argument type JSON::Pure::Generator::State (expected Data)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions