Manageiq: Upgrade to Ruby 2.4 for development

Created on 22 Mar 2017  路  13Comments  路  Source: ManageIQ/manageiq

I would suggest high level steps as:

The following can be started now and be done in parallel:

  • [x] Verify https://bugs.ruby-lang.org/issues/13772 is fixed and backported to 2.4 for thread memory leak issue but not yet released 2.4.2
  • [x] Upgrade webmock in repos for 2.4 support

    • [x] [Main miq repo](https://github.com/ManageIQ/manageiq/pull/14270)

    • [x] [kubeclient](https://github.com/abonas/kubeclient/issues/242)

  • [x] enumerate and update gems in our ecosystem to add ruby 2.4 to their .travis.yml and drop 2.2 if it makes sense

    • [x] activerecord-session_store

    • [x] acts_as_tree

    • [x] [ancestry](https://github.com/stefankroes/ancestry/pull/334)

    • [x] [ansible_tower_client](https://github.com/ansible/ansible_tower_client_ruby/pull/94)

    • [x] [apipie-bindings](https://github.com/Apipie/apipie-bindings/pull/65)

    • [x] [awesome_spawn](https://github.com/ManageIQ/awesome_spawn/pull/40)

    • [x] [azure-armrest](https://github.com/ManageIQ/azure-armrest/pull/263)

    • [x] [binary_struct](https://github.com/ManageIQ/binary_struct/pull/13)

    • [x] [config](https://github.com/railsconfig/config/pull/172)

    • [x] [excon](https://github.com/excon/excon/pull/622)

    • [x] [fast_gettext](https://github.com/grosser/fast_gettext/pull/91)

    • [x] [foreman_api_client](https://github.com/ManageIQ/foreman_api_client/pull/7)

    • [x] hawkular-client 1

    • [x] [image-inspector-client](https://github.com/moolitayer/image-inspector-client/pull/18)

    • [x] [kubeclient](https://github.com/abonas/kubeclient/pull/247)

    • [x] [linux_admin](https://github.com/ManageIQ/linux_admin/pull/182)

    • [x] [linux_block_device](https://github.com/ManageIQ/linux_block_device/pull/3)

    • [x] [manageiq-api-client](https://github.com/ManageIQ/manageiq-api-client/pull/70)

    • [x] manageiq-automation_engine 1, 2

    • [x] [manageiq-content](https://github.com/ManageIQ/manageiq-content/pull/105)

    • [x] [manageiq-gems-pending](https://github.com/ManageIQ/manageiq-gems-pending/pull/101)

    • [x] [manageiq-providers-amazon](https://github.com/ManageIQ/manageiq-providers-amazon/pull/245)

    • [x] [manageiq-providers-azure](https://github.com/ManageIQ/manageiq-providers-azure/pull/64)

    • [x] manageiq-providers-hawkular 1, 2

    • [x] [manageiq-providers-kubernetes](https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/12)

    • [x] [manageiq-providers-lenovo](https://github.com/ManageIQ/manageiq-providers-lenovo/pull/36)(Depends on the main repo PR)

    • [x] [manageiq-providers-openshift](https://github.com/ManageIQ/manageiq-providers-openshift/pull/10)

    • [x] [manageiq-providers-openstack](https://github.com/ManageIQ/manageiq-providers-openstack/pull/28)

    • [x] [manageiq-providers-ovirt](https://github.com/ManageIQ/manageiq-providers-ovirt/pull/26)

    • [x] [manageiq-providers-vmware](https://github.com/ManageIQ/manageiq-providers-vmware/pull/52)

    • [x] [manageiq-ui-classic](https://github.com/ManageIQ/manageiq-ui-classic/pull/803)(Depends on the main repo PR)

    • [x] [memoist](https://github.com/matthewrudy/memoist/pull/64)

    • [x] [memory_buffer](https://github.com/ManageIQ/memory_buffer/pull/10)

    • [x] [more_core_extensions](https://github.com/ManageIQ/more_core_extensions/pull/40)

    • [x] [ovirt_metrics](https://github.com/ManageIQ/ovirt_metrics/pull/20)

    • [x] [parallel](https://github.com/grosser/parallel/pull/205)

    • [x] rspec-rails

    • [x] [rufus-scheduler](https://github.com/jmettraux/rufus-scheduler/pull/245)

    • [x] [ruport](https://github.com/ruport/ruport/pull/38)

    • [x] [trollop](https://github.com/ManageIQ/trollop/pull/84)

    • [x] [unf](https://github.com/knu/ruby-unf/pull/14)

After the above is done:

  • [x] Announce date for official support for 2.4 and dropping of 2.2 (October 4th) here
  • [x] Update docker build to use ruby 2.4.0 1 2''
  • [x] Update manageiq-appliance-build to use ruby 2.4.0
  • [x] Change bot to 2.3 (requires manually updating the bot's environment)
  • [x] [Change .travis.yml to 2.4](https://github.com/ManageIQ/manageiq/pull/16101)
ruby2.4

Most helpful comment

@jrafanie I just ran the full test suite with Ruby 2.4 with no issues or deprecations, etc. I did not go through every single dependency as seems to be a huge time suck for the vast majority of gems to not be affected in any way; I think we've already got all the essential ones.

Tomorrow (Tuesday) we should open all pull requests across all ManageIQ repos to drop 2.2 and add 2.4 to test matrices, etc, to let CI run everything and make sure everything's green. Then we rebase it all and merge on Wednesday morning.

All 13 comments

@jrafanie why isn't hawkular-ruby-client on the list of gems that need update?
if I understand correctly the required changes, hawkular ruby client needs bumping travis.yml (and also gemspec iiic) as well as upgrading webmock - like other gems (kubeclient, for instance)
@cfcosta @Jiri-Kremser @pilhuhn fyi ^^

@abonas I go through my Gemfile.lock and add ones we own or partially own to this list as I get a chance to try them. If you have others we should add, please add them or mention them here and I'll add them. Thanks!

I believe at least a few of our gems depend on webmock for testing. Hopefully, we can upgrade webmock and be able to use the same cassettes from webmock in 2.4 and earier rubies.

indeed @jrafanie
https://github.com/ManageIQ/manageiq-gems-pending/blob/master/manageiq-gems-pending.gemspec#L37
https://github.com/hawkular/hawkular-client-ruby/blob/master/hawkularclient.gemspec#L33
What concerns me is that changes like this upgrade are not known well by the broader miq community, I learned about it by chance from an issue in kubeclient

@abonas So, it wasn't announced to the larger miq community yet for a few reasons:

  • we need to get the core miq repo 2.4 compatible first, many gems clone miq for their own tests
  • I need to provide examples of what needs to be done and any known issues
  • I really want to understand the webmock upgrade fix on at least a single gem repo before I ask others to do it. Unfortunately, I don't have any of the environments to re-record the vcr cassettes on any of these gems to see if the newer webmock produces 2.3/2.4 compatible cassettes.

So, yes, you were a pilot user/developer. I will announce something once we get the above bullet points completed.

[ ] [manageiq-providers-amazon](https://github.com/ManageIQ/manageiq-providers-amazon/pull/245)
[ ] [manageiq-providers-azure](https://github.com/ManageIQ/manageiq-providers-azure/pull/64)
[ ] [manageiq-providers-hawkular](https://github.com/ManageIQ/manageiq-providers-hawkular/pull/17)
[ ] [manageiq-providers-kubernetes](https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/12)
[ ] [manageiq-providers-openshift](https://github.com/ManageIQ/manageiq-providers-openshift/pull/10)
[ ] [manageiq-providers-ovirt](https://github.com/ManageIQ/manageiq-providers-ovirt/pull/26)
[ ] [manageiq-providers-openstack](https://github.com/ManageIQ/manageiq-providers-openstack/pull/28)
[ ] [manageiq-providers-vmware](https://github.com/ManageIQ/manageiq-providers-vmware/pull/52)

Does this also require an update to puma (3.7.1ish) sometime so as to avoid https://github.com/puma/puma/issues/1220?

@d-m-u thanks for the headsup... I haven't seen this problem on ruby 2.4.1... Maybe it's only on 2.4.0?

Whoops, sorry, yeah, you're right.

@jrafanie Can we update the OP note on manageiq-gems-pending now and check it off as done?

I propose waiting for next Ruby release before using it in production builds. Not a problem on Travis and not a blocker to dropping 2.2 IMHO.

@jrafanie I just ran the full test suite with Ruby 2.4 with no issues or deprecations, etc. I did not go through every single dependency as seems to be a huge time suck for the vast majority of gems to not be affected in any way; I think we've already got all the essential ones.

Tomorrow (Tuesday) we should open all pull requests across all ManageIQ repos to drop 2.2 and add 2.4 to test matrices, etc, to let CI run everything and make sure everything's green. Then we rebase it all and merge on Wednesday morning.

As discussed, plans have changed slightly and a more official process has been agreed to. We're dropping Ruby 2.2 today, updating @miq-bot, etc, but will be continuing to run appliances on 2.3.1, as dictated by the supported version in Red Hat Software Collections. We'll also add a 2.4.2 Travis build, which will conclude supporting 2.4 and then this issue can be closed.

Was this page helpful?
0 / 5 - 0 ratings