Skip to content

Re-enable apps that got automatically disabled while updating - #8380

Merged
MorrisJobke merged 1 commit into
masterfrom
bugfix/noid/reenable-disabled-apps
Jul 25, 2018
Merged

Re-enable apps that got automatically disabled while updating#8380
MorrisJobke merged 1 commit into
masterfrom
bugfix/noid/reenable-disabled-apps

Conversation

@nickvergessen

Copy link
Copy Markdown
Member

This seems like a quite simple approach to work against #8293
But maybe I'm overseeing something.

Also I noticed, that automatic disable is already running the uninstall repairsteps. I once had the idea to use the uninstall step to clean up the database of my apps.
But that basically means when the announcement app e.g. gets automatically disabled all announcements and comments would be gone.

Not sure if that sounds intended.

@MorrisJobke

Copy link
Copy Markdown
Member

But that basically means when the announcement app e.g. gets automatically disabled all announcements and comments would be gone.

We should make this a separate step - see #5539

Also the app management should be unified, because now it is distributed across OC_App, IAppManager and Installer - see #5833 and #4453

if (!\OC::$server->getAppManager()->isShipped($app)) {
// Only disable apps which are not shipped
self::disable($app);
self::$autoDisabledApps[] = $app;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get this :/

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well this is for the update case, which disabled e.g. the files_accesscontrol app.

Steps are:

  1. Upload the new code of the server
  2. Open Nextcloud (shows the updater)
  3. Start the update (loads all apps, and disables files_accesscontrol, because the storagewrapper is not matching the method signature anymore (was changed between 12 and 13))
  4. Updater looks for updates of enabled apps (and skips files_accesscontrol, because it is not enabled)

With this patch, in step 4 it also checks for updates of apps which were disabled while calling the updater.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... it is accessed from the outside via \OC_App::$autoDisabledApps 🙈

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, if we agree on the logic, we can wrap this in beautiful methods and public interfaces 💃

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it 👍

Signed-off-by: Joas Schilling <coding@schilljs.com>
@skjnldsv
skjnldsvforce-pushed the bugfix/noid/reenable-disabled-apps branch from 00835f8 to 4b49f81CompareJune 26, 2018 07:17
@nextcloud-botnextcloud-bot removed the stale Ticket or PR with no recent activity label Jun 26, 2018
@codecov

codecovBot commented Jun 26, 2018

Copy link
Copy Markdown

Codecov Report

Merging #8380 into master will increase coverage by 20.26%.
The diff coverage is 0%.

@@ Coverage Diff @@## master #8380 +/- ##
=============================================
+ Coverage 31.7% 51.97% +20.26% - Complexity 26017 26018 +1 
=============================================
Files 1660 1660 Lines 96167 96172 +5 Branches 1290 1290 =============================================
+ Hits 30490 49982 +19492 + Misses 65677 46190 -19487
Impacted FilesCoverage ΔComplexity Δ
lib/private/legacy/app.php62.22% <0%> (+21.91%)196 <0> (ø)⬇️
lib/private/Updater.php5.24% <0%> (-0.07%)121 <5> (+1)
lib/private/Files/Stream/Encryption.php75.22% <0%> (+0.45%)54% <0%> (ø)⬇️
apps/theming/lib/ThemingDefaults.php97.29% <0%> (+0.67%)52% <0%> (ø)⬇️
lib/private/Group/Group.php76.19% <0%> (+0.79%)62% <0%> (ø)⬇️
lib/private/Setup.php12.55% <0%> (+0.83%)52% <0%> (ø)⬇️
lib/public/AppFramework/Db/Mapper.php94.95% <0%> (+0.84%)30% <0%> (ø)⬇️
...vate/Authentication/Token/DefaultTokenProvider.php98.05% <0%> (+0.97%)32% <0%> (ø)⬇️
lib/private/Preview/Generator.php78.28% <0%> (+1.14%)53% <0%> (ø)⬇️
lib/private/App/DependencyAnalyzer.php95.62% <0%> (+1.25%)64% <0%> (ø)⬇️
... and 382 more

@skjnldsv

Copy link
Copy Markdown
Member

Rebased

@nextcloud-botnextcloud-bot added the stale Ticket or PR with no recent activity label Jul 18, 2018
@MorrisJobkeMorrisJobke mentioned this pull request Jul 24, 2018
21 tasks

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code makes sense and checks for the apps that failed hard. 👍

@MorrisJobke

Copy link
Copy Markdown
Member

@rullzer Mind to review?

@nextcloud-botnextcloud-bot removed the stale Ticket or PR with no recent activity label Jul 25, 2018
@skjnldsvskjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jul 25, 2018
@MorrisJobke
MorrisJobke merged commit 7eb7418 into masterJul 25, 2018
@MorrisJobke
MorrisJobke deleted the bugfix/noid/reenable-disabled-apps branch July 25, 2018 09:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishbugfeature: apps management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@nickvergessen@MorrisJobke@skjnldsv@nextcloud-bot