-
Notifications
You must be signed in to change notification settings - Fork 897
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
Graph refresh use advanced references #16659
Graph refresh use advanced references #16659
Conversation
909eb2b
to
3d31e05
Compare
b617110
to
3d31e05
Compare
bf41528
to
7faf9c9
Compare
@agrare we will need to merge ManageIQ/manageiq-providers-ansible_tower#47 before this, there seems to be a cyclical dependency |
This pull request is not mergeable. Please rebase and repush. |
7faf9c9
to
4a4a75c
Compare
Move references out of InventoryCollection to ReferencesStorage
All finders are using references now
Pass index name and use references
Add IC reference class, which serves for all referencing but also to track additional info about the reference. This info will help us to construct complex queries.
Add Storage for references, separating it from IC
Use references in LocalDb index
Use add_reference in scanner
Use reference in InventoryObject
Use reference in InventoryObjectLazy
Use reference builder in savers
Changed reference builder interface
Move spec parsed data to common helpers
Add detailed asserts for all finders
Add advanced specs for finders
Rename index_data to full_reference
Fix exceptions to better format
Add vm_and_template_labels to base defaults
Fix specs to use new references
Autofix rubocop issues
Fix rubocop issue about useless protected and private methods
return if manager_uuid.nil? | ||
|
||
manager_uuid = stringify_index_value(manager_uuid, ref) | ||
# TODO(lsmola) this method shoul return lazy too, the rest of the finders should be deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shoul/should
Good looking tests, just the one typo and looks good to me |
Fix TODO typo
4a4a75c
to
88019a6
Compare
Checked commits Ladas/manageiq@36ee4ef~...88019a6 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0 app/models/manager_refresh/inventory_collection_default/cloud_manager.rb
spec/models/manager_refresh/persister/finders_spec.rb
spec/models/manager_refresh/save_inventory/acyclic_graph_of_inventory_collections_spec.rb
|
Depends on:
Using advanced references for finders
will help us to build db based queries automatically (so we do not have to pass custom_db... parameters)
And keeping the references around will help with automatic building of targeted_arel queries.
Also it will help us to do skeletal precreate of nested model (e.g. to link to network, we need to first skeletaly precreate the hardware and vm)