[8.1] Skip unavailable storages in scanner #21314

Merged
merged 2 commits into from Jan 8, 2016

Projects

None yet

5 participants

@icewind1991
Member

Backport of #20789

@icewind1991 icewind1991 added this to the 8.2.3-next-maintenance milestone Dec 21, 2015
@mention-bot

By analyzing the blame information on this pull request, we identified @LukasReschke, @butonic and @bartv2 to be potential reviewers

@MorrisJobke MorrisJobke and 1 other commented on an outdated diff Dec 22, 2015
lib/private/files/utils/scanner.php
@@ -156,7 +165,13 @@ public function scan($dir = '') {
$scanner->setUseTransactions(false);
$this->attachListener($mount);
$this->db->beginTransaction();
- $scanner->scan($relativePath, \OC\Files\Cache\Scanner::SCAN_RECURSIVE, \OC\Files\Cache\Scanner::REUSE_ETAG | \OC\Files\Cache\Scanner::REUSE_SIZE);
+ try {
+ $scanner->scan($relativePath, \OC\Files\Cache\Scanner::SCAN_RECURSIVE, \OC\Files\Cache\Scanner::REUSE_ETAG | \OC\Files\Cache\Scanner::REUSE_SIZE);
+ } catch (StorageNotAvailableException $e) {
+ $this->logger->error('Storage ' . $storage->getId() . ' not available');
+ $this->logger->logException($e);
@MorrisJobke
MorrisJobke Dec 22, 2015 Member

LogException is not available in stable8.1:

PHP Fatal error:  Call to undefined method OC\Log::logException() in /Users/morrisjobke/Projects/owncloud/master/lib/private/files/utils/scanner.php on line 172
@PVince81
Collaborator

๐Ÿ‘

@MorrisJobke
Member

I rebased to retrigger CI

@MorrisJobke
Member

Tested and still works ๐Ÿ‘

@DeepDiver1975 Are those failing tests correct? This is stable and PHP7 & OCS tests aren't working there, but how about the docker container?

@DeepDiver1975
Member

needs rebase

failing smashbox tests are fishy

icewind1991 added some commits Nov 27, 2015
@icewind1991 @MorrisJobke icewind1991 Skip unavailable storages in scanner 49a2bbf
@icewind1991 @MorrisJobke icewind1991 also log exception
d523ed9
@MorrisJobke
Member

needs rebase

failing smashbox tests are fishy

Done.

@PVince81
Collaborator
PVince81 commented Jan 8, 2016

Smashbox tests passed, merging.

@PVince81
Collaborator
PVince81 commented Jan 8, 2016

Wait, no.

These ones failed:
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_N

@PVince81
Collaborator
PVince81 commented Jan 8, 2016

The failure is likely unrelated:

2016-01-07 07:00:59,302 - ERROR - owner - recipient 4 uploads /test/test4.txt through reshare etag for / previous ["568e5376dac26"] new ["568e5376dac26"] 'etag for / previous [%s] new [%s]' % (root_etag6, root_etag7)) failed in owner() ["/ssd/jenkins/workspace/smashbox-on-docker-ci/DOCKER_IMAGE/ubuntu_oc_lamp-git/TEST_NAME/test_sharePropagationGroups/mirallBranch/v2.0.2/slave/SMASH/smashbox/lib/owncloud/test_sharePropagationGroups.py" at line 179]

Maybe we didn't backport the fix for when group names are the same as user names.

@PVince81
Collaborator
PVince81 commented Jan 8, 2016

Hmm, I thought this was #20892 but it's slightly different.
Let me check if it fails on 8.1 too.

@PVince81
Collaborator
PVince81 commented Jan 8, 2016

These tests fail on stable8.1 too, raised here #21541

@PVince81 PVince81 merged commit c9c6efd into stable8.1 Jan 8, 2016

14 of 18 checks passed

ocs-api-integration-tests-ci Build #5489 failed in 1 min 39 sec
Details
server-master-linux-php7-ci/database=sqlite,label=SLAVE Build #30679 failed in 1 min 4 sec
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePropagationGroups,mirallBranch=v2.0.2,slave=SMASH Build #5447 failed in 27 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePropagationInsideGroups,mirallBranch=v2.0.2,slave=SMASH Build #5447 failed in 8 min 4 sec
Details
core-ci-linux-jsunit/database=sqlite,label=SLAVE Build #55199 succeeded in 51 sec
Details
core-ci-linux/database=mysql,label=SLAVE Build #22368 succeeded in 16 min
Details
core-ci-linux/database=oci,label=SLAVE Build #22368 succeeded in 27 min
Details
core-ci-linux/database=pgsql,label=SLAVE Build #22368 succeeded in 16 min
Details
core-ci-linux/database=sqlite,label=SLAVE Build #22368 succeeded in 9 min 35 sec
Details
server-master-linux-externals-ci/database=sqlite,external=smb-silvershell,label=SLAVE Build #5478 succeeded in 12 min
Details
server-master-linux-externals-ci/database=sqlite,external=swift-ceph,label=SLAVE Build #5478 succeeded in 10 min
Details
server-master-linux-externals-ci/database=sqlite,external=webdav-ownCloud,label=SLAVE Build #5478 succeeded in 14 min
Details
server-master-linux-externals-smb-windows-ext-ci/database=sqlite,external=smb-windows,label=master Build #5651 succeeded in 3 min 26 sec
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=litmus,mirallBranch=v2.0.2,slave=SMASH Build #5447 succeeded in 4 min 12 sec
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_basicSync@0,mirallBranch=v2.0.2,slave=SMASH Build #5447 succeeded in 5 min 53 sec
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_basicSync@1,mirallBranch=v2.0.2,slave=SMASH Build #5447 succeeded in 25 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_shareLink,mirallBranch=v2.0.2,slave=SMASH Build #5447 succeeded in 13 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePermissions,mirallBranch=v2.0.2,slave=SMASH Build #5447 succeeded in 24 min
Details
@PVince81 PVince81 deleted the scanner-skip-not-available-81 branch Jan 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment