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 Rails 6.0 #19977

Closed
39 tasks done
chessbyte opened this issue Mar 18, 2020 · 6 comments
Closed
39 tasks done

Support Rails 6.0 #19977

chessbyte opened this issue Mar 18, 2020 · 6 comments
Assignees
Milestone

Comments

@chessbyte
Copy link
Member

chessbyte commented Mar 18, 2020

Cross Repo Tests: ManageIQ/manageiq-cross_repo-tests#179

Pull Requests

Current PRs

Individual PRs, or commits pulled out of the base branches that can be merged prior to upgrading to Rails 6.

TODO

Done

ManageIQ/manageiq tests to fix

ManageIQ/manageiq tests to fix:

  • expected block to not output to stderr, but output "DEPRECATION WARNING: ..."

    1) TaskHelpers::Imports::Tags#import when the source is a directory imports all .yaml files in a specified directory
      Failure/Error:
         expect do
           TaskHelpers::Imports::Tags.new.import(options)
         end.to_not output.to_stderr
    
         expected block to not output to stderr, but output "DEPRECATION WARNING: Class level methods will no longer inherit scoping from `create` in Rails 6.1. ...os/NickLaMuro/manageiq@128d078f12e7edef3f81d543e50a335300d65ed1/app/models/classification.rb:512)\n"
    
      # ./spec/lib/task_helpers/imports/tags_spec.rb:22:in `block (4 levels) in <top (required)>'
    

    (actually happens in app/models/classification.rb)

  • Invalid SQL in expectation for miq_expression_spec.rb

  • Hash keys as expected as symbols, but are strings in dialog_field_serializer_spec.rb

  • ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection:

    ( fixed by [rails6][service_template_ansible_playbook_spec.rb] Fix ems/provider lets #20787 )

    5) ServiceTemplateAnsiblePlaybook.create_catalog_item creates and returns a catalog item
    
       Failure/Error: factory_exists?(factory) ? super : class_from_symbol(factory).create!(*args)
    
       ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection:
    
         Cannot modify association 'ManageIQ::Providers::EmbeddedAnsible::Provider#endpoints' because the source reflection class 'Endpoint' is associated to 'ExtManagementSystem' via :has_many.
    
       # ./spec/support/missing_factory_helper.rb:10:in `create'
       # ./spec/models/service_template_ansible_playbook_spec.rb:11:in `block (2 levels) in <top (required)>'
       # ./spec/models/service_template_ansible_playbook_spec.rb:7:in `block (2 levels) in <top (required)>'
       # ./spec/models/service_template_ansible_playbook_spec.rb:15:in `block (2 levels) in <top (required)>'
       # ./spec/models/service_template_ansible_playbook_spec.rb:40:in `block (2 levels) in <top (required)>'
       # ./spec/models/service_template_ansible_playbook_spec.rb:47:in `block (2 levels) in <top (required)>'
       # ./spec/models/service_template_ansible_playbook_spec.rb:82:in `block (3 levels) in <top (required)>'
    
  • ActiveRecord::RecordInvalid: Validation failed: ( Fixed by [rails6][git_repository_spec.rb] Use .local_miq_server #20794 )

    14) GitRepository repo parameter check userid and password is set
    
       Failure/Error: save!
    
       ActiveRecord::RecordInvalid:
         Validation failed: 
    
       # ./app/models/git_repository.rb:34:in `block in refresh'
       # ./app/models/git_repository.rb:30:in `refresh'
       # ./spec/models/git_repository_spec.rb:91:in `block (4 levels) in <top (required)>'
    
  • ArgumentError: wrong number of arguments (given 1, expected 2)

    16) EvmApplication.encryption_key_valid? returns true when we are using the correct encryption key
       Failure/Error: context = ActiveRecord::MigrationContext.new('db/migrate')
    
       ArgumentError:
         wrong number of arguments (given 1, expected 2)
    
       # ./lib/tasks/evm_application.rb:205:in `new'
       # ./lib/tasks/evm_application.rb:205:in `deployment_status'
       # ./lib/tasks/evm_application.rb:192:in `encryption_key_valid?'
       # ./spec/lib/tasks/evm_application_spec.rb:358:in `block (3 levels) in <top (required)>'
    
@chessbyte chessbyte added this to the Kasparov milestone Mar 18, 2020
@chessbyte chessbyte removed this from the Kasparov milestone Mar 24, 2020
@himdel
Copy link
Contributor

himdel commented Mar 24, 2020

Ping me if this becomes important, this will depend on ManageIQ/manageiq-ui-classic#5679

@jrafanie
Copy link
Member

Ping me if this becomes important, this will depend on ManageIQ/manageiq-ui-classic#5679

It will be once we get past the rails 5.2 errors cc @kbrock

@chessbyte chessbyte added this to the Kasparov milestone Mar 30, 2020
@chessbyte chessbyte removed this from the Kasparov milestone Mar 31, 2020
@chessbyte chessbyte added this to the Kasparov milestone Jul 28, 2020
@NickLaMuro
Copy link
Member

I shared this privately, but I pushed a branch to "very early start on this" here:

https://github.com/NickLaMuro/manageiq/tree/rails-6

There are a bunch of related rails-6 branches in the Gemfile as well that were needed, but I basically got to the point of allowing it to bundle, but that is it (and I haven't touched it since the beginning of May).

@NickLaMuro
Copy link
Member

NickLaMuro commented Jan 5, 2021

I think the last fix we needed to allow things to work was the manageiq-messaging change above, and with that in place (prior to it being released), it passed:

The next build following it being merged (and the upgrade PR being removed, meaning it is using rubygems now):

https://travis-ci.com/github/ManageIQ/manageiq-cross_repo-tests/builds/212022840

Is starting to pass, so I expect that we are good to merge everything else in one fell swoop.

@Fryguy Fryguy added this to the Lasker milestone Jan 5, 2021
@NickLaMuro
Copy link
Member

Okay. Looks like after getting a second merge in of master into manageiq-ui-classic, tests our now passing again in manageiq-cross_repo-tests:

@Fryguy
Copy link
Member

Fryguy commented Jan 11, 2021

Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Lasker
Development

No branches or pull requests

6 participants