Repository navigation
Returns tags through WebDAV - #12865
Conversation
|
|
|
I've added PROPPATCH for
The code is still quite unclean, I just wanted a POC that it can work 😄 |
|
|
Just did a test with 1000 files where I randomly favorited a few.
Note that it doesn't make much difference to request the one or the other separately. Favorite is a kind of tag so that information needs to be read anyway. We currently use a query that selects all tags for a list of file ids. One possible improvement would be to write a special query to request only the favorites for a list of file ids instead of all tags, but only if favorites are requested ALONE without requesting tags. |
|
@icewind1991 @DeepDiver1975 can you guys review the code ? My next step now is to implement the unit tests. |
Added oc:tags and oc:favorites in PROPFIND response. It is possible to update them with PROPPATCH. These properties are optional which means they need to be requested explicitly
4f65bf2 to
0b3f071
Compare
|
I've added unit tests for the new TagsPlugin and squashed everything. Please review @DeepDiver1975 @icewind1991 |
There was a problem hiding this comment.
I assume this checks if the client requests the tags to be returned?
There was a problem hiding this comment.
Yes. SabreDAV passes the queries properties in "requestedProperties".
Once we find it we remove it to avoid reading it from the oc_properties table later on.
There was a problem hiding this comment.
Goal is to avoid retrieving tags/favs if they weren't explicitly requested. (for performance, etc)
|
This is what I used to test:
|
|
|
Multiple tags don't seem to be properly returned <oc:tags>tag1tag4</oc:tags> |
|
setting Also the xml returned from propfind has 2 propstat entries <?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/owncloud/remote.php/webdav/tiny.jpg</d:href>
<d:propstat>
<d:prop>
<oc:id>00002598ocg7ou11dvla</oc:id>
<oc:permissions>RDNVW</oc:permissions>
<oc:tags>tag1tag4</oc:tags>
<oc:favorite>1</oc:favorite>
<d:getcontenttype>image/jpeg</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<oc:testprop/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
</d:multistatus> |
|
Strange. It works for me locally: then PROPFIND on testprops.txt: |
|
Never mind, failed to properly checkout the branch.... |
|
works, code looks good 👍 |
|
As recommended by @LukasReschke I tried running xhprof. So it takes about 2.35 times longer to run. |
|
Jenkins test run here: #12937 |
There was a problem hiding this comment.
oh noes, that's an old method that should be gone. Will remove.
There was a problem hiding this comment.
\OCP\FileInfo is unknown - missing I ???
|
@DeepDiver1975 all comments addressed, please have a look. |
|
The inspection completed: 15 new issues, 16 updated code elements |
|
@owncloud-bot retest this please |
|
👍 |
|
👍 tested and works :) |
|
@owncloud-bot retest this please |
|
backup jenkins PR: #12951 |
|
Refer to this link for build results (access rights to CI server needed): Build result: FAILURE[...truncated 17 lines...]using GIT_SSH to set credentials using .gitcredentials to set credentials > git config --local credential.helper store --file=/tmp/git766125148017817045.credentials # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git config --local --remove-section credential # timeout=10 > git rev-parse origin/pr/12865/merge^{commit} # timeout=10 > git branch -a --contains abfe3f59bb2ef68cfbb6f268d53c34fa0fa713e7 # timeout=10 > git rev-parse remotes/origin/pr/12865/merge^{commit} # timeout=10Checking out Revision abfe3f59bb2ef68cfbb6f268d53c34fa0fa713e7 (origin/pr/12865/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f abfe3f59bb2ef68cfbb6f268d53c34fa0fa713e7 > git rev-list 65b5ab94b254da31e4a905e86e47ed51be74d61f # timeout=10First time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » SLAVEpull-request-analyser-ng-simple » SLAVE completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 1 secondTest FAILed. |
|
@owncloud-bot retest this please |
|
Tests passed: #12951 (comment) |
Returns tags through WebDAV
|
Refer to this link for build results (access rights to CI server needed): |

Fixes #12856
I figured out how to make it return a list of tags 😄
@DeepDiver1975 @dragotin @icewind1991