Skip to content

Do not load calendar/addressbook plugins if not needed - #9268

Merged
MorrisJobke merged 6 commits into
masterfrom
bugfix/6711
May 28, 2018
Merged

Do not load calendar/addressbook plugins if not needed#9268
MorrisJobke merged 6 commits into
masterfrom
bugfix/6711

Conversation

@rullzer

Copy link
Copy Markdown
Member

Fixes#6711
Based on owncloud/core@f0fb21c

Signed-off-by: Roeland Jago Douma roeland@famdouma.nl

@MorrisJobke

MorrisJobke commented Apr 23, 2018

Copy link
Copy Markdown
Member

Does this also fix stuff like #8141? And #8827?

@georgehrke

Copy link
Copy Markdown
Member

@MorrisJobke It should be as far as i can tell.

@georgehrke

Copy link
Copy Markdown
Member

I will check when testing this pr.

@rullzer

Copy link
Copy Markdown
MemberAuthor

Yes it should

@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.

Tested, works and code makes sense 👍

@MorrisJobke

Copy link
Copy Markdown
Member

CI fails :/

@codecov

codecovBot commented Apr 23, 2018

Copy link
Copy Markdown

Codecov Report

Merging #9268 into master will decrease coverage by 22.57%.
The diff coverage is 3.07%.

@@ Coverage Diff @@## master #9268 +/- ##
=============================================
- Coverage 51.68% 29.11% -22.58% - Complexity 25691 25707 +16 
=============================================
Files 1634 1569 -65 Lines 95914 88082 -7832 Branches 1384 0 -1384 =============================================
- Hits 49571 25642 -23929 - Misses 46343 62440 +16097
Impacted FilesCoverage ΔComplexity Δ
apps/dav/composer/composer/autoload_static.php0% <ø> (ø)1 <0> (ø)⬇️
apps/dav/lib/Command/RemoveInvalidShares.php0% <0%> (ø)6 <6> (?)
apps/dav/lib/Connector/Sabre/Principal.php84.34% <0%> (-5.66%)49 <0> (+2)
apps/dav/composer/composer/autoload_classmap.php0% <0%> (ø)0 <0> (ø)⬇️
apps/dav/lib/DAV/Sharing/Backend.php0% <0%> (-86.82%)26 <5> (+2)
lib/private/Repair.php30.88% <0%> (ø)19 <0> (ø)⬇️
apps/dav/lib/Server.php0% <0%> (-44.67%)22 <3> (+5)
apps/dav/lib/CardDAV/AddressBook.php57.5% <100%> (ø)28 <0> (ø)⬇️
apps/dav/lib/CalDAV/Calendar.php67.14% <100%> (-3.58%)50 <0> (ø)
apps/user_ldap/lib/Migration/UUIDFixUser.php0% <0%> (-100%)1% <0%> (ø)
... and 452 more

@MorrisJobke

Copy link
Copy Markdown
Member

CI failure is due to a timeout :)

@rullzer

Copy link
Copy Markdown
MemberAuthor

One more review please :)

@rullzer

Copy link
Copy Markdown
MemberAuthor

Conflicts fixed and rebased.

@MorrisJobke
MorrisJobke requested a review from schiessleMay 2, 2018 07:34
@MorrisJobke

Copy link
Copy Markdown
Member

@georgehrke@blizzz@nickvergessen@ChristophWurst@skjnldsv Reviews would be nice :)

@blizzzblizzz 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.

the repair step might lose valid shares when

  1. Nextcloud is in maintenance mode
  2. AND external user backends are used

since apps are not loaded in this context.

@rullzer

Copy link
Copy Markdown
MemberAuthor

@blizzz I can drop the repair job... but then we might have invalid shares....

@blizzz

Copy link
Copy Markdown
Member

@blizzz I can drop the repair job... but then we might have invalid shares....

Or add a switch that prevents running in maintenance mode.

@rullzer

Copy link
Copy Markdown
MemberAuthor

@blizzz now they are only run if you run the expensive repair steps in case you run into it.

All our other repair steps are executed in maintenance mode so then it indeed would do 💥 in certain situations

@blizzz

Copy link
Copy Markdown
Member

All our other repair steps are executed in maintenance mode so then it indeed would do 💥 in certain situations

Then it is better run as a seperate occ command, bound to apps, as i am afraid it would do more harm than good.

@rullzer

Copy link
Copy Markdown
MemberAuthor

Nah during upgrade.

Now it is. occ maintenance:repair - - expensive

rullzer added 5 commits May 27, 2018 20:51
Fixes#6711
Based on owncloud/core@f0fb21c
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
…ied to be valid
owncloud/core@d3fb8fc
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
…ollection as well
owncloud/core@9f2e643
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
owncloud/core@edacf22
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer

Copy link
Copy Markdown
MemberAuthor

@blizzz ok one more time ;)

@blizzz

Copy link
Copy Markdown
Member

looks good now, apart from tests

People that have issues can run it manually
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
use OC\Template\JSCombiner;
use OC\Template\SCSSCacher;
use OCA\DAV\Connector\Sabre\Principal;
use OCA\DAV\Repair\RemoveInvalidShares;

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.

bildschirmfoto 2018-05-31 um 17 22 21

🙈

@MorrisJobkeMorrisJobke mentioned this pull request May 31, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugenhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@rullzer@MorrisJobke@georgehrke@blizzz