feat: add progress for ipfs get command#11235
Draft
ChayanDass wants to merge 5 commits intoipfs:masterfrom
Draft
feat: add progress for ipfs get command#11235ChayanDass wants to merge 5 commits intoipfs:masterfrom
ChayanDass wants to merge 5 commits intoipfs:masterfrom
Conversation
- get: show progress (Items: N files, Blocks, Saving to) using dag stat API output only; - dag stat: add NumFiles (UnixFS file count, exclude chunk nodes); single traversal using file vs directory type; show Files column and Total Files in summary - dag: add NumFiles to DagStat and DagStatSummary for JSON and text output Signed-off-by: Chayan Das <01chayandas@gmail.com>
4560497 to
da1f3f0
Compare
Author
|
hi @lidel , could you review this ,when get time! |
lidel
requested changes
Mar 16, 2026
Member
lidel
left a comment
There was a problem hiding this comment.
Thanks for working on this @ChayanDass, progress output for ipfs get is a welcome improvement, however I'm switching this to draft as this PR has to be reworked to address issues below and inline.
Split into two PRs
The dag stat NumFiles addition and ipfs get progress are independent features. The dag stat change modifies API that should be UnixFS-agnostic. Please split them.
Consider simplifying the ipfs get changes to avoid unixfs parsing overhead and only improving presentation of data that is already available. If you really want to add new data, it has to be done in efficient way.
No tests
No test coverage for any of the new code. At minimum:
- Add
test/clicases foripfs getprogress output (visible with-p, suppressed with-p=false) - Unit tests for the file-counting logic covering: directories, multi-chunk files, single-chunk files, symlinks, and CIDv1 raw-leaf content
Performance and security problems
See details inline
6fa5510 to
91d1fdd
Compare
Signed-off-by: Chayan Das <01chayandas@gmail.com>
91d1fdd to
40ba833
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Add progress output for
ipfs getso users see fetching status, item/block counts, and a progress bar when downloading.Fixes #10339
What changed
-p/--progressis used (default on):Fetching CID: <cid>Items: N files | Blocks: MSaving to <path>Blocks: X / Mupdated during extraction82.08 MiB / 82.08 MiB [====] 100%)How to test
ipfs daemonipfs get <cid>oripfs get <cid> -pUpdate stat to show file count