-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Handle invalid ext storage backend to keep mount point visible #26539
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
Conversation
|
@PVince81, thanks for your PR! By analyzing the history of the files in this pull request, we identified @icewind1991, @Xenopathic and @butonic to be potential reviewers. |
|
Rebased |
c17101d to
267263b
Compare
267263b to
0ea7b46
Compare
0ea7b46 to
d055015
Compare
d055015 to
f4ed76a
Compare
|
Bringing to "development" as discussed with @pmaier1. This will ease the migration to external storage apps. It will preserve the mount points and configs present but not editable (not editable for technical reasons), so that when the user installs the external storage app the mounts will work again. |
|
Rebased. I have tested this with the app "files_external_gdrive":
Before the fix: web UI would crash with some errors about missing storage classes @jvillafanez please review |
f4ed76a to
52fe70b
Compare
|
rebased, fixed tests |
16803d2 to
88b847f
Compare
|
I've retested all cases from the first ticket.
|
|
I decided to only display a warning when listing configs on the CLI. The warning tells about how many invalid storages there are and that the admin must enable apps, else the config is incomplete. |
|
@jvillafanez second review ? |
88b847f to
925885b
Compare
|
Squashed a few unit test additions to increase coverage. |
Codecov Report
@@ Coverage Diff @@
## master #26539 +/- ##
============================================
+ Coverage 61.63% 61.65% +0.02%
- Complexity 17477 17482 +5
============================================
Files 1044 1047 +3
Lines 57691 57706 +15
============================================
+ Hits 35555 35577 +22
+ Misses 22136 22129 -7
Continue to review full report at Codecov.
|
925885b to
8230e45
Compare
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.
I'd rather use 2 different messages or use a different message such as "number of invalid storages: $countInvalid"
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.
I think the following style is the most used, so we should keep it for consistency. The same for the InvalidBackend
$this->setIdentifier($invalidId)
->setScheme(self::SCHEME_NULL)
->setText('Unknown auth mechanism backend ' . $invalidId);
8230e45 to
edeaf6a
Compare
5b31f3b to
104434e
Compare
|
@jvillafanez adjusted styles and fixed the failiing test |
|
bah, of course I should have adjusted the tested message: |
Keep mount point visible and also ext storage config visible when dealing with configs relating to storage backends or auth mechanisms that were provided by an app that is currently disabled.
104434e to
cdda2f0
Compare
|
Fixed last test. Also, I checked the codecov https://codecov.io/gh/owncloud/core/pull/26539/diff and all is green 😄 |
|
stable10: #29562 |
|
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. |



Description
Keep mount point visible and also ext storage config visible when
dealing with configs relating to storage backends or auth mechanisms
that were provided by an app that is currently disabled.
Introduces InvalidBackend and InvalidAuth placeholders to be able to properly pass around the StorageConfig. This makes it possible to keep the mount point visible but have it be a
FailedStoragethat gracefully throwsStorageNotAvailableExceptionwhich results in 503 Storage not available for clients.Related Issue
Fixes #26538
Motivation and Context
See original ticket.
Basically an admin might forget to reenable storage apps for which there are existing configs.
The current code would remove the mount point completely which would cause sync clients to delete local files.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
@owncloud/filesystem @butonic