[WIP] Don't `belongs_to :parent_manager` in base manager classes
The base NetworkManager / StorageManager class shouldn't belong to a parent_manager as this makes it significantly more difficult to have standalone managers of those types.
Is it possible to remove the delegation to parent managers in general? Whether they are virtual delegates, regular delegates, or belongs_to, they all make things so inefficient and convoluted.
app/models/mixins/belongs_to_parent_manager_mixin.rb
- [ ] :exclamation: - Line 5, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption.
app/models/mixins/child_network_manager_mixin.rb
- [ ] :exclamation: - Line 10, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 11, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 12, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 13, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 14, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 15, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 16, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 17, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 18, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 19, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 20, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 21, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 22, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 23, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 24, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 25, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 26, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption. - [ ] :exclamation: - Line 9, Col 5 - Rails/InverseOf - Specify an
:inverse_ofoption.
Is it possible to remove the delegation to parent managers in general?
As long as we have a "parent" cloud_manager which holds the credentials and one-to-many "child" managers we'll at least need to delegate all of the connection methods to the parent manager (or duplicate the creds across the child managers and keep in sync which seems worse).
When dealing with screens, it is tricky to have a relationship that is defined in a subclass.
I misspoke. Delegating connection and keeping credentials works great. It is the delegations that are used to search, order, or display something on the screen that would be nice to avoid.
best scenario is for all classes to act the same for all parents and children. E.g.: all of them have zone_id, or the same relationship defined.
If we have screens that only target infra, then putting infra only associations there is good too. But we run into problems when we search on the parent providers and those overwritten attributes/relationships are used.
These one off managers that have a special way to determine information that is a different way from others will cause the screens to behave in peculiar ways. And happen to not perform as well.
thanks for all the help getting rid of these delegates and duplicating values from parent managers to child managers.
This pull request has been automatically closed because it has not been updated for at least 3 months.
Feel free to reopen this pull request if these changes are still valid.
Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.
@agrare I think merged the PRs that made sure the zones/ems and others are propagated from parent to child managers.
So have we already solved this PR? Or have we done all the work and just need to merge this? Or is there probably stuff outstanding and we have higher priorities?