Skip to content

[10.2.0] Filter unavailable users and remove unavailable shares on polling#35073

Merged
PVince81 merged 2 commits into
release-10.2.0from
release-10.2.0-improve-polling
Apr 25, 2019
Merged

[10.2.0] Filter unavailable users and remove unavailable shares on polling#35073
PVince81 merged 2 commits into
release-10.2.0from
release-10.2.0-improve-polling

Conversation

@VicDeo

@VicDeo VicDeo commented Apr 22, 2019

Copy link
Copy Markdown
Contributor

Backport of #35010

Description

Protect polling from exploding on unavailable users

Motivation and Context

An unhandled exception has been thrown: TypeError: Argument 1 passed to OCA\Files_Sharing\External\MountProvider::getMountsForUser() must implement interface OCP\IUser, null given, when UserManager knows nothing about a userId

How Has This Been Tested?

  1. Create and accept a federated share
  2. Execute update oc_share_external set user="Iwouldliketobreakthepolling" limit 1;

Expected

Polling goes through all entries with no termination

Actual

Polling terminates with TypeError: Argument 1 passed to OCA\Files_Sharing\External\MountProvider::getMountsForUser() must implement interface OCP\IUser, null given

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@PVince81

Copy link
Copy Markdown
Contributor

@individual-it can you check the error in https://drone.owncloud.com/owncloud/core/16933/903 ? it's not related but suspicious nonetheless.

@individual-it

Copy link
Copy Markdown
Member

WebDriver\Exception\JavaScriptError: ReferenceError: jQuery is not defined

I guess the problem is that we try to run some JS script from the acceptance tests before FF has loaded and run all jQuery files

@PVince81

Copy link
Copy Markdown
Contributor

restarted failed build

@individual-it

Copy link
Copy Markdown
Member

build was cancelled, probably because of some drone issue, several job run for more than 2h. restarted

@codecov

codecov Bot commented Apr 24, 2019

Copy link
Copy Markdown

Codecov Report

Merging #35073 into release-10.2.0 will increase coverage by <.01%.
The diff coverage is 79.31%.

Impacted file tree graph

@@                 Coverage Diff                  @@
##             release-10.2.0   #35073      +/-   ##
====================================================
+ Coverage             64.29%   64.29%   +<.01%     
- Complexity            20040    20044       +4     
====================================================
  Files                  1285     1285              
  Lines                 76824    76846      +22     
  Branches               1307     1307              
====================================================
+ Hits                  49394    49410      +16     
- Misses                27049    27055       +6     
  Partials                381      381
Flag Coverage Δ Complexity Δ
#javascript 53.01% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.49% <79.31%> (ø) 20044 <3> (+4) ⬆️
Impacted Files Coverage Δ Complexity Δ
...s/federatedfilesharing/lib/AppInfo/Application.php 45.89% <0%> (-0.97%) 19 <0> (ø)
...atedfilesharing/lib/Command/PollIncomingShares.php 98.52% <100%> (+0.41%) 13 <2> (+2) ⬆️
apps/files_sharing/lib/External/Manager.php 77.38% <40%> (-1.28%) 32 <1> (+2)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a80725...6af63ae. Read the comment docs.

@PVince81
PVince81 merged commit 73beb5d into release-10.2.0 Apr 25, 2019
@PVince81
PVince81 deleted the release-10.2.0-improve-polling branch April 25, 2019 09:02
@PVince81 PVince81 modified the milestones: development, QA May 2, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators May 5, 2020
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.

3 participants