-
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
[WIP] Cleanup filesystem setup code #11091
Conversation
1ca74b3
to
75bb96a
Compare
75bb96a
to
256d87e
Compare
cc myself |
256d87e
to
0c808c8
Compare
b0f00c1
to
0c0c255
Compare
I was hoping that at some point we could reach a level where setting up the FS isn't something global/static (which here is still the case even when stored in \OC::$server). Ideally it should be possible to call setupFS() and get an instance of filesystem for that user, making it possible to have FS instances from multiple users (for example for sharing). Will this change somehow bring us closer to that ? |
Some state needs to be global in some way, having multiple instances of storage objects for the "same" storage will lead to problems. The user specific state should be removed yet, ideally any filesystem calls will be independent of the logged in user. I'll see if some changes can be made to this PR in that direction |
How about having a "pool" of storage instances, then ? 😄 I'm not expecting you to add changes just yet, just see whether this PR is somehow compatible with that vision 😄 |
I know, just making sure this PR doesn't add anything that will make this more difficult in the future |
f8f3889
to
79843c8
Compare
@icewind1991 is this ready to review or WIP? |
There are a few failing test cases that need to be resolved but other than that it's ready for review |
c6a85dd
to
b3265aa
Compare
More a refactor than a simply cleanup 😉 |
} | ||
|
||
/** | ||
* Mount the storages for a user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it clearer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Returns a folder with the point of view of the given user, with all mount points applied"
|
||
namespace OC\Files; | ||
|
||
class FileInfoManager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double check whether it's still needed ?
$this->registerService('FilesystemFactory', function (Server $c) { | ||
\OC_App::loadApps(array('filesystem')); | ||
$config = $c->getConfig(); | ||
if ($config->getSystemValue('objectstore', false)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved into a separate factory so you can test it, much like https://github.com/owncloud/news/blob/master/db/mapperfactory.php
b3265aa
to
7eefd65
Compare
7eefd65
to
3187cfe
Compare
@icewind1991 any update ? Is that the one you are splitting in smaller pieces ? |
Needs rebasing. Didn't you split this up already partly ? |
Some of it went in the various other filesystem related PR over the year, but most of it still needs to be done |
This PR is over an year old and touches a lot of files that have changed meanwhile. Can this be splitted up in smaller parts to make it easier to review or what is the state of this? |
Yes, would be better to close this and make new PR(s) when we decide to work on it further Trying to rebase/update this PR would probably be more work then redoing it |
\OC\Files\Factory
\OC\Files\Filesystem
cc @DeepDiver1975 @PVince81 @th3fallen