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

Feature/sabre with streaming propfind #36336

Closed
wants to merge 2 commits into from

Conversation

DeepDiver1975
Copy link
Member

Description

sabre dav master branch introduced streaming support for propfind requests.
This PR introduced this for webdav v1 and all files endppoints on v2

This will reduce memory consumption on large folders and shall also increase responsiveness a bit.

Related Issue

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

@@ -218,6 +218,7 @@ public function __construct(IRequest $request, $baseUri) {
));

if ($this->isRequestForSubtree(['files', 'trash-bin', 'public-files'])) {
\Sabre\DAV\Server::$streamMultiStatus = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

as discussed I think it would be safer to trigger this with a header to not disturb third party clients

Copy link
Member Author

Choose a reason for hiding this comment

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

absolutly - this is just the simplification for the draft ...

@DeepDiver1975
Copy link
Member Author

Looks like the test suite cannot deal with streamed responses yet?

 Scenario: Attempting to delete a single file from the trashbin should fail                                               �[30m# /drone/src/tests/acceptance/features/apiTrashbin/trashbinAPIDisabled.feature:20
    Given user "user0" has been created with default attributes and skeleton files                                         �[30m# FeatureContext::userHasBeenCreatedWithDefaultAttributes()
    And user "user0" has deleted file "/textfile0.txt"                                                                     �[30m# FeatureContext::userHasDeletedFile()
    And user "user0" has deleted file "/textfile1.txt"                                                                     �[30m# FeatureContext::userHasDeletedFile()
    When user "user0" tries to delete the file with original path "textfile1.txt" from the trashbin using the trashbin API �[30m# TrashbinContext::tryToDeleteFileFromTrashbin()
      Exception: String could not be parsed as XML in /drone/src/lib/composer/guzzlehttp/guzzle/src/Message/Response.php:167
      Stack trace:
      #0 /drone/src/lib/composer/guzzlehttp/guzzle/src/Message/Response.php(167): SimpleXMLElement->__construct('<?xml version="...', 2048, false, '', false)
      #1 /drone/src/tests/TestHelpers/HttpRequestHelper.php(323): GuzzleHttp\Message\Response->xml()
      #2 /drone/src/tests/TestHelpers/WebDavHelper.php(231): TestHelpers\HttpRequestHelper::getResponseXml(Object(GuzzleHttp\Message\Response))
      #3 /drone/src/tests/acceptance/features/bootstrap/TrashbinContext.php(109): TestHelpers\WebDavHelper::listFolder('https://server', 'user0', '123456', '/trash-bin/user...', 1, Array, 'trash-bin')
      #4 /drone/src/tests/acceptance/features/bootstrap/TrashbinContext.php(180): TrashbinContext->listTrashbinFolder('user0', '/')
      #5 [internal function]: TrashbinContext->tryToDeleteFileFromTrashbin('user0', 'textfile1.txt')
      #6 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Call/Handler/RuntimeCallHandler.php(109): call_user_func_array(Array, Array)
      #7 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Call/Handler/RuntimeCallHandler.php(64): Behat\Testwork\Call\Handler\RuntimeCallHandler->executeCall(Object(Behat\Behat\Definition\Call\DefinitionCall))
      #8 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Call/CallCenter.php(140): Behat\Testwork\Call\Handler\RuntimeCallHandler->handleCall(Object(Behat\Behat\Definition\Call\DefinitionCall))
      #9 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Call/CallCenter.php(96): Behat\Testwork\Call\CallCenter->handleCall(Object(Behat\Behat\Definition\Call\DefinitionCall))
      #10 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeStepTester.php(125): Behat\Testwork\Call\CallCenter->makeCall(Object(Behat\Behat\Definition\Call\DefinitionCall))
      #11 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeStepTester.php(73): Behat\Behat\Tester\Runtime\RuntimeStepTester->testDefinition(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), Object(Behat\Behat\Definition\SearchResult), false)
      #12 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableStepTester.php(74): Behat\Behat\Tester\Runtime\RuntimeStepTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), false)
      #13 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/TickingStepTester.php(59): Behat\Behat\Hook\Tester\HookableStepTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), false)
      #14 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingStepTester.php(73): Behat\Behat\EventDispatcher\Tester\TickingStepTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), false)
      #15 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Tester/StepContainerTester.php(59): Behat\Behat\EventDispatcher\Tester\EventDispatchingStepTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), false)
      #16 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeScenarioTester.php(76): Behat\Behat\Tester\StepContainerTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
      #17 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableScenarioTester.php(74): Behat\Behat\Tester\Runtime\RuntimeScenarioTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
      #18 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingScenarioTester.php(103): Behat\Behat\Hook\Tester\HookableScenarioTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
      #19 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/IsolatingScenarioTester.php(69): Behat\Behat\EventDispatcher\Tester\EventDispatchingScenarioTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
      #20 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeFeatureTester.php(84): Behat\Behat\Tester\Runtime\IsolatingScenarioTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
      #21 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableFeatureTester.php(72): Behat\Behat\Tester\Runtime\RuntimeFeatureTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), false)
      #22 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingFeatureTester.php(71): Behat\Behat\Hook\Tester\HookableFeatureTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), false)
      #23 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Tester/Runtime/RuntimeSuiteTester.php(63): Behat\Behat\EventDispatcher\Tester\EventDispatchingFeatureTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), false)
      #24 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Hook/Tester/HookableSuiteTester.php(73): Behat\Testwork\Tester\Runtime\RuntimeSuiteTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Testwork\Specification\GroupedSpecificationIterator), false)
      #25 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/EventDispatcher/Tester/EventDispatchingSuiteTester.php(72): Behat\Testwork\Hook\Tester\HookableSuiteTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Testwork\Specification\GroupedSpecificationIterator), false)
      #26 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Tester/Runtime/RuntimeExercise.php(71): Behat\Testwork\EventDispatcher\Tester\EventDispatchingSuiteTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Testwork\Specification\GroupedSpecificationIterator), false)
      #27 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/EventDispatcher/Tester/EventDispatchingExercise.php(70): Behat\Testwork\Tester\Runtime\RuntimeExercise->test(Array, false)
      #28 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Ordering/OrderedExercise.php(80): Behat\Testwork\EventDispatcher\Tester\EventDispatchingExercise->test(Array, false)
      #29 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Tester/Cli/ExerciseController.php(149): Behat\Testwork\Ordering\OrderedExercise->test(Array, false)
      #30 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Tester/Cli/ExerciseController.php(108): Behat\Testwork\Tester\Cli\ExerciseController->testSpecifications(Object(Symfony\Component\Console\Input\ArgvInput), Array)
      #31 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Cli/Command.php(63): Behat\Testwork\Tester\Cli\ExerciseController->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #32 /drone/src/vendor-bin/behat/vendor/symfony/console/Command/Command.php(255): Behat\Testwork\Cli\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #33 /drone/src/vendor-bin/behat/vendor/symfony/console/Application.php(934): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #34 /drone/src/vendor-bin/behat/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Behat\Testwork\Cli\Command), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #35 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Cli/Application.php(124): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #36 /drone/src/vendor-bin/behat/vendor/symfony/console/Application.php(149): Behat\Testwork\Cli\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #37 /drone/src/vendor-bin/behat/vendor/behat/behat/bin/behat(34): Symfony\Component\Console\Application->run()
      #38 {main}
      
      Next GuzzleHttp\Exception\XmlParseException: Unable to parse response body into XML: String could not be parsed as XML in /drone/src/lib/composer/guzzlehttp/guzzle/src/Message/Response.php:174
      Stack trace:
      #0 /drone/src/tests/TestHelpers/HttpRequestHelper.php(323): GuzzleHttp\Message\Response->xml()
      #1 /drone/src/tests/TestHelpers/WebDavHelper.php(231): TestHelpers\HttpRequestHelper::getResponseXml(Object(GuzzleHttp\Message\Response))
      #2 /drone/src/tests/acceptance/features/bootstrap/TrashbinContext.php(109): TestHelpers\WebDavHelper::listFolder('https://server', 'user0', '123456', '/trash-bin/user...', 1, Array, 'trash-bin')
      #3 /drone/src/tests/acceptance/features/bootstrap/TrashbinContext.php(180): TrashbinContext->listTrashbinFolder('user0', '/')
      #4 [internal function]: TrashbinContext->tryToDeleteFileFromTrashbin('user0', 'textfile1.txt')
      #5 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Call/Handler/RuntimeCallHandler.php(109): call_user_func_array(Array, Array)
      #6 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Call/Handler/RuntimeCallHandler.php(64): Behat\Testwork\Call\Handler\RuntimeCallHandler->executeCall(Object(Behat\Behat\Definition\Call\DefinitionCall))
      #7 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Call/CallCenter.php(140): Behat\Testwork\Call\Handler\RuntimeCallHandler->handleCall(Object(Behat\Behat\Definition\Call\DefinitionCall))
      #8 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Call/CallCenter.php(96): Behat\Testwork\Call\CallCenter->handleCall(Object(Behat\Behat\Definition\Call\DefinitionCall))
      #9 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeStepTester.php(125): Behat\Testwork\Call\CallCenter->makeCall(Object(Behat\Behat\Definition\Call\DefinitionCall))
      #10 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeStepTester.php(73): Behat\Behat\Tester\Runtime\RuntimeStepTester->testDefinition(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), Object(Behat\Behat\Definition\SearchResult), false)
      #11 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableStepTester.php(74): Behat\Behat\Tester\Runtime\RuntimeStepTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), false)
      #12 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/TickingStepTester.php(59): Behat\Behat\Hook\Tester\HookableStepTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), false)
      #13 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingStepTester.php(73): Behat\Behat\EventDispatcher\Tester\TickingStepTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), false)
      #14 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Tester/StepContainerTester.php(59): Behat\Behat\EventDispatcher\Tester\EventDispatchingStepTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\StepNode), false)
      #15 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeScenarioTester.php(76): Behat\Behat\Tester\StepContainerTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
      #16 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableScenarioTester.php(74): Behat\Behat\Tester\Runtime\RuntimeScenarioTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
      #17 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingScenarioTester.php(103): Behat\Behat\Hook\Tester\HookableScenarioTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
      #18 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/IsolatingScenarioTester.php(69): Behat\Behat\EventDispatcher\Tester\EventDispatchingScenarioTester->test(Object(Behat\Behat\Context\Environment\InitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
      #19 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Tester/Runtime/RuntimeFeatureTester.php(84): Behat\Behat\Tester\Runtime\IsolatingScenarioTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), Object(Behat\Gherkin\Node\ScenarioNode), false)
      #20 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/Hook/Tester/HookableFeatureTester.php(72): Behat\Behat\Tester\Runtime\RuntimeFeatureTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), false)
      #21 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Behat/EventDispatcher/Tester/EventDispatchingFeatureTester.php(71): Behat\Behat\Hook\Tester\HookableFeatureTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), false)
      #22 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Tester/Runtime/RuntimeSuiteTester.php(63): Behat\Behat\EventDispatcher\Tester\EventDispatchingFeatureTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Gherkin\Node\FeatureNode), false)
      #23 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Hook/Tester/HookableSuiteTester.php(73): Behat\Testwork\Tester\Runtime\RuntimeSuiteTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Testwork\Specification\GroupedSpecificationIterator), false)
      #24 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/EventDispatcher/Tester/EventDispatchingSuiteTester.php(72): Behat\Testwork\Hook\Tester\HookableSuiteTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Testwork\Specification\GroupedSpecificationIterator), false)
      #25 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Tester/Runtime/RuntimeExercise.php(71): Behat\Testwork\EventDispatcher\Tester\EventDispatchingSuiteTester->test(Object(Behat\Behat\Context\Environment\UninitializedContextEnvironment), Object(Behat\Testwork\Specification\GroupedSpecificationIterator), false)
      #26 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/EventDispatcher/Tester/EventDispatchingExercise.php(70): Behat\Testwork\Tester\Runtime\RuntimeExercise->test(Array, false)
      #27 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Ordering/OrderedExercise.php(80): Behat\Testwork\EventDispatcher\Tester\EventDispatchingExercise->test(Array, false)
      #28 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Tester/Cli/ExerciseController.php(149): Behat\Testwork\Ordering\OrderedExercise->test(Array, false)
      #29 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Tester/Cli/ExerciseController.php(108): Behat\Testwork\Tester\Cli\ExerciseController->testSpecifications(Object(Symfony\Component\Console\Input\ArgvInput), Array)
      #30 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Cli/Command.php(63): Behat\Testwork\Tester\Cli\ExerciseController->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #31 /drone/src/vendor-bin/behat/vendor/symfony/console/Command/Command.php(255): Behat\Testwork\Cli\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #32 /drone/src/vendor-bin/behat/vendor/symfony/console/Application.php(934): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #33 /drone/src/vendor-bin/behat/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Behat\Testwork\Cli\Command), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #34 /drone/src/vendor-bin/behat/vendor/behat/behat/src/Behat/Testwork/Cli/Application.php(124): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #35 /drone/src/vendor-bin/behat/vendor/symfony/console/Application.php(149): Behat\Testwork\Cli\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
      #36 /drone/src/vendor-bin/behat/vendor/behat/behat/bin/behat(34): Symfony\Component\Console\Application->run()
      #37 {main}
    Then as "user0" the file with original path "/textfile0.txt" should exist in trash                                     �[30m# TrashbinContext::elementIsInTrashCheckingOriginalPath()
    And as "user0" the file with original path "/textfile1.txt" should exist in trash                                      �[30m# TrashbinContext::elementIsInTrashCheckingOriginalPath()

@DeepDiver1975
Copy link
Member Author

Same error after restarting drone .... looks like an issue we need to address in the code base ...

@individual-it maybe you can throw an hour at this? THX a lot

@phil-davis phil-davis self-assigned this Oct 25, 2019
@phil-davis
Copy link
Contributor

@individual-it is on leave for a while. Assigned myself so that I remember to allocate it to someone next week.

@DeepDiver1975
Copy link
Member Author

Same error after restarting drone .... looks like an issue we need to address in the code base ...

@individual-it maybe you can throw an hour at this? THX a lot

@individual-it is on leave for a while. Assigned myself so that I remember to allocate it to someone next week.

@phil-davis any idea already what's going on? Any pointers are welcome - THX

@individual-it individual-it force-pushed the feature/sabre-with-streaming-propfind branch from c35fe4b to 5f04383 Compare November 18, 2019 10:39
@codecov
Copy link

codecov bot commented Nov 18, 2019

Codecov Report

Merging #36336 into master will decrease coverage by 0.3%.
The diff coverage is 50%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #36336      +/-   ##
============================================
- Coverage     65.16%   64.86%   -0.31%     
+ Complexity    19802    19775      -27     
============================================
  Files          1271     1271              
  Lines         74754    74707      -47     
  Branches       1309     1309              
============================================
- Hits          48712    48456     -256     
- Misses        25656    25865     +209     
  Partials        386      386
Flag Coverage Δ Complexity Δ
#javascript 54% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.05% <50%> (-0.34%) 19775 <0> (-27)
Impacted Files Coverage Δ Complexity Δ
apps/dav/appinfo/v1/webdav.php 0% <0%> (ø) 0 <0> (ø) ⬇️
apps/dav/lib/Server.php 52.56% <100%> (+0.3%) 28 <0> (ø) ⬇️
apps/files_external/lib/Lib/Storage/SMB.php 0% <0%> (-52.2%) 0% <0%> (ø)
lib/private/Files/Meta/MetaRootNode.php 43.9% <0%> (-2.61%) 18% <0%> (ø)
lib/private/User/Account.php 73.91% <0%> (-2.09%) 9% <0%> (-1%)
core/Application.php 36.91% <0%> (-1.5%) 27% <0%> (+1%)
lib/private/Files/Node/Root.php 55.76% <0%> (-0.43%) 41% <0%> (ø)
lib/private/Files/View.php 84.59% <0%> (-0.32%) 402% <0%> (-12%)
core/Command/User/SyncBackend.php 78.92% <0%> (-0.11%) 47% <0%> (-1%)
lib/private/legacy/util.php 74.02% <0%> (-0.05%) 240% <0%> (ø)
... and 8 more

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 f6f3cf1...5f04383. Read the comment docs.

@individual-it
Copy link
Member

@DeepDiver1975 the issue seems to be a PROPFIND on the trashbin-api when dav.enable.tech_preview is disabled.

e.g. curl -u admin:admin -X PROPFIND http://localhost/owncloud-core/remote.php/dav/trash-bin/admin

on master results in:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
  <s:message>File not found: trash-bin in 'root'</s:message>
</d:error>

but in this branch it results into an invalid XML response:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
  <s:message>File not found: trash-bin in 'root'</s:message>
</d:error>
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"

@individual-it
Copy link
Member

even worse, PROPFIND on a non-existent user returns invalid XML, looks like we do not have enough tests for that case

curl -u admin:admin -X PROPFIND http://localhost/owncloud-core/remote.php/dav/files/not-existent

should be

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
  <s:message>Principal with name not-existent not found</s:message>
</d:error>
<?xml version="1.0"?>

but is:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotFound</s:exception>
  <s:message>Principal with name not-existent not found</s:message>
</d:error>
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns

@individual-it
Copy link
Member

added extra test in #36435

@individual-it individual-it removed their assignment Nov 18, 2019
@phil-davis
Copy link
Contributor

@micbar this is only tagged developing - is it scheduled to progress any time soon?

@micbar
Copy link
Contributor

micbar commented Dec 2, 2019

@DeepDiver1975 What are the next steps here?

@DeepDiver1975
Copy link
Member Author

I'm closing this - looks like this is no longer needed

@DeepDiver1975 DeepDiver1975 deleted the feature/sabre-with-streaming-propfind branch March 2, 2020 10:30
@DeepDiver1975 DeepDiver1975 restored the feature/sabre-with-streaming-propfind branch March 25, 2021 11:35
@DeepDiver1975 DeepDiver1975 reopened this Mar 25, 2021
@DeepDiver1975 DeepDiver1975 deleted the feature/sabre-with-streaming-propfind branch March 25, 2021 11:41
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.

5 participants