-
Notifications
You must be signed in to change notification settings - Fork 189
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
Bump reva deps #8412
Bump reva deps #8412
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. |
e2094c8
to
f4cec36
Compare
f4cec36
to
af13d83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a review of the vendor folder.
Changes are looking good.
Please clarify that the go-micro client and Registry changes are already used in ocis.
If that is correct, ok from my side.
I see an error when stopping a large upload: {"level":"error","service":"frontend","pkg":"rhttp","traceid":"3c99e006acb683d3b43313b520b7b542","request-id":"37c1b3bc-a36f-4dfa-8d33-68eee87cb3c1","error":"Patch \"http://localhost:9158/data/tus/335e922d-c994-4eec-b4e3-65d988d2811f\": context canceled","time":"2024-02-19T13:34:00+01:00","message":"error doing PATCH request to data service"}
{"level":"error","service":"storage-users","pkg":"rhttp","traceid":"03e9501a2ea3a36c382d32549a4e704a","host":"127.0.0.1","method":"PATCH","uri":"/data/tus/335e922d-c994-4eec-b4e3-65d988d2811f","url":"/335e922d-c994-4eec-b4e3-65d988d2811f","proto":"HTTP/1.1","status":500,"size":15,"start":"19/Feb/2024:13:33:58 +0100","end":"19/Feb/2024:13:34:00 +0100","time_ns":1144378976,"time":"2024-02-19T13:34:00+01:00","message":"http"}
{"level":"error","service":"frontend","pkg":"rhttp","traceid":"3c99e006acb683d3b43313b520b7b542","host":"127.0.0.1","method":"PATCH","uri":"/data/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNzA4NDMyMzgwLCJpYXQiOjE3MDgzNDU5ODAsInRhcmdldCI6Imh0dHA6Ly9sb2NhbGhvc3Q6OTE1OC9kYXRhL3R1cy8zMzVlOTIyZC1jOTk0LTRlZWMtYjRlMy02NWQ5ODhkMjgxMWYifQ.b6i-_kih05jLbuc_FIdfmORMJ76lignlOmoZvQTucdU","url":"/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNzA4NDMyMzgwLCJpYXQiOjE3MDgzNDU5ODAsInRhcmdldCI6Imh0dHA6Ly9sb2NhbGhvc3Q6OTE1OC9kYXRhL3R1cy8zMzVlOTIyZC1jOTk0LTRlZWMtYjRlMy02NWQ5ODhkMjgxMWYifQ.b6i-_kih05jLbuc_FIdfmORMJ76lignlOmoZvQTucdU","proto":"HTTP/1.1","status":500,"size":0,"start":"19/Feb/2024:13:33:58 +0100","end":"19/Feb/2024:13:34:00 +0100","time_ns":1145671040,"time":"2024-02-19T13:34:00+01:00","message":"http"}
{"level":"error","service":"frontend","pkg":"rhttp","traceid":"8851badfc7074bd0921755e09113ca90","host":"127.0.0.1","method":"DELETE","uri":"/data/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNzA4NDMyMzgwLCJpYXQiOjE3MDgzNDU5ODAsInRhcmdldCI6Imh0dHA6Ly9sb2NhbGhvc3Q6OTE1OC9kYXRhL3R1cy8zMzVlOTIyZC1jOTk0LTRlZWMtYjRlMy02NWQ5ODhkMjgxMWYifQ.b6i-_kih05jLbuc_FIdfmORMJ76lignlOmoZvQTucdU","url":"/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNzA4NDMyMzgwLCJpYXQiOjE3MDgzNDU5ODAsInRhcmdldCI6Imh0dHA6Ly9sb2NhbGhvc3Q6OTE1OC9kYXRhL3R1cy8zMzVlOTIyZC1jOTk0LTRlZWMtYjRlMy02NWQ5ODhkMjgxMWYifQ.b6i-_kih05jLbuc_FIdfmORMJ76lignlOmoZvQTucdU","proto":"HTTP/1.1","status":501,"size":0,"start":"19/Feb/2024:13:34:01 +0100","end":"19/Feb/2024:13:34:01 +0100","time_ns":103835,"time":"2024-02-19T13:34:01+01:00","message":"http"} |
the 501 on delete is fixed with cs3org/reva#4527 |
38cc8e8
to
515cc2a
Compare
It seems that was not the problem. The failing web test:
But locally I cannot reporduce ... is the upload maybe too slow? |
I could reproduce it:
How reproduce:
Actual: Screen.Recording.2024-02-19.at.17.07.32.movocis log:
|
And there is this error log {"level":"error","service":"frontend","pkg":"rhttp","traceid":"16995d691cd01911e970ca91f8fa40ee","request-id":"766dcb17-c21b-4f97-98ae-56b1a7ad572a","content-length":24493475,"transferred-bytes":0,"time":"2024-02-20T09:16:28+05:45","message":"content length vs transferred bytes mismatch"}
{"level":"error","service":"frontend","pkg":"rhttp","traceid":"6479db37bf424506b2915d322c6a6e39","request-id":"b6c4aa22-8378-442e-b12d-8696764e0dc6","content-length":24493475,"transferred-bytes":0,"time":"2024-02-20T09:16:28+05:45","message":"content length vs transferred bytes mismatch"} |
@saw-jan hm those lines are now logged by the datagateway in the frontent service when the content length does not match the actual body length: if httpRes.Header.Get("Content-Length") != "" {
i, err := strconv.ParseInt(httpRes.Header.Get("Content-Length"), 10, 64)
if err != nil {
log.Error().Err(err).Str("content-length", httpRes.Header.Get("Content-Length")).Msg("invalid content length in dataprovider response")
}
if i != c {
log.Error().Int64("content-length", i).Int64("transferred-bytes", c).Msg("content length vs transferred bytes mismatch")
}
} But good hint! I thought maybe I missed the 👀 |
515cc2a
to
e4b12c6
Compare
I accidentially checked in my domain as the CORS allowed origin for tus uploads. Changed it to |
e4b12c6
to
b408fa8
Compare
b408fa8
to
87c1fb4
Compare
I assume these failures are caused by disableing resharing in the sharing manager:
So I changed it to enabled again. AFAICT the testsuite uses |
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
87c1fb4
to
0da7437
Compare
looking into this: @issue-1233
Scenario Outline: get a share with a user that didn't receive the share # /drone/src/tests/acceptance/features/coreApiShareOperationsToShares1/gettingShares.feature:134
Given using OCS API version "<ocs_api_version>" # FeatureContext::usingOcsApiVersion()
And user "Carol" has been created with default attributes and without skeleton files # FeatureContext::userHasBeenCreatedWithDefaultAttributes()
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
And user "Alice" has shared file "textfile0.txt" with user "Brian" # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
When user "Carol" gets the info of the last share using the sharing API # FeatureContext::userGetsInfoOfLastShareUsingTheSharingApi()
Then the OCS status code should be "404" # OCSContext::theOCSStatusCodeShouldBe()
And the HTTP status code should be "<http_status_code>" # FeatureContext::thenTheHTTPStatusCodeShouldBe()
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
Failed step: Then the OCS status code should be "404"
OCS status code is not any of the expected values 404 got 998
Failed asserting that an array contains '998'.
| 2 | 404 |
Failed step: Then the OCS status code should be "404"
OCS status code is not any of the expected values 404 got 998
Failed asserting that an array contains '998'. |
this test is in expected failures file, do you want to fix it too? I see that another tests is reason the failed CI. (where we get |
Yeah, the failure is during creating share/reshare And user "Carol" has been added to group "grp1"
And user "Alice" has shared folder "common" with group "grp1"
And user "Alice" has shared file "textfile0.txt" with user "Carol"
OCS status code is not any of the expected values 100,200 got 104
Failed asserting that an array contains '104'. And AFAIK, |
🤦♂️ damn looking at the wrong test ... |
looking at coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:474 @issue-764 @issue-7555
Scenario: share a file by multiple channels and download from sub-folder and direct file share # /drone/src/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:474
Given these users have been created with default attributes and without skeleton files: # FeatureContext::theseUsersHaveBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles()
| username |
| Brian |
| Carol |
And group "grp1" has been created # FeatureContext::groupHasBeenCreated()
And user "Brian" has been added to group "grp1" # FeatureContext::userHasBeenAddedToGroup()
And user "Carol" has been added to group "grp1" # FeatureContext::userHasBeenAddedToGroup()
And user "Alice" has created folder "/common" # FeatureContext::userHasCreatedFolder()
And user "Alice" has created folder "/common/sub" # FeatureContext::userHasCreatedFolder()
And user "Alice" has uploaded file with content "ownCloud" to "/textfile0.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
And user "Alice" has shared folder "common" with group "grp1" # FeatureContext::userHasSharedFileWithGroupUsingTheSharingApi()
And user "Alice" has shared file "textfile0.txt" with user "Carol" # FeatureContext::userHasSharedFileWithUserUsingTheSharingApi()
OCS status code is not any of the expected values 100,200 got 104
Failed asserting that an array contains '104'.
And user "Alice" has moved file "/textfile0.txt" to "/common/textfile0.txt" # FeatureContext::userHasMovedFile()
And user "Alice" has moved file "/common/textfile0.txt" to "/common/sub/textfile0.txt" # FeatureContext::userHasMovedFile()
When user "Carol" uploads file "filesForUpload/file_to_overwrite.txt" to "/Shares/textfile0.txt" using the WebDAV API # FeatureContext::userUploadsAFileToUsingWebDavApi()
Then the HTTP status code should be "204" # FeatureContext::thenTheHTTPStatusCodeShouldBe()
And the content of file "/Shares/common/sub/textfile0.txt" for user "Carol" should be "BLABLABLA" plus end-of-line # FeatureContext::contentOfFileForUserShouldBePlusEndOfLine()
And the content of file "/Shares/textfile0.txt" for user "Carol" should be "BLABLABLA" plus end-of-line # FeatureContext::contentOfFileForUserShouldBePlusEndOfLine()
And user "Carol" should see the following elements # FeatureContext::userShouldSeeTheElements()
| /Shares/common/sub/textfile0.txt |
| /Shares/textfile0.txt |
And the content of file "/Shares/common/sub/textfile0.txt" for user "Brian" should be "BLABLABLA" plus end-of-line # FeatureContext::contentOfFileForUserShouldBePlusEndOfLine()
And the content of file "/common/sub/textfile0.txt" for user "Alice" should be "BLABLABLA" plus end-of-line # FeatureContext::contentOfFileForUserShouldBePlusEndOfLine() |
@saw-jan hm 104 means forbidden. At least that is what it should mean: // MetaForbidden is an error response with code 104
var MetaForbidden = Meta{Status: "", StatusCode: 104, Message: "Forbidden"} But I ran into #1233 which expects an OCS 404 status for a non existing share, which IMNSHO should be an OCS 998 status ... but OCS is lagacy, so ... whatever. Aligned to be as broken as oc10 with cs3org/reva#4529 Digging further into the wrong Create response... |
There is a bug when creating shares ... we still add the share permission somewhere ... 👀 Hm no ... currently resharing is enabled by default |
The error we get on the OCS API is // MessageShareExists is used when a user tries to create a new share for the same user
var MessageShareExists = "A share for the recipient already exists"
``
which is only used when the Share() call returns an ALREADY_EXISTS code:
```go
createShareResponse, err := client.CreateShare(ctx, req)
if err != nil {
return nil, &ocsError{
Code: response.MetaServerError.StatusCode,
Message: "error sending a grpc create share request",
Error: err,
}
}
if createShareResponse.Status.Code != rpc.Code_CODE_OK {
logger.Debug().Interface("Code", createShareResponse.Status.Code).Str("message", createShareResponse.Status.Message).Msg("grpc create share request failed")
switch createShareResponse.Status.Code {
case rpc.Code_CODE_NOT_FOUND:
return nil, &ocsError{
Code: response.MetaNotFound.StatusCode,
Message: "not found",
Error: nil,
}
case rpc.Code_CODE_ALREADY_EXISTS:
return nil, &ocsError{
Code: response.MetaForbidden.StatusCode,
Message: response.MessageShareExists,
Error: nil,
}
// ...
```
But why would it already exist ... |
The jsoncs3 manager does return ALREADY_EXISTS if it can read the share, based on resoucreid and grantee: // check if share already exists.
key := &collaboration.ShareKey{
// Owner: md.Owner, owner no longer matters as it belongs to the space
ResourceId: md.Id,
Grantee: g.Grantee,
}
_, err := m.getByKey(ctx, key)
if err == nil {
// share already exists
err := errtypes.AlreadyExists(key.String())
span.RecordError(err)
span.SetStatus(codes.Error, err.Error())
return nil, err
} But that test does not even share the same resource twice... |
Ran into cs3org/reva#4530. It should not solve the test failure ... but why does that |
error occurs only AFTER we perform step sharing to group try to run this test:
|
hm
|
Added some more ocs logging. This created https://drone.owncloud.com/owncloud/ocis/32231/34/4 {
"level": "error",
"service": "sharing",
"pkg": "rgrpc",
"traceid": "67c152ba8fe5e60832bf9f364520b6dc",
"hostname": "490f84f10870",
"userID": "15469b59-2480-4797-94a0-0a66d1a9f36c",
"spaceID": "18243f69-1507-4b8e-a74b-115d8843f9bf:476a6fa1-e1e3-492d-b796-d8a37cdecbdb",
"error": "error: already exists: already exists",
"time": "2024-02-20T19:40:45Z",
"message": "persisting added received share failed"
}
{
"level": "error",
"service": "frontend",
"pkg": "rhttp",
"traceid": "5da84c776f26fa04d57725106058457a",
"request-id": "coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:265-285",
"error": "error creating share: error: already exists: already exists",
"ocs_msg": "A share for the recipient already exists",
"time": "2024-02-20T19:40:45Z",
"message": "writing ocs error response"
}
{
"level": "error",
"service": "sharing",
"pkg": "rgrpc",
"traceid": "2ca37030f357392aba20e4386e22a15a",
"hostname": "490f84f10870",
"userID": "a14b68a7-5a8a-4afc-bd10-c5eef43097a1",
"spaceID": "18243f69-1507-4b8e-a74b-115d8843f9bf:56f67e03-f733-479a-b59b-a902d36f5e68",
"error": "error: already exists: already exists",
"time": "2024-02-20T19:40:49Z",
"message": "persisting added received share failed"
}
{
"level": "error",
"service": "frontend",
"pkg": "rhttp",
"traceid": "114b490c50d3ae9f378af62bdafdff61",
"request-id": "coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:297-312",
"error": "error creating share: error: already exists: already exists",
"ocs_msg": "A share for the recipient already exists",
"time": "2024-02-20T19:40:49Z",
"message": "writing ocs error response"
}
{
"level": "error",
"service": "sharing",
"pkg": "rgrpc",
"traceid": "68b51c30ff43c877a8b907d1f5112888",
"hostname": "490f84f10870",
"userID": "0c97cf84-2172-4431-8a5b-8a9d953162f0",
"spaceID": "18243f69-1507-4b8e-a74b-115d8843f9bf:4b3da9e3-8590-4a39-b18b-2af7b1b4c47f",
"error": "error: already exists: already exists",
"time": "2024-02-20T19:40:53Z",
"message": "persisting added received share failed"
}
{
"level": "error",
"service": "frontend",
"pkg": "rhttp",
"traceid": "7c7af5d0bf3547ee242cee8f706b57b4",
"request-id": "coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:324-340",
"error": "error creating share: error: already exists: already exists",
"ocs_msg": "A share for the recipient already exists",
"time": "2024-02-20T19:40:53Z",
"message": "writing ocs error response"
}
{
"level": "error",
"service": "sharing",
"pkg": "rgrpc",
"traceid": "8ff4d400caaf0045605023e477933b65",
"hostname": "490f84f10870",
"userID": "e692116b-6a57-44fc-9059-e1f8b1096b1d",
"spaceID": "18243f69-1507-4b8e-a74b-115d8843f9bf:146d2ef2-aef6-4986-8d75-89c6f50aaf6a",
"error": "error: already exists: already exists",
"time": "2024-02-20T19:40:56Z",
"message": "persisting added received share failed"
}
{
"level": "error",
"service": "frontend",
"pkg": "rhttp",
"traceid": "06c49ca3f22dafa2f15e3f35c20aa192",
"request-id": "coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:350-366",
"error": "error creating share: error: already exists: already exists",
"ocs_msg": "A share for the recipient already exists",
"time": "2024-02-20T19:40:56Z",
"message": "writing ocs error response"
}
{
"level": "error",
"service": "sharing",
"pkg": "rgrpc",
"traceid": "7fa9a6c227bbcf6bada344410395991c",
"hostname": "490f84f10870",
"userID": "ff60542f-26d7-4288-9b8d-96c019f9b701",
"spaceID": "18243f69-1507-4b8e-a74b-115d8843f9bf:c0bf52a8-ffb3-48e2-8ee3-f6ab9eb421fd",
"error": "error: already exists: already exists",
"time": "2024-02-20T19:40:59Z",
"message": "persisting added received share failed"
}
{
"level": "error",
"service": "frontend",
"pkg": "rhttp",
"traceid": "2158b46ccc5528fa9b001bf6718dfcc5",
"request-id": "coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:376-391",
"error": "error creating share: error: already exists: already exists",
"ocs_msg": "A share for the recipient already exists",
"time": "2024-02-20T19:40:59Z",
"message": "writing ocs error response"
} and in https://drone.owncloud.com/owncloud/ocis/32231/35/4 {
"level": "error",
"service": "sharing",
"pkg": "rgrpc",
"traceid": "7db3c8ade71b0c1ea51c71c572c11413",
"hostname": "c4a1b5c5e858",
"userID": "db8541d4-366e-44ae-812e-26d7cb4c9def",
"spaceID": "9812b81b-b85e-4549-8fe3-606dbfb53a4c:8c0b71b7-2e7b-4c2a-a8bb-76fdd22c0e7a",
"error": "error: already exists: already exists",
"time": "2024-02-20T19:38:29Z",
"message": "persisting added received share failed"
}
{
"level": "error",
"service": "frontend",
"pkg": "rhttp",
"traceid": "4f089c03c0c4b030ad7b15777bef5bba",
"request-id": "coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:474-486",
"error": "error creating share: error: already exists: already exists",
"ocs_msg": "A share for the recipient already exists",
"time": "2024-02-20T19:38:29Z",
"message": "writing ocs error response"
}
{
"level": "error",
"service": "frontend",
"pkg": "rhttp",
"traceid": "0c5ac2f7ed7df3073acbb811f0e2526a",
"request-id": "coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:500-509",
"error": "cannot set the requested share permissions",
"ocs_msg": "Cannot set the requested share permissions",
"time": "2024-02-20T19:38:33Z",
"message": "writing ocs error response"
}
{
"level": "error",
"service": "frontend",
"pkg": "rhttp",
"traceid": "96da2e73273862b7803ff55e01536e33",
"request-id": "coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:516-525",
"error": "cannot set the requested share permissions",
"ocs_msg": "Cannot set the requested share permissions",
"time": "2024-02-20T19:38:37Z",
"message": "writing ocs error response"
}
{
"level": "error",
"service": "frontend",
"pkg": "rhttp",
"traceid": "6f45ae8e91300017fd2d97c4e6d91687",
"request-id": "coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:532-543",
"error": "cannot set the requested share permissions",
"ocs_msg": "Cannot set the requested share permissions",
"time": "2024-02-20T19:38:42Z",
"message": "writing ocs error response"
} |
Hah, got it. This is caused by cs3org/reva#4528 which now actually checks the IfNoneMatch header. And ur := metadata.UploadRequest{
Path: jsonPath,
Content: createdBytes,
IfMatchEtag: rss.etag,
}
// when there is no etag in memory make sure the file has not been created on the server, see https://www.rfc-editor.org/rfc/rfc9110#field.if-match
// > If the field value is "*", the condition is false if the origin server has a current representation for the target resource.
if rss.etag == "" {
ur.IfNoneMatch = []string{"*"}
}
_, err = c.storage.Upload(ctx, ur) At least I think that causes this. @ScharfViktor looking at the logic the code tries to write the |
yes, I can confirm it using UI.
But then I can't understand why the e2e tests and all the api tests don't fail. After each test we delete user |
It also has to do with the group shares. I'll take a look tomorrow. |
cecaced
to
5433ca0
Compare
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
5433ca0
to
b451d38
Compare
|
* bump dependencies Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * bump reva and add config options Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> --------- Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
bump all the deps!
and make tusd CORS headers configurable, see cs3org/reva#4507