Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Ruby 2.7 #19678

Closed
18 tasks done
jrafanie opened this issue Jan 2, 2020 · 26 comments
Closed
18 tasks done

Support Ruby 2.7 #19678

jrafanie opened this issue Jan 2, 2020 · 26 comments
Assignees
Projects
Milestone

Comments

@jrafanie
Copy link
Member

jrafanie commented Jan 2, 2020

Motivation: ruby 2.5 is EOL 2021-03-31 so we need 2.7 and 2.6 to be the supported rubies.

Work to be done:

Current maintenance schedule for ruby as of 2021-02-09 here:

Ruby 3.0
status: normal maintenance
release date: 2020-12-25

Ruby 2.7
status: normal maintenance
release date: 2019-12-25

Ruby 2.6
status: normal maintenance
release date: 2018-12-25

Ruby 2.5
status: security maintenance
release date: 2017-12-25
EOL date: 2021-03-31

Errors:

CMath (cmath gem)
Scanf (scanf gem)
Shell (shell gem)
Synchronizer (sync gem)
ThreadsWait (thwait gem)
E2MM (e2mmap gem)
  • config gem blows up on missing new_ostruct_member, fixed/triaged here (PR merged, gem with fix released)

  • "warning: Capturing the given block using Proc.new is deprecated; use &block instead\n"
    Causes many test failures checking the output to be empty:

  6) TaskHelpers::Imports::GenericObjectDefinitions#import when the source is a directory imports all .yaml files in a specified directory
     Failure/Error:
       expect do
         TaskHelpers::Imports::GenericObjectDefinitions.new.import(options)
       end.to_not output.to_stderr

       expected block to not output to stderr, but output "/Users/joerafaniello/.gem/ruby/2.7.0/gems/activerecord-5.1.7/lib/active_record/statement_cache.rb:90: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead\n"
  • undefined method `new' for BigDecimal:Class
   4) MiqWorker Monitor After Setup, A WorkerMonitor threshold validation for excessive memory should trigger memory threshold if worker is ready
     Failure/Error: :memory_usage     => ActiveSupport::NumberHelper.number_to_human_size(usage),

     NoMethodError:
       undefined method `new' for BigDecimal:Class
     # /Users/joerafaniello/.gem/ruby/2.7.0/gems/activesupport-5.1.7/lib/active_support/number_helper/rounding_helper.rb:37:in `round_significant'
     # /Users/joerafaniello/.gem/ruby/2.7.0/gems/activesupport-5.1.7/lib/active_support/number_helper/rounding_helper.rb:14:in `round'
     # /Users/joerafaniello/.gem/ruby/2.7.0/gems/activesupport-5.1.7/lib/active_support/number_helper/number_to_rounded_converter.rb:9:in `convert'
     # /Users/joerafaniello/.gem/ruby/2.7.0/gems/activesupport-5.1.7/lib/active_support/number_helper/number_converter.rb:132:in `execute'
     # /Users/joerafaniello/.gem/ruby/2.7.0/gems/activesupport-5.1.7/lib/active_support/number_helper/number_converter.rb:118:in `convert'
     # /Users/joerafaniello/.gem/ruby/2.7.0/gems/activesupport-5.1.7/lib/active_support/number_helper/number_to_human_size_converter.rb:21:in `convert'
     # /Users/joerafaniello/.gem/ruby/2.7.0/gems/activesupport-5.1.7/lib/active_support/number_helper/number_converter.rb:132:in `execute'
     # /Users/joerafaniello/.gem/ruby/2.7.0/gems/activesupport-5.1.7/lib/active_support/number_helper/number_converter.rb:118:in `convert'
     # /Users/joerafaniello/.gem/ruby/2.7.0/gems/activesupport-5.1.7/lib/active_support/number_helper.rb:262:in `number_to_human_size'
     # ./app/models/miq_server/worker_management/monitor/validation.rb:43:in `exceeded_memory_threshold?'
     # ./app/models/miq_server/worker_management/monitor/validation.rb:14:in `validate_worker'
     # ./spec/models/miq_server/worker_monitor_spec.rb:313:in `block (6 levels) in <top (required)>'
@jrafanie
Copy link
Member Author

jrafanie commented Jan 3, 2020

Warnings:

  • /Users/joerafaniello/.gem/ruby/2.7.0/gems/json-2.1.0/lib/json/common.rb:156: warning: Using the last argument as keyword parameters is deprecated # No longer warning in 2.7.2

  • /Users/joerafaniello/.gem/ruby/2.7.0/gems/faker-1.8.7/lib/faker.rb:149: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call # No longer warning in 2.7.2

  • /Users/joerafaniello/.gem/ruby/2.7.0/gems/i18n-1.7.0/lib/i18n.rb:179: warning: The called method `translate' is defined here. Various method names are found in test output with nearly 1000 warnings. # No longer warning in 2.7.2

  • /Users/joerafaniello/Code/manageiq/lib/extensions/ar_href_slug.rb:5: warning: Passing the keyword argument as the last hash parameter is deprecated # No longer warning in 2.7.2

  • warning: URI.escape is obsolete file_depot_mixin.rb:42: warning: URI.escape is obsolete (replace with Addressable.escape/encode)

  • warning: URI.unescape is obsolete # If found, use Addressable.unencode

  • ~~11 warning: deprecated Object#=~ is called on FalseClass; it always returns nil~~ # No longer warning in 2.7.2

  • ~~7080 warning: deprecated Object#=~ is called on Float; it always returns nil~~ # No longer warning in 2.7.2

jrafanie added a commit to jrafanie/manageiq that referenced this issue Jan 3, 2020
Add the gem for forward compatibility.

Found in ManageIQ#19678
@jrafanie jrafanie self-assigned this Jan 6, 2020
@Fryguy
Copy link
Member

Fryguy commented Jan 15, 2020

@jrafanie : https://github.com/rubyconfig/config/releases/tag/2.2.1

@d-m-u
Copy link
Contributor

d-m-u commented Jan 23, 2020

ArgumentError: wrong number of arguments (given 0, expected 1)
/Users/duhlmann/manageiq/lib/extensions/ar_types.rb:4:in 'initialize_type_map'
/Users/duhlmann/.rvm/gems/ruby-2.7.0-preview1/gems/activerecord-5.2.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:235:in 'initialize' 

fixed by passing the instance var in 235 of the adapter

@d-m-u
Copy link
Contributor

d-m-u commented Jan 23, 2020

the warning: Capturing the given block using Proc.new is deprecated; use &block instead errors I'm seeing are mostly from faraday which got updated

jrafanie added a commit to jrafanie/manageiq that referenced this issue Jan 23, 2020
@d-m-u d-m-u mentioned this issue Jan 24, 2020
21 tasks
aufi pushed a commit to aufi/manageiq that referenced this issue Jan 29, 2020
Add the gem for forward compatibility.

Found in ManageIQ#19678
@Fryguy Fryguy added this to Backlog in Roadmap Feb 10, 2020
@Fryguy Fryguy moved this from Backlog to To do in Roadmap Feb 11, 2020
aufi pushed a commit to aufi/manageiq that referenced this issue Feb 13, 2020
@chessbyte chessbyte added this to the Kasparov milestone Mar 18, 2020
@chessbyte chessbyte modified the milestone: Kasparov Mar 24, 2020
@chessbyte chessbyte moved this from To do to Backlog in Roadmap Mar 31, 2020
@chessbyte chessbyte removed this from the Kasparov milestone Mar 31, 2020
@cben
Copy link
Contributor

cben commented Apr 7, 2020

  • recursive-open-struct was broken on ruby2.7, fixed in 1.1.1.
    Current Gemfile allows 1.1.1 so bundle update takes it.
    But it also allows older versions e.g. 1.0.4.

    Do we want to force 1.1.1+ in one of our gemfiles to guarantee a ruby2.7-compatible version?
    (Currently it's a transitive dependency, not direct)

    I might EDIT: forced it in kubeclient, but we're unlikely bump kubeclient far enough to benefit (kubevirt currently pins kubeclient to 4.1.z, will happen in 4.6+ or 5.0)...

@cben
Copy link
Contributor

cben commented Apr 7, 2020

Do you care about keyword arg warnings in gems outside manageiq?

@jrafanie
Copy link
Member Author

jrafanie commented Apr 7, 2020

  • Do we want to force 1.1.1+ in one of our gemfiles to guarantee a ruby2.7-compatible version?
    (Currently it's a transitive dependency, not direct)
    I might EDIT: forced it in kubeclient, but we're unlikely bump kubeclient far enough to benefit (kubevirt currently pins kubeclient to 4.1.z, will happen in 4.6+ or 5.0)...

I'd rather not have to pull in recursive-open-struct, an indirect dependency, into manageiq. I'd rather kubeclient/image inspector client enforced the new version.

@jrafanie
Copy link
Member Author

jrafanie commented Apr 7, 2020

Do you care about keyword arg warnings in gems outside manageiq?

yeah, we'll want to pull in any new versions that support ruby 2.7 where possible. Can we safely upgrade kubeclient to get more 2.7 support?

@agrare
Copy link
Member

agrare commented Apr 20, 2020

Working on updating to to a newer kubeclient version, updating manageiq-providers-kubevirt to work with a newer version of fog-kuebvirt so we're not stuck on kubeclient 4.1 ManageIQ/manageiq-providers-kubevirt#160 and ManageIQ/manageiq-providers-kubernetes#368

@agrare
Copy link
Member

agrare commented Apr 25, 2020

We need to move to at least kubeclient v4.5 due to this issue ManageIQ/kubeclient#442

We are currently limited to 4.3 until we can get a release of fog-kubevirt with fog/fog-kubevirt#145

Fryguy added a commit to ManageIQ/manageiq-providers-kubernetes that referenced this issue Mar 19, 2021
Fryguy added a commit to ManageIQ/manageiq-providers-amazon that referenced this issue Mar 19, 2021
Fryguy added a commit that referenced this issue Mar 19, 2021
[LASKER] Lockdown tests to use ruby 2.6.6 per #19678
Fryguy added a commit to ManageIQ/manageiq-providers-redfish that referenced this issue Mar 19, 2021
Fryguy added a commit to ManageIQ/manageiq-providers-ovirt that referenced this issue Mar 19, 2021
Fryguy added a commit to ManageIQ/manageiq-providers-azure that referenced this issue Mar 19, 2021
Fryguy added a commit to ManageIQ/manageiq-schema that referenced this issue Mar 19, 2021
Fryguy added a commit to ManageIQ/manageiq-providers-scvmm that referenced this issue Mar 19, 2021
Fryguy added a commit to ManageIQ/manageiq-providers-nuage that referenced this issue Mar 19, 2021
Fryguy added a commit to ManageIQ/manageiq-content that referenced this issue Mar 19, 2021
Fryguy added a commit to ManageIQ/manageiq-providers-openstack that referenced this issue Mar 19, 2021
Fryguy added a commit to ManageIQ/manageiq-providers-vmware that referenced this issue Mar 19, 2021
Fryguy added a commit to ManageIQ/manageiq-providers-openshift that referenced this issue Mar 19, 2021
Fryguy added a commit to ManageIQ/manageiq-ui-classic that referenced this issue Mar 19, 2021
jrafanie added a commit to jrafanie/guides that referenced this issue Mar 19, 2021
Fryguy added a commit to ManageIQ/guides that referenced this issue Mar 19, 2021
@Fryguy
Copy link
Member

Fryguy commented Mar 19, 2021

Done 🎉

@Fryguy Fryguy closed this as completed Mar 19, 2021
agrare added a commit to agrare/manageiq-providers-dummy_provider that referenced this issue Mar 22, 2021
Fryguy added a commit to ManageIQ/manageiq-providers-dummy_provider that referenced this issue Mar 22, 2021
NickLaMuro pushed a commit to NickLaMuro/manageiq-smartstate that referenced this issue Aug 9, 2021
Fixes various warnings of this variety:
app/models/file_depot_ftp.rb:128: warning: URI.escape is obsolete
app/models/mixins/file_depot_mixin.rb:42: warning: URI.escape is obsolete

From: ManageIQ/manageiq#21036

Related: ManageIQ/manageiq#19678


(transferred from ManageIQ/manageiq-gems-pending@3bddaa4)
NickLaMuro pushed a commit to NickLaMuro/manageiq-smartstate that referenced this issue Aug 10, 2021
Fixes various warnings of this variety:
app/models/file_depot_ftp.rb:128: warning: URI.escape is obsolete
app/models/mixins/file_depot_mixin.rb:42: warning: URI.escape is obsolete

From: ManageIQ/manageiq#21036

Related: ManageIQ/manageiq#19678


(transferred from ManageIQ/manageiq-gems-pending@3bddaa4)
NickLaMuro pushed a commit to NickLaMuro/manageiq-smartstate that referenced this issue Aug 10, 2021
Fixes various warnings of this variety:
app/models/file_depot_ftp.rb:128: warning: URI.escape is obsolete
app/models/mixins/file_depot_mixin.rb:42: warning: URI.escape is obsolete

From: ManageIQ/manageiq#21036

Related: ManageIQ/manageiq#19678


(transferred from ManageIQ/manageiq-gems-pending@3bddaa4)
NickLaMuro pushed a commit to NickLaMuro/manageiq-smartstate that referenced this issue Aug 10, 2021
Fixes various warnings of this variety:
app/models/file_depot_ftp.rb:128: warning: URI.escape is obsolete
app/models/mixins/file_depot_mixin.rb:42: warning: URI.escape is obsolete

From: ManageIQ/manageiq#21036

Related: ManageIQ/manageiq#19678


(transferred from ManageIQ/manageiq-gems-pending@3bddaa4)
Fryguy added a commit to ManageIQ/manageiq-pods that referenced this issue Sep 9, 2021
Test with ruby 2.6.6 and 2.7.2 per ManageIQ/manageiq#19678

(cherry picked from commit 3d7ed92)
agrare pushed a commit to agrare/manageiq-providers-oracle_cloud that referenced this issue Sep 13, 2021
Fryguy pushed a commit to ManageIQ/manageiq-providers-oracle_cloud that referenced this issue Sep 13, 2021
Test with ruby 2.6.6 and 2.7.2 per ManageIQ/manageiq#19678

(cherry picked from commit bd9b76a)
@miq-bot
Copy link
Member

miq-bot commented Oct 21, 2021

This issue has been mentioned on ManageIQ Forum. There might be relevant details there:

https://talk.manageiq.org/t/moving-to-ruby-2-7-on-master/5551/2

@chessbyte chessbyte mentioned this issue Nov 2, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
  
Lasker
Development

No branches or pull requests

10 participants