-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Move files_external backend + config logic to core #18160
Comments
I hate it to move more stuff into the core and make everything less modular. But this might be a case where is actually make sense. |
I see no other possibility if we want to support external storage implementations to live isolated on their own apps. |
To be clear: no external storage should be moved to core |
In addition, the configuration UI might want to stay in files_external? So only the backend stuff will go to core |
@Xenopathic which means that if a mount.json exists it would be read but there would be no UI to configure it then ? |
@PVince81 Yes, in that circumstance that is what would happen. But in the majority of cases, mount.json would not get created, since the UI would not be present. It was an idea mentioned by @DeepDiver1975 some time ago... |
We might also want to add some public APIs to make it possible for apps to retrieve the list of external storage backends and also instantiate then. See pbek/nextbackup#3 (comment) |
I'm setting this to 9.1 to look into that. There are some code paths in core that currently check if the app is enabled which is not nice, and bugs like #21784 |
@Xenopathic do you have time for some fun refactoring ? 😄 |
Hmmm, now I see that some apps might be using the |
CC @jvillafanez in case you want to give some input for the general idea of moving files_external service/backend/config classes to core. Seems we'll also have to decide which are public and which are private. So far my idea is to have a new namespace |
PR here #25422 (WIP) |
Ideally, the files_external app should be part of the files app, and this one should be isolated. However, taking into account the amount of responsabilities absorbed by core regarding the files app, it make sense that some of the responsabilities from the files_external app are also absorbed. What should we move to core? Being very general: all the interfaces, but none of the implementations.
There are other things to consider:
|
@jvillafanez I'd say for now the goal is only to move all the code that is not storage-specific from files_external to core. And only leave the storage backend implementations in "files_external", which might also be moved to separate apps in the future. As for the "GlobalStorageServices" and "UserGlobalStorageService" these implementations should also be in code, considering that they are exposed through the server container already. This might also imply moving the CLI commands from files_external to core as well to manage configurations. The end result will be that "files_external" really becomes "here's a bunch of storage backends you might want to use" but is optional, and the external storage stuff and its config can then work as part of core. |
@PVince81 I completely agree, but I think it's a good time to look ahead and make plans for what's to come.
Yep. That part isn't storage-specific and as such, it should be in core. Those services (and the UserStorageService) access to already-configured mount points, and that responsability should fall under core. We need to make sure that, even though the backends could provide custom configuration elements (a combobox, for example) that aren't defined in core, those elements are also acknowledged by core and can be configured using the "standard" CLI commands to configure the external storages. I think this is an important point: the core can provide standard components in order to use them easily, but it should be able to acknowledge other custom components and interact with them |
I think custom controls already work. When declaring a storage backend, you can specify a custom JS file that will manipulate the UI elements to replace some fields with custom elements (ex: date picker). The CLI works in a generic manner so it would accept arbitrary values and should already work with custom fields. |
The backend and API stuff was already moved to core, so for all storages that use the core API the files_external app does not need to be enabled for the storages to work. However the UI and OCC commands still needs to be ported to core for this to be more complete. |
Will move the web UI and OCC commands later |
There isn't enough time left to move GUI and OCC commands for now. This until we can finish these follow up tasks:
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
@DeepDiver1975 @Xenopathic @karlitschek @jmaciasportela
Currently external apps that provide storage backends would require files_external to be enabled too.
Goal is to move that part to core so that the files_external app disappears completely.
The other backends currently provided by files_external should be moved to one or several separate repos eventually.
The text was updated successfully, but these errors were encountered: