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

Parse parent for most collections #251

Merged
merged 5 commits into from
May 9, 2018

Conversation

agrare
Copy link
Member

@agrare agrare commented May 3, 2018

Parsing of relationships for a number of collections

Depends on: ManageIQ/manageiq#17385

@agrare agrare force-pushed the streaming_refresh_relationships branch from d795b02 to 394b42c Compare May 3, 2018 19:30
@agrare agrare force-pushed the streaming_refresh_relationships branch from 394b42c to 99388b2 Compare May 3, 2018 19:35
@agrare
Copy link
Member Author

agrare commented May 3, 2018

@Ladas most of the time this works but for some I get errors like:

  4) ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#monitor_updates full refresh Performs a full refresh
     Failure/Error: persister.persist!
     
     ActiveRecord::RecordNotSaved:
       You cannot call create unless the parent is saved
     # /home/agrare/.gem/ruby/2.4.3/gems/activerecord-5.0.7/lib/active_record/associations/collection_association.rb:492:in `_create_record'
     # /home/agrare/.gem/ruby/2.4.3/gems/activerecord-5.0.7/lib/active_record/associations/has_many_association.rb:130:in `_create_record'
     # /home/agrare/.gem/ruby/2.4.3/gems/activerecord-5.0.7/lib/active_record/associations/collection_association.rb:178:in `create!'
     # /home/agrare/.gem/ruby/2.4.3/gems/activerecord-5.0.7/lib/active_record/associations/collection_proxy.rb:340:in `create!'
     # /home/agrare/src/manageiq/manageiq/app/models/mixins/relationship_mixin.rb:442:in `add_relationship'
     # /home/agrare/src/manageiq/manageiq/app/models/mixins/relationship_mixin.rb:454:in `init_relationship'
     # /home/agrare/src/manageiq/manageiq/app/models/mixins/relationship_mixin.rb:570:in `block in parent='
     # /home/agrare/src/manageiq/manageiq/app/models/mixins/relationship_mixin.rb:84:in `with_relationship_type'
     # /home/agrare/src/manageiq/manageiq/app/models/mixins/relationship_mixin.rb:568:in `parent='

@agrare agrare force-pushed the streaming_refresh_relationships branch 2 times, most recently from df11fa2 to 140fd56 Compare May 7, 2018 16:31
@agrare agrare force-pushed the streaming_refresh_relationships branch 2 times, most recently from 140fd56 to b5002fe Compare May 7, 2018 16:59
@agrare agrare force-pushed the streaming_refresh_relationships branch from b5002fe to f944b4a Compare May 7, 2018 17:06
@agrare agrare force-pushed the streaming_refresh_relationships branch from f944b4a to 0763481 Compare May 7, 2018 17:08
@agrare agrare force-pushed the streaming_refresh_relationships branch from f2d3862 to 07cfef5 Compare May 7, 2018 20:18
@miq-bot
Copy link
Member

miq-bot commented May 9, 2018

Checked commits agrare/manageiq-providers-vmware@1b4120a~...fb45c13 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
7 files checked, 1 offense detected

app/models/manageiq/providers/vmware/infra_manager/inventory/collector/property_collector.rb

Copy link
Contributor

@Ladas Ladas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 👍

@Ladas Ladas merged commit 91ac508 into ManageIQ:master May 9, 2018
@Ladas Ladas added this to the Sprint 86 Ending May 21, 2018 milestone May 9, 2018
@agrare agrare deleted the streaming_refresh_relationships branch May 9, 2018 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants