Skip to content

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

Open

Description

@olizilla

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.

Activity

  1. added
    exp/intermediatePrior experience is likely helpful
    effort/daysEstimated to take multiple days, but less than a week
    help wantedSeeking public contribution on this issue
    kind/enhancementA net-new feature or improvement to an existing feature
    P1High: Likely tackled by core team if no one steps up
    and removed
    need/triageNeeds initial labeling and prioritization
    on Nov 23, 2020
  2. jessicaschilling commented on Nov 23, 2020

    @jessicaschilling
    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.

  3. hsn10 commented on Mar 31, 2021

    @hsn10

    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.

  4. SgtPooki commented on Dec 2, 2022

    @SgtPooki
    Member

    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

  5. added
    P3Low: Not priority right now
    and removed
    P1High: Likely tackled by core team if no one steps up
    on Dec 2, 2022
  6. moved this from Needs Grooming to Planned / Backlog in IPFS-GUI (PL EngRes)on Dec 2, 2022
  7. SgtPooki commented on Jul 3, 2023

    @SgtPooki
    Member

    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.

  8. SgtPooki commented on Jul 3, 2023

    @SgtPooki
    Member

    related to #1248

  9. changed the title [-]Import from path should fetch entire tree[/-] [+]feat: User can choose to import entire tree when importing content [/+] on Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: Not priority right nowarea/screen/filesIssues related to Files screeneffort/daysEstimated to take multiple days, but less than a weekexp/intermediatePrior experience is likely helpfulhelp wantedSeeking public contribution on this issuekind/enhancementA net-new feature or improvement to an existing featurestatus/readyReady to be worked

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions