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

Graph refresh enhance local db finders #16741

Merged
merged 17 commits into from
Feb 5, 2018

Conversation

Ladas
Copy link
Contributor

@Ladas Ladas commented Jan 4, 2018

Depends on:

By enhancing local db find index, we can get rid of options :custom_manager_uuid and custom_db_finder since we can infer these automatically now. Doing this we also bring support of local db indexes for secondary indexes.

@Ladas
Copy link
Contributor Author

Ladas commented Jan 4, 2018

@miq-bot assign @agrare
@miq-bot add_label enhancement

@miq-bot
Copy link
Member

miq-bot commented Jan 26, 2018

This pull request is not mergeable. Please rebase and repush.

@Ladas Ladas force-pushed the graph_refresh_enhance_local_db_finders branch from b708f2b to 0f09200 Compare February 1, 2018 14:24
Ladas added 16 commits February 1, 2018 16:28
Move extract references that will be refactored later and
remove the validate, since there is not need for it now.
Automatically build local db queries using the full reference.
From the full reference, we can infer the schema of joins needed
for the db based indexes and the paths needed to build index.
So we can get rid of manually defining those queries, which would
grow much larger by introducing secondary indexes.
Add [] getter and move stringify_reference to public
Add [] getter
Remove custom_db_finder and custom_manager_uuid, since we can
build those automatically now.
Move mocked data to shared module
Add specs for local finder complex queries
Remove custom_manager_uuid and custom_db_finder from all places,
since we can infer these automatically.
Add specs for confusing 1st arg mixing with kwargs, todos are
placed for designing the interface better
Assert index attributes exist
Test that we allow only valid model attributes for indexes
Test local DB finders for secondary indexes
Ingnore index attributes asserts for custom saving, since custom
saving would be too limited by this. It's not unusualt to pass
non existent columns that are transferred in custom saving code.
Autofix rubocop issues
Test also a relation with redefined foreign_key, the finder
query must build correctly.
Abstract table name
@Ladas Ladas force-pushed the graph_refresh_enhance_local_db_finders branch from 0f09200 to 02ec5d7 Compare February 1, 2018 15:28
Use each_key since it's faster
@miq-bot
Copy link
Member

miq-bot commented Feb 1, 2018

Checked commits Ladas/manageiq@1808a17~...47dfe45 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0
16 files checked, 28 offenses detected

spec/models/manager_refresh/helpers/spec_mocked_data.rb

spec/models/manager_refresh/persister/finders_spec.rb

spec/models/manager_refresh/persister/local_db_finders_spec.rb

@agrare agrare merged commit 8be29c6 into ManageIQ:master Feb 5, 2018
@agrare agrare added this to the Sprint 79 Ending Feb 12, 2018 milestone Feb 5, 2018
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