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

feat: User can choose to import entire tree when importing content #1691

Open
Tracked by #2135
olizilla opened this issue Nov 22, 2020 · 5 comments
Open
Tracked by #2135

feat: User can choose to import entire tree when importing content #1691

olizilla opened this issue Nov 22, 2020 · 5 comments
Labels
area/screen/files Issues related to Files screen effort/days Estimated to take multiple days, but less than a week exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P3 Low: Not priority right now status/ready Ready to be worked

Comments

@olizilla
Copy link
Member

Describe the bug
"Import from IPFS" implies it will fetch the content to your local repo. Currently It only fetches the root block, as, for reasons I do not yet understand that is how ipfs files cp works. It does not check if you have the full tree locally.

from the go-ipfs help, it looks like the assumption is that you will ipfs add something or otherwise ensure the blocks are available locally, and then ipfs files cp it to your mfs:

  In order to add content to MFS from disk, you can use "ipfs add" to obtain the
  IPFS Content Identifier and then "ipfs files cp" to copy it into MFS:
  
  $ ipfs add --quieter --pin=false <your file>
  # ...
  # ... outputs the root CID at the end
  $ ipfs cp /ipfs/<CID> /your/desired/mfs/path

– go-ipfs help from `ipfs files cp --help`

we can do a recursive refs fetch or similar to make "import from IPFS" do what it sounds like it would do.

To Reproduce
Steps to reproduce the behavior:

  1. Import from IPFS path a thing that only exists on 1 provider.
  2. shutdown the provider
  3. bad news, you dont have the full tree locally, and you can't fetch it from anywhere.

Expected behavior
Import from IPFS should add the blocks to my repo and ipfs files cp them into the MFS. If we want to be smart about it we could stat the root block and if it is larger than would fit in the users repo, then warn them and ask if they want to do a lazy import.

@olizilla olizilla added the need/triage Needs initial labeling and prioritization label Nov 22, 2020
@jessicaschilling jessicaschilling added area/screen/files Issues related to Files screen exp/intermediate Prior experience is likely helpful 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 P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked and removed need/triage Needs initial labeling and prioritization labels Nov 23, 2020
@jessicaschilling
Copy link
Contributor

UX discussion from triage session:

  • Keep the one option ("Import from IPFS") in the menu
  • However, check if user has full tree locally, and if not, bring up the question (in modal) of whether or not to import all
  • Default modal choice should be "lazy import"

Still some uncertainty about how to actually do this API-wise: @lidel @Gozala care to comment?

We'll also want to give some thought to whether/how we'd want to include an indicator in a future revision of the Files screen as to whether all blocks for a given item are local. See #1692 for related discussion on whether that's too expensive.

As of time of writing, bandwidth doesn't support our swarming on getting this fixed, but let's keep close to the top of our "quick fixes" priority list.

@hsn10
Copy link

hsn10 commented Mar 31, 2021

Dont import all into local repo. My workflow depends on that, I work and organize very large files on my notebook. I do not want or need entire file content available localy.

@SgtPooki
Copy link
Member

SgtPooki commented Dec 2, 2022

We could benefit from providing an option to either load all blocks or not when we prompt users with the import from IPFS modal, defaulting to current behavior. Something like this:

Image

@SgtPooki SgtPooki added P3 Low: Not priority right now and removed P1 High: Likely tackled by core team if no one steps up labels Dec 2, 2022
@SgtPooki
Copy link
Member

SgtPooki commented Jul 3, 2023

Note: we should also have an indicator for users on the files screen that shows which files are fully downloaded locally or not, and give them an option to import them fully.

@SgtPooki
Copy link
Member

SgtPooki commented Jul 3, 2023

related to #1248

@SgtPooki SgtPooki changed the title Import from path should fetch entire tree feat: User can choose to import entire tree when importing content Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/screen/files Issues related to Files screen effort/days Estimated to take multiple days, but less than a week exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P3 Low: Not priority right now status/ready Ready to be worked
Projects
No open projects
Status: Planned / Backlog
Development

No branches or pull requests

4 participants