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

Skip preview expiry when owner cannot be determined #34118

Merged
merged 1 commit into from
Jan 21, 2019

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Jan 11, 2019

Description

In some scenarios, the owner of trashed files or versions cannot be determined, instead of failing hard, just skip expiration.
This is just a mitigation as we need a proper solution for trash/version
preview expiry.

Please note that this is just a mitigation and actual issue isn't fixed yet (see below) as we need to bigger changes in the preview code to accomodate for versions, see #33188

Related Issue

Mitigation for #32346 (version expiry) and https://github.com/owncloud/enterprise/issues/3067 (trash expiry).

Motivation and Context

Mitigate the issue and avoid stopping the process or crashing whenever expiry did not work.

How Has This Been Tested?

  • manual test

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)
  • Technical debt
  • Tests

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)

In some scenarios, the owner of trashed files or versions cannot be determined, instead of failing hard, just skip expiration.
This is just a mitigation as we need a proper solution for trash/version
preview expiry.
@codecov
Copy link

codecov bot commented Jan 11, 2019

Codecov Report

Merging #34118 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #34118      +/-   ##
============================================
- Coverage     64.76%   64.76%   -0.01%     
- Complexity    18345    18347       +2     
============================================
  Files          1198     1198              
  Lines         69450    69454       +4     
  Branches       1281     1281              
============================================
  Hits          44982    44982              
- Misses        24095    24099       +4     
  Partials        373      373
Flag Coverage Δ Complexity Δ
#javascript 53.09% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.11% <0%> (-0.01%) 18347 <0> (+2)
Impacted Files Coverage Δ Complexity Δ
lib/private/Preview.php 78.73% <0%> (-0.67%) 170 <0> (+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 1f7264a...3921212. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jan 11, 2019

Codecov Report

Merging #34118 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #34118      +/-   ##
============================================
- Coverage     64.76%   64.76%   -0.01%     
- Complexity    18345    18347       +2     
============================================
  Files          1198     1198              
  Lines         69450    69454       +4     
  Branches       1281     1281              
============================================
  Hits          44982    44982              
- Misses        24095    24099       +4     
  Partials        373      373
Flag Coverage Δ Complexity Δ
#javascript 53.09% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.11% <0%> (-0.01%) 18347 <0> (+2)
Impacted Files Coverage Δ Complexity Δ
lib/private/Preview.php 78.73% <0%> (-0.67%) 170 <0> (+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 1f7264a...3921212. Read the comment docs.

@tomneedham
Copy link
Member

Nice - pretty sure I've seen logs on my own instance because of this.

@PVince81
Copy link
Contributor Author

yes, also had some on my own instance...

I still need to manually test this to confirm it does work.

@PVince81 PVince81 requested a review from VicDeo January 21, 2019 14:19
@PVince81
Copy link
Contributor Author

Tested manually with the steps from and breakpoints: #32346 (comment)

The skipping code is run and version previews are still on-disk, as expected.

Copy link
Member

@VicDeo VicDeo left a comment

Choose a reason for hiding this comment

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

Looks good

@PVince81
Copy link
Contributor Author

Test steps here: #32346 (comment)

Before the fix you'll see an exception in the log.
After the fix the exception is gone.

Since this is a mitigation the version previews will still be present on disk and won't be deleted until we have a proper fix.

@davitol davitol mentioned this pull request Jan 30, 2019
39 tasks
@lock lock bot locked as resolved and limited conversation to collaborators Jan 30, 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.

None yet

4 participants