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

enabling sync of share gives empty filename as response #8961

Closed
S-Panta opened this issue Apr 25, 2024 · 12 comments
Closed

enabling sync of share gives empty filename as response #8961

S-Panta opened this issue Apr 25, 2024 · 12 comments
Assignees
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug

Comments

@S-Panta
Copy link
Contributor

S-Panta commented Apr 25, 2024

Describe the bug

Enabling sync of share using the new graph API works but the response has . as it's filename for stable branch. In master, this bug has been fixed but fix pr has not been backported to stable which causes moodle-repository-ocis to evolve issues.

Reason to report this issue

Steps to reproduce

1.user einstein share resource test.txt with admin.
2. admin disable sync of resource
3.admin send request to enable sync using graph API.

curl -X POST 'https://host.docker.internal:9200/graph/v1beta1/drives/{share-Space-Id}/root/children'  
-d '{
    "remoteItem": {
        "id":"'remote-item-id"
    }
}'

Expected behavior

"@client.synchronize": true,
"@UI.Hidden": false,
"eTag": "\"b3bd3355452b980042d3fc2f27bd2624\"",
"name": "test.txt",

Actual behavior

"@client.synchronize": true,
"@UI.Hidden": false,
"name": ".",

Setup

ocis 5.0.2

OCIS_XXX=somevalue
OCIS_YYY=somevalue
PROXY_XXX=somevalue

Additional context

Add any other context about the problem here.

@saw-jan
Copy link
Member

saw-jan commented Apr 25, 2024

@rhafer any chance that this will get fixed in stable-5 branch? If not then maybe we can close the issue

@rhafer
Copy link
Contributor

rhafer commented May 16, 2024

In master, this bug has been fixed but fix pr has not been backported to stable which causes moodle-repository-ocis to evolve issues.

Actually in master the accepted driveItem does not have a name at all (unless the recevied share already has a mount point set).

@rhafer rhafer changed the title [stable] enabling sync of share gives empty filename as response enabling sync of share gives empty filename as response May 16, 2024
@rhafer
Copy link
Contributor

rhafer commented May 16, 2024

It seems the whole logic for figuring out a default MountPath (i.e. name of the driveitem) when accepting/mounting a share is missing in sharing-ng. AFAICS we need something like: https://github.com/cs3org/reva/blob/348c76a4ec2ad33fdc25fe5f783d378149ab7c5b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go#L123 in graph.

@rhafer rhafer added the Priority:p2-high Escalation, on top of current planning, release blocker label May 16, 2024
@rhafer rhafer moved this from Qualification to Prio 2 in Infinite Scale Team Board May 16, 2024
@rhafer
Copy link
Contributor

rhafer commented May 16, 2024

Regarding a stable backport: With all the changes that happend in master I rather not backport the resulting fix. (Unless REALLY needed, AFAIK all the exiting users of sharing ng in stable have auto accepting enabled, so there it shouldn't be an issue)

@rhafer
Copy link
Contributor

rhafer commented May 16, 2024

cc @fschade see #8961 (comment)

@rhafer rhafer removed their assignment May 16, 2024
@tbsbdr
Copy link
Contributor

tbsbdr commented May 27, 2024

backport not planned; will be fixed with next release

@tbsbdr tbsbdr closed this as completed May 27, 2024
@github-project-automation github-project-automation bot moved this from Prio 2 to Done in Infinite Scale Team Board May 27, 2024
@rhafer
Copy link
Contributor

rhafer commented May 27, 2024

backport not planned; will be fixed with next release

Actually as noted in #8961 (comment) this is a severe bug in master as well (the error behavior is just slightly different).

@rhafer rhafer reopened this May 27, 2024
@github-project-automation github-project-automation bot moved this from Done to In progress in Infinite Scale Team Board May 27, 2024
@rhafer rhafer moved this from In progress to Prio 2 in Infinite Scale Team Board May 27, 2024
@micbar
Copy link
Contributor

micbar commented May 27, 2024

correct. Thanks.

@fschade fschade self-assigned this May 29, 2024
@fschade fschade moved this from Prio 2 to In progress in Infinite Scale Team Board May 29, 2024
@fschade
Copy link
Contributor

fschade commented Jun 6, 2024

WIP: cs3org/reva#4714

@micbar
Copy link
Contributor

micbar commented Jun 11, 2024

Needs reva bump to close that.

@micbar
Copy link
Contributor

micbar commented Jun 19, 2024

Bump has been merged.

@micbar micbar closed this as completed Jun 19, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Infinite Scale Team Board Jun 19, 2024
@S-Panta
Copy link
Contributor Author

S-Panta commented Jun 20, 2024

On the master , there is no need to send the item name in body
However, on stable 5, such should be done.

{
  "name": "test.txt",
  "remoteItem": {
    "id": "remote- item-id"
  }
}

If if name is not given and user tries to enable share via API, the output looks like this
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug
Projects
Archived in project
Development

No branches or pull requests

6 participants