-
Notifications
You must be signed in to change notification settings - Fork 898
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
Pluggable Providers TODO #14840
Comments
@durandom - @juliancheal and I extracted a bunch of providers recently (Ansible Tower, Google, Foreman, Microsoft SCVMM). Please update ch |
@durandom et. al. I think something that should also be considered and added to the list is the workers, and having the definitions of those living in the providers themselves versus being part of a list in This would be a bit tricky to implement, and definitely something I am still pondering on myself. This might also be related to the "base MIQ models" effort that @jrafanie and others are looking into, and would affect how we define plugins as well. |
I feel like providers should be able to register and enable themselves (as two steps), what models/worker classes/etc. they provide, and insert rails boot hooks if they're an engine. It's still important for them to not load all the things since we can't sustain all of our provider code and libraries being loaded in the same process. The rails engine code must not load all the things. It should only do minimal work and delay loading any gem code until it's actually used. |
.subclasses/descendants can get us all of the leaf workers, and so we can probably change ClassNames to do something like MiqEmsRefreshWorker.subclasses +
MiqEmsMetricsCollectorWorker.subclasses +
... |
@Fryguy That works if you want to load the world first before loading Doing what you suggests means we need to load the world to determine if this is a valid worker type. |
The monitor has to monitor everything, so not sure why it loading the world is an issue. I would argue that if we extract worker management from MiqServer into a standalone object, then only the evmserver should be loading that class, and then accessing MiqServer won't load the world via the worker management. |
That doesn't mean it has to load everything to monitor it (make sure it is running, make sure it hasn't stalled, etc.). It needs to know about what it is at most, not what it is doing and why it is doing it. We are just re-organizing the monolith if our expectation is that it is just going to continue to load everything. |
@miq-bot assign juliancheal |
We also probably want custom Loggers to live in their own repo, which might be necessary in certain cases (see #17228 ) |
Pluggable configuration validators should be allowed since we are allowing plugins to bring their own settings. (see #17168 (comment) ) |
This issue has been automatically marked as stale because it has not been updated for at least 6 months. If you can still reproduce this issue on the current release or on Thank you for all your contributions! |
@juliancheal is this still a valid issue. If not can you close. |
Closing issue. If you feel the issue needs to remain open, please let me know and it will be reopened. |
#16162 should be a good first pass on getting hard-coded model names from providers out of core/ui |
@agrare / @juliancheal So I gave this a bit more thought since last week, and here are a few items I think could be added to this list:
The first two are items related to the database backup work I did last summer, and specifically with the mounting code, there are pieces for the The "core gem" idea is something @Fryguy had two summers ago, but I think that will help decouple things better. Whether it is "one gem", or a few (such as The last one might require the core gem as a per-requisite (or a Obviously dependencies like the https://guides.rubyonrails.org/v5.2/active_record_migrations.html#migration-overview And have classes with a version in them. That way developers can write to a model spec in core, and we can deprecate/remove those versions after a few newer versions have been released. Anyway, sorry for the 📖, but I can possibly try experimenting with the last two and comment on my findings in @juliancheal 's #16162 PR. |
As a lot of progress has already been made and we are starting another round of pluggability, I am going to close this issue and start a new one that represents the current state of pluggability a little better, please move any further discussion to #19440 |
This is a list of all open and accomplished tasks to split out providers from the main ManageIQ core repo.
please add things you know of as comments and I'll update the list
Extract all providers
Config / Settings
Seeding
Pluggability
Couplings
Specs
spec_helper
from core in the providersUI
to be discussed / concretized
cc @Fryguy @blomquisg @bdunne @gmcculloug @gtanzillo @chessbyte
@miq-bot add_label pluggable providers
The text was updated successfully, but these errors were encountered: