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

Adjust scanner flags #37960

Merged
merged 1 commit into from
Oct 9, 2020
Merged

Adjust scanner flags #37960

merged 1 commit into from
Oct 9, 2020

Conversation

jvillafanez
Copy link
Member

The scanner's update method will reuse the size if possible.
REUSE_ONLY_FOR_FILES flag will only be applicable to etag, not size
Links to #37218

Description

Fixes some problems detected with GDrive due to #37218 . There are also some changes pending in the GDrive storage regarding the handling of google document files.

Might be related to https://github.com/owncloud/enterprise/issues/4129

For the GDrive case, the folder was showing "Pending" with a size of -1 in the DB if the folder contained a google document. This should be fixed with this patch, but the etag still changes for the folder because the gdrive implementation detects a file newer with mtime newer than the folder (google doesn't update the mtime of the folder)

I haven't tested yet for https://github.com/owncloud/enterprise/issues/4129 because the step to reproduce aren't clear

Related Issue

https://github.com/owncloud/enterprise/issues/4129

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

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:
  • Changelog item, see TEMPLATE

@update-docs
Copy link

update-docs bot commented Sep 29, 2020

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@codecov
Copy link

codecov bot commented Sep 29, 2020

Codecov Report

Merging #37960 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #37960      +/-   ##
============================================
- Coverage     64.71%   64.71%   -0.01%     
+ Complexity    19444    19442       -2     
============================================
  Files          1286     1286              
  Lines         76021    76020       -1     
  Branches       1336     1336              
============================================
- Hits          49197    49196       -1     
  Misses        26430    26430              
  Partials        394      394              
Flag Coverage Δ Complexity Δ
#javascript 54.06% <ø> (ø) 0.00 <ø> (ø)
#phpunit 65.88% <100.00%> (-0.01%) 19442.00 <0.00> (-2.00)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
lib/private/Files/Cache/Scanner.php 87.01% <100.00%> (-0.07%) 116.00 <0.00> (-2.00)
lib/private/Files/Cache/Watcher.php 97.22% <100.00%> (ø) 19.00 <0.00> (ø)

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 946f53c...78fb854. Read the comment docs.

@jvillafanez jvillafanez marked this pull request as ready for review October 9, 2020 09:24
The scanner's update method will reuse the size if possible.
REUSE_ONLY_FOR_FILES flag will only be applicable to etag, not size
Links to #37218
@codecov
Copy link

codecov bot commented Oct 9, 2020

Codecov Report

Merging #37960 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #37960      +/-   ##
============================================
+ Coverage     64.70%   64.71%   +0.01%     
+ Complexity    19445    19442       -3     
============================================
  Files          1286     1286              
  Lines         76034    76020      -14     
  Branches       1336     1336              
============================================
  Hits          49196    49196              
+ Misses        26444    26430      -14     
  Partials        394      394              
Flag Coverage Δ Complexity Δ
#javascript 54.06% <ø> (ø) 0.00 <ø> (ø)
#phpunit 65.88% <100.00%> (+0.01%) 19442.00 <0.00> (-3.00) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
lib/private/Files/Cache/Scanner.php 87.01% <100.00%> (-0.07%) 116.00 <0.00> (-2.00)
lib/private/Files/Cache/Watcher.php 97.22% <100.00%> (ø) 19.00 <0.00> (ø)
lib/private/Server.php 85.18% <0.00%> (-0.23%) 129.00% <0.00%> (ø%)
...es_sharing/lib/Controller/Share20OcsController.php 94.23% <0.00%> (-0.18%) 210.00% <0.00%> (ø%)
core/ajax/update.php 0.00% <0.00%> (ø) 11.00% <0.00%> (ø%)
core/Command/Upgrade.php 0.00% <0.00%> (ø) 29.00% <0.00%> (ø%)
core/Command/Encryption/Disable.php 100.00% <0.00%> (ø) 4.00% <0.00%> (-1.00%)
lib/private/Repair/DropOldTables.php 100.00% <0.00%> (ø) 6.00% <0.00%> (ø%)
core/Command/Maintenance/Repair.php 85.34% <0.00%> (+6.03%) 29.00% <0.00%> (ø%)
lib/private/Repair.php 81.72% <0.00%> (+6.45%) 21.00% <0.00%> (ø%)

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 27caec0...6554f5a. Read the comment docs.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 9, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@phil-davis phil-davis merged commit 18ce2c8 into master Oct 9, 2020
@delete-merged-branch delete-merged-branch bot deleted the scanner_adjustments branch October 9, 2020 10:32
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