Skip to content

Setting to disable external storage subsystem in core - #27196

Merged
PVince81 merged 5 commits into
masterfrom
filesexternal-disableflag
Mar 6, 2017
Merged

PVince81 merged 5 commits into
masterfrom
filesexternal-disableflag

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

Description

Because files_external is now always enabled and the external storage
subsystem is in core, a setting makes it possible to disable it to save
some performance and remove related UI elements for regular users.

Related Issue

Fixes #27195

Motivation and Context

Some admins might still want to disable external storage.
Or at least they want the "External storage" section in the user's files navigation to disappear.

How Has This Been Tested?

  • TEST: external storage subsystem (checkbox) disabled by default
  • TEST: migration: enable/disable files_external before upgrading, see that the checkbox matches previous state
  • TEST: disable ext storage will unmount all storages, reenabling brings them back

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@jvillafanez @DeepDiver1975 @davitol @pmaier1

@PVince81 PVince81 added this to the 10.0 milestone Feb 21, 2017
@mention-bot

Copy link
Copy Markdown

@PVince81, thanks for your PR! By analyzing the history of the files in this pull request, we identified @DeepDiver1975, @bartv2, @tanghus and @Xenopathic to be potential reviewers.

@davitol

davitol commented Feb 21, 2017

Copy link
Copy Markdown
Contributor

Tested and works 👍

@PVince81
PVince81 force-pushed the filesexternal-disableflag branch from 6fe62aa to 2ac6488 Compare February 23, 2017 16:12
@PVince81

Copy link
Copy Markdown
Contributor Author

Fixed tests. Basically now that the default is off again, the tests for the navigation entries of the files app must be adjusted to not include files_external.

@jvillafanez I'd appreciate a quick code review.

@PVince81

Copy link
Copy Markdown
Contributor Author

ceph fell on its face... I'll rebase this

@PVince81
PVince81 force-pushed the filesexternal-disableflag branch from 2ac6488 to 4b3fe82 Compare February 24, 2017 09:28
@jvillafanez

Copy link
Copy Markdown
Member

code make sense 👍

@davitol

davitol commented Feb 24, 2017

Copy link
Copy Markdown
Contributor

retesting...

@PVince81

Copy link
Copy Markdown
Contributor Author

@davitol no need to retest, I only fixed a unit test

@PVince81

Copy link
Copy Markdown
Contributor Author

@davitol there was a bug on the personal page, fixed now.

There are several cases to test in ther personal ext storage page:

  • ext storage disabled completely: show message about disabled ext storage
  • ext storage enabled globally, but disabled only for users: show message about disabled ext storage
  • ext storage disabled globally, but enabled for users (these are two different internal settings): show message about disabled ext storage

@PVince81
PVince81 force-pushed the filesexternal-disableflag branch from 4b3fe82 to 3f4dc28 Compare February 27, 2017 12:15
@davitol

davitol commented Mar 1, 2017 •

Copy link
Copy Markdown
Contributor

@PVince81 @tomneedham With this PR the External storage is enabled from the settings, so maybe we should add a documentation link in this page to

admin_manual/configuration_files/external_storage_configuration_gui.html
screen shot 2017-03-01 at 13 13 43

✅ ext storage disabled completely: show message about disabled ext storage
✅ ext storage enabled globally, but disabled only for users: show message about disabled ext storage
✅ ext storage disabled globally, but enabled for users (these are two different internal settings): show message about disabled ext storage

👍

@PVince81

PVince81 commented Mar 3, 2017

Copy link
Copy Markdown
Contributor Author

Rebased for CI

@DeepDiver1975

Copy link
Copy Markdown
Contributor

@PVince81 conflict

Vincent Petry added 3 commits March 6, 2017 11:58
Because files_external is now always enabled and the external storage
subsystem is in core, a setting makes it possible to disable it to save
some performance and remove related UI elements for regular users.
@PVince81
PVince81 force-pushed the filesexternal-disableflag branch from 7541b74 to 06c9538 Compare March 6, 2017 10:58
@PVince81

PVince81 commented Mar 6, 2017

Copy link
Copy Markdown
Contributor Author

Ha, git rebase was clever enough to solve this automatically.

@DeepDiver1975

Copy link
Copy Markdown
Contributor

@PVince81

12:01:17 PhantomJS 2.1.1 (Linux 0.0.0): Executed 835 of 838 (skipped 3) SUCCESS (20.107 secs / 19.233 secs)
12:01:18 PhantomJS 2.1.1 (Linux 0.0.0) ERROR
12:01:18   TypeError: undefined is not a function (evaluating 'this.data.state()')
12:01:18   at apps/files/js/file-upload.js:157
12:01:18 PhantomJS 2.1.1 (Linux 0.0.0): Executed 835 of 838 (skipped 3) ERROR (20.233 secs / 19.233 secs)
12:01:18 PhantomJS 2.1.1 (Linux 0.0.0) ERROR
12:01:18   TypeError: undefined is not a function (evaluating 'this.data.state()')
12:01:18   at apps/files/js/file-upload.js:157
12:01:18 PhantomJS 2.1.1 (Linux 0.0.0): Executed 835 of 838 (skipped 3) ERROR (20.234 secs / 19.233 secs)
12:01:20 �[33m06 03 2017 12:01:20.039:WARN [launcher]: �[39mPhantomJS was not killed in 2000 ms, sending SIGKILL.
12:01:20 Makefile:185: recipe for target 'test-js' failed
12:01:20 make: *** [test-js] Error 1

@PVince81

PVince81 commented Mar 6, 2017

Copy link
Copy Markdown
Contributor Author

I saw this on the "Karma update" branch. It disappeared after a second run.

Seems that update got us an extra serving of bad luck 😦

@PVince81

PVince81 commented Mar 6, 2017

Copy link
Copy Markdown
Contributor Author

I've added a little trap to catch this bug next time it fails, hopefully with a proper stack trace: 8091570

@PVince81

PVince81 commented Mar 6, 2017

Copy link
Copy Markdown
Contributor Author

It slipped through 😱

It's like there is code that is using the function without even going through the OC.FileUpload constructor!

@PVince81

PVince81 commented Mar 6, 2017

Copy link
Copy Markdown
Contributor Author

Expanding the net further: 27393c0

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Expanding the net further: 27393c0

at least jenkins is happy 😉

@PVince81 PVince81 mentioned this pull request Mar 6, 2017
3 of 9 tasks
@PVince81
PVince81 merged commit b00e220 into master Mar 6, 2017
@PVince81
PVince81 deleted the filesexternal-disableflag branch March 6, 2017 17:58
@lock

lock Bot commented Aug 3, 2019

Copy link
Copy Markdown

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.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to disable external storage in admin page

5 participants