Skip to content

[WIP] file based objectstore implementation for testing - #17638

Closed
butonic wants to merge 3 commits into
masterfrom
filesobjectstore
Closed

butonic wants to merge 3 commits into
masterfrom
filesobjectstore

Conversation

@butonic

@butonic butonic commented Jul 14, 2015

Copy link
Copy Markdown
Contributor

Currently, the objectstore code is not automatically tested because we lack a swift service for testing. To at least test the ObjectStore class I implemented a file based objectstore. We could also create a separate travis test that uses this objectstore by default. That should reveal any app incompatibilities.

cc @DeepDiver1975 @icewind1991 @PVince81 @MorrisJobke thoughts?

@butonic
butonic force-pushed the filesobjectstore branch from aae3494 to 9686352 Compare July 14, 2015 11:14
@scrutinizer-notifier

Copy link
Copy Markdown

A new inspection was created.

@DeepDiver1975 DeepDiver1975 added this to the 8.2-current milestone Jul 14, 2015
@DeepDiver1975

Copy link
Copy Markdown
Contributor

@butonic looks like this test has negative side effects on other tests:

PHP Fatal error: Call to a member function getOwner() on null in /var/jenkins/workspace/pull-request-analyser-ng-simple/label/SLAVE/lib/private/files/filesystem.php on line 907
07:57:23 PHP Stack trace:
07:57:23 PHP 1. {main}() /usr/local/bin/phpunit:0
07:57:23 PHP 2. PHPUnit_TextUI_Command::main() /usr/local/bin/phpunit:537
07:57:23 PHP 3. PHPUnit_TextUI_Command->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:105
07:57:23 PHP 4. PHPUnit_TextUI_TestRunner->doRun() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:153
07:57:23 PHP 5. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/TestRunner.php:406
07:57:23 PHP 6. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:722
07:57:23 PHP 7. PHPUnit_Framework_TestCase->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:722
07:57:23 PHP 8. PHPUnit_Framework_TestResult->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:699
07:57:23 PHP 9. PHP_Invoker->invoke() phar:///usr/local/bin/phpunit/phpunit/Framework/TestResult.php:607
07:57:23 PHP 10. call_user_func_array:{phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93}() phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93
07:57:23 PHP 11. PHPUnit_Framework_TestCase->runBare() phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93
07:57:23 PHP 12. PHPUnit_Framework_TestCase->runTest() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:743
07:57:23 PHP 13. ReflectionMethod->invokeArgs() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:866
07:57:23 PHP 14. OCA\Files_Versions\Tests\Command\ExpireTest->testExpireNonExistingUser() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:866
07:57:23 PHP 15. OCA\Files_Versions\Command\Expire->handle() /var/jenkins/workspace/pull-request-analyser-ng-simple/label/SLAVE/apps/files_versions/tests/command/expiretest.php:30
07:57:23 PHP 16. OCA\Files_Versions\Storage::expire() /var/jenkins/workspace/pull-request-analyser-ng-simple/label/SLAVE/apps/files_versions/command/expire.php:75
07:57:23 PHP 17. OCA\Files_Versions\Storage::getUidAndFilename() /var/jenkins/workspace/pull-request-analyser-ng-simple/label/SLAVE/apps/files_versions/lib/storage.php:559
07:57:23 PHP 18. OC\Files\Filesystem::getOwner() /var/jenkins/workspace/pull-request-analyser-ng-simple/label/SLAVE/apps/files_versions/lib/storage.php:72

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Another idea:

what about adding another autotest-primary.sh which fires up a docker container holding swift inside and execute the tests against that?

We could add this to jenkins just like our external unit tests:
https://ci.owncloud.org/job/server-master-linux-externals/

@butonic

butonic commented Jul 14, 2015

Copy link
Copy Markdown
Contributor Author

@DeepDiver1975 yes, docker is an option and I still need to follow up on that ceph container thing for s3. Unfortunately, making this work on travis requires some extra work because docker is not officially supported.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are these tests overwritten?
Should they also be overwritten for other object store tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The objectstore uses our cache to store metadata. I need to check a few things differently, but would have to look at the diff what exactly...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh and actually all objectstore implementatons do that, so yes, alll tests need to overwrite these methods. so we can create a new superclass for these tests, now that a swift and a files implementation exist in core.

@DeepDiver1975

Copy link
Copy Markdown
Contributor

@DeepDiver1975 yes, docker is an option and I still need to follow up on that ceph container thing for s3. Unfortunately, making this work on travis requires some extra work because docker is not officially supported.

This would be outside the scope of travis then but Jenkins only.
travis is "only" relevant for s3 on our private repo.

@PVince81

PVince81 commented Sep 1, 2015

Copy link
Copy Markdown
Contributor

@butonic defer to 9.0 ? Any update ?

@MorrisJobke

Copy link
Copy Markdown
Contributor

WIP -> 9.0

@MorrisJobke MorrisJobke modified the milestones: 9.0-next, 8.2-current Oct 5, 2015
@PVince81

Copy link
Copy Markdown
Contributor

@butonic @icewind1991 do we still need this now that we have the docker instances for testing ?

@icewind1991 this PR might also be interesting to test alternative home storage implementations ?

@MorrisJobke MorrisJobke modified the milestones: 9.1-next, 9.0-current Mar 4, 2016
@butonic butonic mentioned this pull request May 9, 2016
@PVince81

Copy link
Copy Markdown
Contributor

do we still need this now that we have the docker instances for testing ?

@butonic can we close this ? We have a docker for this: core-ci-linux-swift-primary-storage/database=mysql,label=SLAVE

@PVince81

Copy link
Copy Markdown
Contributor

Closing this due to lack of feedback. Also as stated above we have CI for the object store using docker.

@PVince81 PVince81 closed this May 20, 2016
@PVince81
PVince81 deleted the filesobjectstore branch May 20, 2016 13:38
@butonic

butonic commented May 20, 2016

Copy link
Copy Markdown
Contributor Author

If not for testing I recommend keeping it around for a future default storage implementation as mentioned in #12097 (comment)

@MorrisJobke

Copy link
Copy Markdown
Contributor

For testing we should maybe use https://minio.io/ - this provides S3 compatible storage based on local files.

@PVince81

Copy link
Copy Markdown
Contributor

If we want to keep it then either we should merge it or move it to an example app ? I'd prefer having this as a separate example app then.

@DeepDiver1975
DeepDiver1975 restored the filesobjectstore branch November 21, 2017 11:44
@DeepDiver1975 DeepDiver1975 reopened this Nov 21, 2017
@DeepDiver1975

Copy link
Copy Markdown
Contributor

@ownclouders rebase

@ownclouders

Copy link
Copy Markdown
Contributor

Hey! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost!

@ownclouders

Copy link
Copy Markdown
Contributor

Automated rebase failed! Please rebase your pull request manually via the command line.

Error:
Command '['git', 'rebase', 'base/master']' returned non-zero exit status 128.

@butonic

butonic commented Nov 21, 2017

Copy link
Copy Markdown
Contributor Author

One does not simply rebase this branch ...

@DeepDiver1975

Copy link
Copy Markdown
Contributor

One does not simply rebase this branch ...

one does ....

@DeepDiver1975
DeepDiver1975 deleted the filesobjectstore branch February 15, 2018 09:22
@lock

lock Bot commented Aug 1, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 1, 2019
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.

7 participants