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

Adapt to SystemTags optimizations on server #1770

Merged
merged 5 commits into from Jun 30, 2023
Merged

Conversation

blizzz
Copy link
Member

@blizzz blizzz commented May 2, 2023

Essentially, the tags overview fetches all info from systemtags-current, which contains all necessary data. Only on tags details view, files are actually being requested per REPORT.

No visual changes.

Did not ship compiled assets yet as WIP.

Requires

Fixes #1728

@blizzz blizzz added this to the Nextcloud 27 milestone May 2, 2023
@blizzz blizzz requested a review from marcelklehr May 2, 2023 16:47
package.json Outdated Show resolved Hide resolved
src/store/systemtags.js Outdated Show resolved Hide resolved
@marcelklehr

This comment was marked as resolved.

@blizzz

This comment was marked as resolved.

@blizzz blizzz marked this pull request as ready for review May 12, 2023 11:34
@blizzz blizzz added the 3. to review Waiting for reviews label May 12, 2023
@blizzz
Copy link
Member Author

blizzz commented May 12, 2023

The second yet open server PR is not mandatory as it is backwards compatible.

@marcelklehr
Copy link
Member

marcelklehr commented May 16, 2023

Testing this with master I get a 500 server error:

{"reqId":"VTll6Zviei2RiWJpKGWw","level":3,"time":"2023-05-16T13:02:58+00:00","remoteAddr":"192.168.21.5","user":"admin","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/systemtags-assigned/image/","message":"OCA\\DAV\\SystemTag\\SystemTagNode::setNumberOfFiles(): Argument #1 ($numberOfFiles) must be of type int, string given, called in /var/www/html/apps/dav/lib/SystemTag/SystemTagsInUseCollection.php on line 102","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"27.0.0.3","exception":{"Exception":"TypeError","Message":"OCA\\DAV\\SystemTag\\SystemTagNode::setNumberOfFiles(): Argument #1 ($numberOfFiles) must be of type int, string given, called in /var/www/html/apps/dav/lib/SystemTag/SystemTagsInUseCollection.php on line 102","Code":0,"Trace":[{"file":"/var/www/html/apps/dav/lib/SystemTag/SystemTagsInUseCollection.php","line":102,"function":"setNumberOfFiles","class":"OCA\\DAV\\SystemTag\\SystemTagNode","type":"->","args":["7"]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Tree.php","line":200,"function":"getChildren","class":"OCA\\DAV\\SystemTag\\SystemTagsInUseCollection","type":"->","args":[]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":900,"function":"getChildren","class":"Sabre\\DAV\\Tree","type":"->","args":["systemtags-assigned/image"]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":982,"function":"generatePathNodes","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\DAV\\PropFind"],[["Sabre\\DAV\\PropFind"],["OCA\\DAV\\SystemTag\\SystemTagsInUseCollection"]]]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["systemtags-assigned/image",["{http://owncloud.org/ns}id","{http://owncloud.org/ns}display-name","{http://owncloud.org/ns}user-visible","{http://owncloud.org/ns}user-assignable","{http://owncloud.org/ns}can-assign","And 2 more entries, set log level to debug to see all entries"],1]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\Xml\\Writer",[],"/remote.php/dav/",["d","s","oc","nc"],[]],["Generator"],false]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[["Generator"],false]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PROPFIND",[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":364,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":172,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/apps/dav/lib/SystemTag/SystemTagNode.php","Line":190,"message":"OCA\\DAV\\SystemTag\\SystemTagNode::setNumberOfFiles(): Argument #1 ($numberOfFiles) must be of type int, string given, called in /var/www/html/apps/dav/lib/SystemTag/SystemTagsInUseCollection.php on line 102","exception":{},"CustomMessage":"OCA\\DAV\\SystemTag\\SystemTagNode::setNumberOfFiles(): Argument #1 ($numberOfFiles) must be of type int, string given, called in /var/www/html/apps/dav/lib/SystemTag/SystemTagsInUseCollection.php on line 102"}}

Copy link
Collaborator

@artonge artonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick, else nice :)

src/utils/fileUtils.js Outdated Show resolved Hide resolved
@blizzz blizzz added 2. developing Work in progress and removed 3. to review Waiting for reviews labels May 19, 2023
@juliushaertl
Copy link
Member

Remaining server PR was merged

@blizzz
Copy link
Member Author

blizzz commented Jun 28, 2023

Remaining server PR was merged

Aye, this PR is next in row of that system tag series on my list :)

Essentially, the tags overview fetches all info from systemtags-current,
which contains all necessary data. Only on tags details view, files are
actually being requested per REPORT.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@blizzz
Copy link
Member Author

blizzz commented Jun 28, 2023

addressed both remarks, rebased and rebuild

P.S.: and satisfied linter

@blizzz blizzz added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jun 28, 2023
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@blizzz
Copy link
Member Author

blizzz commented Jun 28, 2023

Testing this with master I get a 500 server error:

{"reqId":"VTll6Zviei2RiWJpKGWw","level":3,"time":"2023-05-16T13:02:58+00:00","remoteAddr":"192.168.21.5","user":"admin","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/systemtags-assigned/image/","message":"OCA\\DAV\\SystemTag\\SystemTagNode::setNumberOfFiles(): Argument #1 ($numberOfFiles) must be of type int, string given, called in /var/www/html/apps/dav/lib/SystemTag/SystemTagsInUseCollection.php on line 102","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"27.0.0.3","exception":{"Exception":"TypeError","Message":"OCA\\DAV\\SystemTag\\SystemTagNode::setNumberOfFiles(): Argument #1 ($numberOfFiles) must be of type int, string given, called in /var/www/html/apps/dav/lib/SystemTag/SystemTagsInUseCollection.php on line 102","Code":0,"Trace":[{"file":"/var/www/html/apps/dav/lib/SystemTag/SystemTagsInUseCollection.php","line":102,"function":"setNumberOfFiles","class":"OCA\\DAV\\SystemTag\\SystemTagNode","type":"->","args":["7"]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Tree.php","line":200,"function":"getChildren","class":"OCA\\DAV\\SystemTag\\SystemTagsInUseCollection","type":"->","args":[]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":900,"function":"getChildren","class":"Sabre\\DAV\\Tree","type":"->","args":["systemtags-assigned/image"]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":982,"function":"generatePathNodes","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\DAV\\PropFind"],[["Sabre\\DAV\\PropFind"],["OCA\\DAV\\SystemTag\\SystemTagsInUseCollection"]]]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["systemtags-assigned/image",["{http://owncloud.org/ns}id","{http://owncloud.org/ns}display-name","{http://owncloud.org/ns}user-visible","{http://owncloud.org/ns}user-assignable","{http://owncloud.org/ns}can-assign","And 2 more entries, set log level to debug to see all entries"],1]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\Xml\\Writer",[],"/remote.php/dav/",["d","s","oc","nc"],[]],["Generator"],false]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[["Generator"],false]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PROPFIND",[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/apps-extra/photos/vendor/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":364,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":172,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/apps/dav/lib/SystemTag/SystemTagNode.php","Line":190,"message":"OCA\\DAV\\SystemTag\\SystemTagNode::setNumberOfFiles(): Argument #1 ($numberOfFiles) must be of type int, string given, called in /var/www/html/apps/dav/lib/SystemTag/SystemTagsInUseCollection.php on line 102","exception":{},"CustomMessage":"OCA\\DAV\\SystemTag\\SystemTagNode::setNumberOfFiles(): Argument #1 ($numberOfFiles) must be of type int, string given, called in /var/www/html/apps/dav/lib/SystemTag/SystemTagsInUseCollection.php on line 102"}}

Cannot reproduce this with latest master.

@blizzz blizzz requested a review from marcelklehr June 28, 2023 19:39
@juliushaertl juliushaertl mentioned this pull request Jun 29, 2023
3 tasks
Copy link
Member

@marcelklehr marcelklehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@blizzz blizzz merged commit 06a2b99 into master Jun 30, 2023
25 checks passed
@blizzz blizzz deleted the enh/noid/systemtags-perf branch June 30, 2023 12:17
@blizzz
Copy link
Member Author

blizzz commented Jul 7, 2023

/backport 49bc8fa a1a5cc1 0f77d3e 7a7fb0d to stable27

@marcelklehr
Copy link
Member

/backport 49bc8fa a1a5cc1,0f77d3e34f2763422de081d4f38611100b41a7e5,7a7fb0dae5935622bb9466e8fe5ccaaee7469c5a to stable27

@marcelklehr
Copy link
Member

/backport 49bc8fa,a1a5cc15fb7e3aeacef68c3cfdfc1685f6cb4d1a,0f77d3e34f2763422de081d4,38611100b41a7e5,7a7fb0dae5935622bb9466e8fe5ccaaee7469c5a to stable27

@backportbot-nextcloud backportbot-nextcloud bot added the backport-request Pending backport by the backport-bot label Jul 7, 2023
@backportbot-nextcloud
Copy link

The backport to stable27 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable27
git pull origin stable27

# Create the new backport branch
git checkout -b fix/foo-stable27

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

@blizzz
Copy link
Member Author

blizzz commented Jul 7, 2023

In other words backport id doch yourself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews backport-request Pending backport by the backport-bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/tags view performance
5 participants