-
Notifications
You must be signed in to change notification settings - Fork 187
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
[full-ci] change default sharing driver to cs3 #3697
Conversation
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. |
💥 Acceptance test Core-API-Tests-ocis-storage-6 failed. Further test are cancelled... |
18cdf24
to
afb7829
Compare
the problem is that when sharing a folder with a user and a group the POST response when accepting the share returns two responses: {
"ocs": {
"meta": {
"status": "ok",
"statuscode": 200,
"message": "OK"
},
"data": [
{
"id": "bb43a564-a813-4610-baeb-a63d3af3ec53",
"share_type": 0,
"uid_owner": "richard",
"displayname_owner": "Richard Phillips Feynman",
"additional_info_owner": "[email protected]",
"permissions": 1,
"stime": 1651762956,
"parent": "",
"expiration": "",
"token": "",
"uid_file_owner": "richard",
"displayname_file_owner": "Richard Phillips Feynman",
"additional_info_file_owner": "[email protected]",
"state": 0,
"path": "/Shares/r1",
"item_type": "folder",
"mimetype": "httpd/unix-directory",
"storage_id": "shared::/Shares/r1",
"storage": 0,
"item_source": "1284d238-aa92-42ce-bdc4-0b0000009157$932b4540-8d16-481e-8ef4-588e4b6b151c!00c43841-640b-485d-aea0-22a6d95e49a1",
"file_source": "1284d238-aa92-42ce-bdc4-0b0000009157$932b4540-8d16-481e-8ef4-588e4b6b151c!00c43841-640b-485d-aea0-22a6d95e49a1",
"file_parent": "",
"file_target": "/Shares/r1",
"share_with": "einstein",
"share_with_user_type": 0,
"share_with_displayname": "Albert Einstein",
"share_with_additional_info": "[email protected]",
"mail_send": 0,
"name": ""
}
]
}
}{
"ocs": {
"meta": {
"status": "ok",
"statuscode": 200,
"message": "OK"
},
"data": [
{
"id": "84632304-f56b-48f1-ab50-cddd65ccd013",
"share_type": 1,
"uid_owner": "richard",
"displayname_owner": "Richard Phillips Feynman",
"additional_info_owner": "[email protected]",
"permissions": 1,
"stime": 1651762966,
"parent": "",
"expiration": "",
"token": "",
"uid_file_owner": "richard",
"displayname_file_owner": "Richard Phillips Feynman",
"additional_info_file_owner": "[email protected]",
"state": 0,
"path": "/Shares/r1",
"item_type": "folder",
"mimetype": "httpd/unix-directory",
"storage_id": "shared::/Shares/r1",
"storage": 0,
"item_source": "1284d238-aa92-42ce-bdc4-0b0000009157$932b4540-8d16-481e-8ef4-588e4b6b151c!00c43841-640b-485d-aea0-22a6d95e49a1",
"file_source": "1284d238-aa92-42ce-bdc4-0b0000009157$932b4540-8d16-481e-8ef4-588e4b6b151c!00c43841-640b-485d-aea0-22a6d95e49a1",
"file_parent": "",
"file_target": "/Shares/r1",
"share_with": "physics-lovers",
"share_with_user_type": 0,
"share_with_displayname": "physics-lovers",
"share_with_additional_info": "",
"mail_send": 0,
"name": ""
}
]
}
} the response object is duplicated 🤔 maybe because the cs3 api returns more than one result? needs more debugging |
the JSON driver explicitly hides one of the duplicate shares:
IMO this might not be the best behavior ... the web ui should decide how to deduplicate. In any case this does not explain why the code renders the object twice ... |
ok we iterate over all shares for id := range sharesToAccept {
h.updateReceivedShare(w, r, id, false, mount)
} and then updateReceivedShare produces a full response for every share, including meta etc:
|
shares listing fixed with cs3org/reva#2830 |
716f783
to
8013e8d
Compare
depending on the timing one of two scenarios are the cause for the failing testsuite:
Scenario Outline: getting shares received from users # /srv/app/testrunner/tests/acceptance/features/apiShareOperationsToShares1/gettingSharesReceivedFiltered.feature:37
Given using OCS API version "<ocs_api_version>" # FeatureContext::usingOcsApiVersion()
When user "Brian" gets the user shares shared with him using the sharing API # FeatureContext::userGetsFilteredSharesSharedWithHimUsingTheSharingApi()
Then the OCS status code should be "<ocs_status_code>" # OCSContext::theOCSStatusCodeShouldBe()
And the HTTP status code should be "200" # FeatureContext::thenTheHTTPStatusCodeShouldBe()
And exactly 2 files or folders should be included in the response # FeatureContext::checkCountFilesFoldersInResponse()
And folder "/Shares/folderToShareWithUser" should be included in the response # FeatureContext::checkSharedFileInResponse()
And file "/Shares/fileToShareWithUser.txt" should be included in the response # FeatureContext::checkSharedFileInResponse()
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
Sharing::checkCountFilesFoldersInResponse the response does not contain 2 entries
Failed asserting that actual size 4 matches expected size 2.
| 2 | 200 |
Sharing::checkCountFilesFoldersInResponse the response does not contain 2 entries
Failed asserting that actual size 4 matches expected size 2.
Scenario Outline: Cannot set permissions to zero # /srv/app/testrunner/tests/acceptance/features/apiShareUpdateToShares/updateShare.feature:102
Given using OCS API version "<ocs_api_version>" # FeatureContext::usingOcsApiVersion()
And group "grp1" has been created # FeatureContext::groupHasBeenCreated()
And user "Alice" has created folder "/FOLDER" # FeatureContext::userHasCreatedFolder()
And user "Alice" has shared folder "/FOLDER" with group "grp1" # FeatureContext::userHasSharedFileWithGroupUsingTheSharingApi()
When user "Alice" updates the last share using the sharing API with # FeatureContext::userUpdatesTheLastShareWith()
| permissions | 0 |
Then the OCS status code should be "400" # OCSContext::theOCSStatusCodeShouldBe()
And the HTTP status code should be "<http_status_code>" # FeatureContext::thenTheHTTPStatusCodeShouldBe()
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
OCS status code is not any of the expected values 400 got 100
Failed asserting that an array contains '100'.
| 2 | 400 |
OCS status code is not any of the expected values 400 got 200
Failed asserting that an array contains '200'. |
needs cs3org/reva#2853 |
8013e8d
to
60207ff
Compare
60207ff
to
07e6176
Compare
The expected failures are back to normal. Let us see if the share manager is stable in the CI |
07e6176
to
371c6db
Compare
Test is still flaky https://drone.owncloud.com/owncloud/ocis/11751/44/6 |
ec92d50
to
874d075
Compare
Still the same scenario
Seems like it still passes "sometimes" |
@phil-davis @aduffeck Any progress on the testsuite? |
owncloud/core#40095 is coming... Ask me again tomorrow! |
@phil-davis please let me know if there's anything I can help you with |
PR #3908 has been merged. That gets the new API test code running in oCIS CI. |
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
874d075
to
7667506
Compare
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
7667506
to
379a7fd
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
What is the status of this? Do we need a migration? Or should we merge as is? Maybe add a |
we now use the
cs3
drivers to persist user shares and public links