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

Add progress feedback to ipfs get #10339

Open
3 tasks done
2color opened this issue Feb 13, 2024 · 0 comments
Open
3 tasks done

Add progress feedback to ipfs get #10339

2color opened this issue Feb 13, 2024 · 0 comments
Labels
effort/days Estimated to take multiple days, but less than a week help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up

Comments

@2color
Copy link
Member

2color commented Feb 13, 2024

Checklist

  • My issue is specific & actionable.
  • I am not suggesting a protocol enhancement.
  • I have searched on the issue tracker for my issue.

Description

Background

There are some situations in which ipfs get doesn't print enough progress feedback when fetching a large enough CID, e.g. 25mb.

For example, I was trying to fetch the CID QmRhzWfzRHHmMirAQrBimyuiaCRFbPprWLuyw3cBqmHUQy which is comprised of 103 blocks.

I ran ipfs get QmRhzWfzRHHmMirAQrBimyuiaCRFbPprWLuyw3cBqmHUQy which was hanging with no output (not even saying that the root block was retrieved). To make matters more confusing, I was debugging and ran ipfs routing findprovs QmRhzWfzRHHmMirAQrBimyuiaCRFbPprWLuyw3cBqmHUQy and saw my PeerID as a provider of that CID.
I later discovered that only the root block QmRhzWfzRHHmMirAQrBimyuiaCRFbPprWLuyw3cBqmHUQy was retrievable and my node fetched it, however, it nothing was indicated about that in the ipfs get QmRhzWfzRHHmMirAQrBimyuiaCRFbPprWLuyw3cBqmHUQy output.

Current situation

From my testing, it seems that there's no output after the root block is fetched. It seems the progress feedback output only starts one of the first child blocks is fetched.

Another thing I noticed is that the feedback is always in size with no block information, e.g.

# Example with the Project Apollo Archives
➜  ~ ipfs get QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D
Saving file(s) to QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D
 3.99 MiB / 57.46 GiB [>-----------------------------]   0.01% 1d10h39m11s

Suggestion

When the ipfs get command retrieves the root block and it contains a links array, it could print out the CID and the number of blocks left to fetch (which can grow if fetching a directory as the dag is traversed) in addition to the number of bytes fetched, which is already printed out (even though it seems only after the first child block is fetched)

Extending this to other commands

We could also extend this feedback to other commands such as:

  • ipfs pin add
  • ipfs cat
@2color 2color added the kind/enhancement A net-new feature or improvement to an existing feature label Feb 13, 2024
@lidel lidel added need/triage Needs initial labeling and prioritization P2 Medium: Good to have, but can wait until someone steps up help wanted Seeking public contribution on this issue effort/hours Estimated to take one or several hours effort/days Estimated to take multiple days, but less than a week and removed need/triage Needs initial labeling and prioritization effort/hours Estimated to take one or several hours labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/days Estimated to take multiple days, but less than a week help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

No branches or pull requests

2 participants