Problem/Motivation
Currently we have first class provider citizens being in the core module and second class providers being contributed, that in some cases are more advanced, leads to a disperity in what people knows to be available.
Instead we should just let recipes solve the problems with wanting to pack a specific provider to a specific functionality or let the end user decide what kind of AI that want to solve a specific issue.
We also have the problem that there are operation types that doesn't have a core module that supports them, which might be confusing - if you instead install specific providers for specific solutions it gets easier to understand.
Steps to reproduce
Proposed resolution
1. Move the providers to contributed modules.
2. Pull them in temporarily using composer.json
3. Make the modules empty, deprecated and let them have an update hook that updates the settings, installs the new module, uninstalls itself and clears cache.
We shouldn't currently have any configuration dependencies on the actual module and since the plugin name will be the same this should work.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | requirements-errors.png | 36.14 KB | scott_euser |
Issue fork ai-3483356
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
scott_euser commentedThis works, but:
So sort of needs work/needs review dual state.
The files to look at to review:
I put detailed comments in both of those there.
The deletions add noise to the MR, but are needed for tests to pass since composer dependency gets removed (in example of pinecone so far).
Temporary alternative:
One alternative has been suggested of setting all submodule new external module versions as composer dependencies. That kicks the can down the road as it doesn't force the switchover, so still update hook is needed so AI core module can enforce stopping usage of the old modules and let us safely delete them from here.
It also means that sites then get a lot more top-level modules temporarily. Same amount of code as is of course, but some users may be unhappy with that.
So I think we should aim to try to get it working well with a full removal.
What I tried
I tried a couple runs at this with pinecone to test:
Side note: I checked with Marcus in slack first before working on branch, to check he hadn't started since its assigned to him.
Comment #5
scott_euser commentedNot 100% sure if we need to leave placeholder info yml files in place for a bit...
e.g.
Comment #6
scott_euser commentedAdded back in info.yml
Yep, its not possible to run e.g. `drush cr` without it because of the module name change. I think this must be why Drupal Core forces you update to the latest within Major version. I added back in the info.yml file.
Updates from AI alpha 8 to further jump when deprecated modules completely removed
There is still a risk regardless of scenario that a user is on e.g. alpha8 or earlier, and doesn't update e.g. for a few modules to some point when we have removed the deprecated submodules though. In that case, we could either decide:
(2) is probably the proper way and matches Core movement of modules from Core to contrib I think, but not a hill I'll die over...
Hook requirements additional helper
I additionally added this morning hook_requirements as well, which happens even earlier than updb. Still the user can skip this, so I left that particular scenario in the updb hook.
Comment #8
marcus_johansson commentedComment #10
kristen polWe are doing some issue management housekeeping and adding/removing components.
The "Providers" component will be removed because providers have been moved into their own projects, so this issue is being moved to "AI Core module".
See #3533272: Update AI module project components for more details.