-
Notifications
You must be signed in to change notification settings - Fork 900
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 5.2 #20032
Comments
This was referenced Apr 3, 2020
jrafanie
added a commit
to jrafanie/manageiq-providers-openstack
that referenced
this issue
Apr 8, 2020
Fixes more strict rails 5.2 error: ``` ActiveRecord::AssociationNotFoundError: Association named 'parent' was not found on ManageIQ::Providers::Openstack::CloudManager::Vm; perhaps you misspelled it? # ./app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb:388:in `infer_related_vm_ems_refs_db!' # ./app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb:297:in `infer_related_ems_refs!' # ./app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb:8:in `initialize' ``` Related to ManageIQ/manageiq#20032 ``` irb(main):001:0> ManageIQ::Providers::CloudManager::Vm._reflect_on_association(:key_pairs) => #<ActiveRecord::Reflection::ThroughReflection:0x00007f9a48b414c0... irb(main):002:0> ManageIQ::Providers::CloudManager::Vm._reflect_on_association(:network_ports) => #<ActiveRecord::Reflection::HasManyReflection:0x00007f9a3daab4d0... irb(main):003:0> ManageIQ::Providers::CloudManager::Vm._reflect_on_association(:floating_ips) => #<ActiveRecord::Reflection::HasManyReflection:0x00007f9a3dad0758... irb(main):004:0> ManageIQ::Providers::CloudManager::Vm._reflect_on_association(:orchestration_stack) => #<ActiveRecord::Reflection::BelongsToReflection:0x00007f9a3daa1408... irb(main):005:0> ManageIQ::Providers::CloudManager::Vm._reflect_on_association(:cloud_networks) => #<ActiveRecord::Reflection::ThroughReflection:0x00007f9a3dab9170... irb(main):006:0> ManageIQ::Providers::CloudManager::Vm._reflect_on_association(:cloud_tenant) => #<ActiveRecord::Reflection::BelongsToReflection:0x00007f9a469739b0... irb(main):007:0> ManageIQ::Providers::CloudManager::Vm._reflect_on_association(:parent) => nil ```
jrafanie
added a commit
to jrafanie/manageiq-providers-openstack
that referenced
this issue
Apr 8, 2020
Fixes an error seen in rails 5.2 because it's more strict about validating `includes` are associations: ``` ActiveRecord::AssociationNotFoundError: Association named 'parent' was not found on ManageIQ::Providers::Openstack::CloudManager::Vm; perhaps you misspelled it? # ./app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb:388:in `infer_related_vm_ems_refs_db!' # ./app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb:297:in `infer_related_ems_refs!' # ./app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb:8:in `initialize' ``` Related to ManageIQ/manageiq#20032 Below, you can see all of the other "included" values is an association that can be reflected on by the model, while :parent cannot. Note, this was the case with rails 5.1 and it must have silently discarded these bogus includes while 5.2 raises `ActiveRecord::AssociationNotFoundError`. ``` irb(main):001:0> vm_klass = ManageIQ::Providers::CloudManager::Vm irb(main):002:0> vm_klass._reflect_on_association(:key_pairs) irb(main):003:0> vm_klass._reflect_on_association(:network_ports) irb(main):004:0> vm_klass._reflect_on_association(:floating_ips) irb(main):005:0> vm_klass._reflect_on_association(:orchestration_stack) irb(main):006:0> vm_klass._reflect_on_association(:cloud_networks) irb(main):007:0> vm_klass._reflect_on_association(:cloud_tenant) irb(main):008:0> vm_klass._reflect_on_association(:parent) ```
This was referenced Apr 8, 2020
Merged
This was referenced Apr 24, 2020
jrafanie
pushed a commit
to jrafanie/manageiq-schema
that referenced
this issue
Apr 28, 2020
Related to ManageIQ/manageiq#20032
jrafanie
added a commit
to jrafanie/manageiq
that referenced
this issue
Apr 30, 2020
Follow up to ManageIQ#20110 Related: ManageIQ#20032
jrafanie
added a commit
to jrafanie/manageiq-api
that referenced
this issue
Apr 30, 2020
Rails 5.2 raises this error if you try to persist the child before creating the parent: `Failed to create new custom button - You cannot call create unless the parent is saved` Followup to ManageIQ#814 Needed for Rails 5.2: ManageIQ/manageiq#20032
d-m-u
added a commit
to d-m-u/manageiq-api
that referenced
this issue
Apr 30, 2020
Rails 5.2 raises this error if you try to persist the child before creating the parent: `Failed to create new custom button - You cannot call create unless the parent is saved` Followup to ManageIQ#814 Needed for Rails 5.2: ManageIQ/manageiq#20032 thanks keenan and lj
jrafanie
pushed a commit
to jrafanie/manageiq-schema
that referenced
this issue
Apr 30, 2020
Related to ManageIQ/manageiq#20032
jrafanie
pushed a commit
to jrafanie/manageiq-schema
that referenced
this issue
May 1, 2020
Related to ManageIQ/manageiq#20032
jrafanie
added a commit
to jrafanie/manageiq
that referenced
this issue
May 4, 2020
Follow up to ManageIQ#20110 Related: ManageIQ#20032
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labeled
rail5.2
if applicable andjansa/yes?
OR already in jansa branch:Not needed
We can't order by a virtual column name, right? It doesn't exist (rails 5.2)The text was updated successfully, but these errors were encountered: