postprocessing state of a non accessible file should not affect a DELETE
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 274
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 103
Description
in the https://github.com/owncloud/ocis/pull/9236 the [ci failed](https://drone.owncloud.com/owncloud/ocis/35340/44/6
```gherkin
@issue-3561 @provisioning_api-app-required
Scenario Outline: listing other user's trashbin is prohibited for newly recreated user with same name # /drone/src/tests/acceptance/features/coreApiTrashbin/trashbinFilesFolders.feature:211
Given using DAV path # FeatureContext::usingOldOrNewDavPath()
And user "testtrashbin102" has been created with default attributes and without skeleton files # FeatureContext::userHasBeenCreatedWithDefaultAttributes()
And user "testtrashbin102" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" # FeatureContext::userHasUploadedAFileTo()
And user "testtrashbin102" has uploaded file "filesForUpload/textfile.txt" to "/textfile2.txt" # FeatureContext::userHasUploadedAFileTo()
And user "Brian" has been created with default attributes and without skeleton files # FeatureContext::userHasBeenCreatedWithDefaultAttributes()
And user "testtrashbin102" has deleted file "/textfile0.txt" # FeatureContext::userHasDeletedResource()
And user "testtrashbin102" has deleted file "/textfile2.txt" # FeatureContext::userHasDeletedResource()
And user "testtrashbin102" has been deleted # FeatureContext::userHasBeenDeleted()
And user "testtrashbin102" has been created with default attributes and without skeleton files # FeatureContext::userHasBeenCreatedWithDefaultAttributes()
And user "testtrashbin102" has uploaded file "filesForUpload/textfile.txt" to "/textfile3.txt" # FeatureContext::userHasUploadedAFileTo()
And user "testtrashbin102" has deleted file "/textfile3.txt" # FeatureContext::userHasDeletedResource()
When user "Brian" tries to list the trashbin content for user "testtrashbin102" # TrashbinContext::userTriesToListTheTrashbinContentForUser()
Then the HTTP status code should be "404" # FeatureContext::thenTheHTTPStatusCodeShouldBe()
And the last webdav response should not contain the following elements # TrashbinContext::theLastWebdavResponseShouldNotContainFollowingElements()
| path | user |
| textfile0.txt | testtrashbin102 |
| textfile2.txt | testtrashbin102 |
| textfile3.txt | testtrashbin102 |
Examples:
| dav-path-version |
| new |
| spaces |
Failed step: And user "testtrashbin102" has deleted file "/textfile3.txt"
HTTP status code was not 204 while trying to delete resource '/textfile3.txt' for user 'testtrashbin102'
Failed asserting that an array contains 503.
```
with a 503 error
```
_______________________________________________________________________
==> REQUEST
DELETE /remote.php/dav/spaces/48dc4de9-4966-4e45-ad55-7a27e2a7434f$17844abc-e5ad-4797-982b-8d3a0a3fbe61/textfile3.txt
X-Request-ID: coreApiTrashbin/trashbinFilesFolders.feature:234-222
<== RESPONSE
503 Service Unavailable
X-Xss-Protection: 1; mode=block
<== RES BODY
Sabre\DAV\Exception\ServiceUnavailableinternal error: file is processing
```
A file is uploaded and immediately deleted:
```gherkin
And user "testtrashbin102" has uploaded file "filesForUpload/textfile.txt" to "/textfile3.txt" # FeatureContext::userHasUploadedAFileTo()
And user "testtrashbin102" has deleted file "/textfile3.txt" # FeatureContext::userHasDeletedResource()
```
We should not die with a 503 here ... and this seems to be racy.
IMO it should be possible to delete a file even if postprocessing has not finished, yet.
Contributor guide
Assessment
This issue has not been assessed yet.