Add filesizes to magic-folder status API output #2886
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#2886
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As an extension of #2885, it would be very useful if the magic-folder status API displayed each file's size in addition to the information it already provides. In conjunction with #2885, this would greatly facilitate the task of calculating the total overall progress and/or estimating the total remaning time of a set of magic-folder upload/download operations. Currently, applications that wish to make such calculations will need to manually query the readcaps of each individual magic-folder member (for download sizes) or get the filesize from the filesystem directly (for upload sizes), both of which add additional overhead and ideally shouldn't be necessary.
Currently, the "tahoe magic-folder status" command does output file-sizes; these come from the metadata on the directory entries (i.e. "query the readcap for the dir") so you don't have to query each readcap for each file (as far as I understand).
That said, I think the only way for the "status API" to get this information would be to also read these dircaps .. so maybe it's better to leave that up to application? That is, some applications might not care about any metdata and so why should they have to wait for a bunch of dircap fetches? (Or: why not put all available metadata from the dircap into the status API?). For the upload sizes, these could be stat()-ed locally by the API so wouldn't put additional overhead.
Re-reading the "status" code in magic-folder, it fetches 3 URLs up front and can then display all the data (the dircaps for "upload_dircap" and "collective_dircap") .. oh and then also has to grab the dircap for each 'other' participant in the "collective_dircap" list. So it reads 3 URLs, and then one more for each participant in the magic-folder (and then has all metadata for all files that anyone has put into the magic-folder).
My conclusion: it would be pretty low-overhead to "do the stat call for you" and include file-sizes for uploads; for downloads that incurs additional dircap fetches so it might be best to leave that up to the application?
(...realized it's not just a stat call; for uploads you want to know the total size of all shares which will be uploaded -- usually a lot more than the filesize on disk)
magic-folder has been split out into a separate project - https://github.com/leastauthority/magic-folder