Skip to content
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

Filter unavailable users and remove unavailable shares on polling #35010

Merged
merged 2 commits into from
Apr 22, 2019

Conversation

VicDeo
Copy link
Member

@VicDeo VicDeo commented Apr 12, 2019

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:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@VicDeo VicDeo added this to the development milestone Apr 12, 2019
@VicDeo VicDeo self-assigned this Apr 12, 2019
@codecov
Copy link

codecov bot commented Apr 12, 2019

Codecov Report

Merging #35010 into master will increase coverage by <.01%.
The diff coverage is 79.31%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #35010      +/-   ##
============================================
+ Coverage     65.37%   65.37%   +<.01%     
- Complexity    18622    18626       +4     
============================================
  Files          1215     1215              
  Lines         70510    70532      +22     
  Branches       1295     1295              
============================================
+ Hits          46095    46111      +16     
- Misses        24041    24047       +6     
  Partials        374      374
Flag Coverage Δ Complexity Δ
#javascript 52.85% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.82% <79.31%> (ø) 18626 <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 76.54% <40%> (-1.31%) 32 <1> (+2)
apps/files_sharing/js/PublicUploadView.js 67.39% <0%> (ø) 0% <0%> (ø) ⬇️

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 ec033b2...103313a. Read the comment docs.

@PVince81 PVince81 modified the milestones: development, QA Apr 12, 2019
@VicDeo VicDeo force-pushed the improve-polling branch 2 times, most recently from 3519d5c to bc8902f Compare April 17, 2019 20:04
@VicDeo VicDeo changed the title Filter unavailable users on polling Filter unavailable users and remove unavailable shares on polling Apr 17, 2019
Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

@PVince81 PVince81 merged commit bd98610 into master Apr 22, 2019
@PVince81 PVince81 deleted the improve-polling branch April 22, 2019 16:14
@PVince81
Copy link
Contributor

@VicDeo please backport to release-10.2.0 branch

@VicDeo
Copy link
Member Author

VicDeo commented Apr 22, 2019

release-10.2.0: #35073

@phil-davis
Copy link
Contributor

This was backported into release-10.2.0 which was then merged into stable10 - so it is part of stable10 release series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants