-
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 enhance local db finders #16741
Merged
agrare
merged 17 commits into
ManageIQ:master
from
Ladas:graph_refresh_enhance_local_db_finders
Feb 5, 2018
Merged
Graph refresh enhance local db finders #16741
agrare
merged 17 commits into
ManageIQ:master
from
Ladas:graph_refresh_enhance_local_db_finders
Feb 5, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ladas
force-pushed
the
graph_refresh_enhance_local_db_finders
branch
from
January 4, 2018 12:37
5adc6ea
to
b874b48
Compare
This pull request is not mergeable. Please rebase and repush. |
Ladas
force-pushed
the
graph_refresh_enhance_local_db_finders
branch
from
February 1, 2018 14:24
b708f2b
to
0f09200
Compare
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
force-pushed
the
graph_refresh_enhance_local_db_finders
branch
from
February 1, 2018 15:28
0f09200
to
02ec5d7
Compare
Use each_key since it's faster
1 task
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 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
approved these changes
Feb 5, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on:
By enhancing local db find index, we can get rid of options
:custom_manager_uuid
andcustom_db_finder
since we can infer these automatically now. Doing this we also bring support of local db indexes for secondary indexes.