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

Warn user when 'pin remote add' while offline #8418

Closed
lidel opened this issue Sep 8, 2021 · 7 comments · Fixed by #8621
Closed

Warn user when 'pin remote add' while offline #8418

lidel opened this issue Sep 8, 2021 · 7 comments · Fixed by #8621
Assignees
Labels
good first issue Good issue for new contributors 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 topic/pinning Topic Pinning (local and remote)

Comments

@lidel
Copy link
Member

lidel commented Sep 8, 2021

UX problem

if someone pins something via pin remote add but their node is in offline mode, it just hangs forever and fails to pin the thing in a very opaque way

Potential fix

When in offline mode, we could check if CID is present in local datastore, and if so, show a warning that node is offline and pinning may fail if there is no other provider.

The check for presence in local datastore is necessary, because we don't want to warn users when they pin CIDs that are not in the local node.

@lidel lidel added kind/enhancement A net-new feature or improvement to an existing feature help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up good first issue Good issue for new contributors topic/pinning Topic Pinning (local and remote) labels Sep 8, 2021
@Zanda256
Copy link

Can I work on this @lidel ?

@lidel
Copy link
Member Author

lidel commented Sep 13, 2021

@Zanda256 sure, give it a try!

@Zanda256
Copy link

Hey @lidel , I am having some ambiguities, can you spare a little time to discuss?

@BigLep
Copy link
Contributor

BigLep commented Sep 24, 2021

@Zanda256 : ipfs maintainers have a lot on their plate currently. Do you want to post what your questions are?

@schomatis
Copy link
Contributor

Leaving feedback on PR.

@schomatis
Copy link
Contributor

@lidel Just to make sure I am understanding the issue correctly (but this might be obvious to the rest here):

  • The pinning client is independent of the online/offline option of our own daemon. We can be offline but still connect to a remote service and request to pin a CID.
  • The likeliest case assumed here is that I have a CID and I want to pin it on another machine, so I connect to it through this independent pin client and ask it to store my CID and also tell it that I have this CID and it should fetch it from me.
  • There is no timeout on this operation (which, independent of this issue, seems it should be) so if I'm offline and I'm the only one that have this CID (case assumed here) the remote machine can't fetch it and hence can't pin it so the pin operation never completes (not even with a StatusFailed so I'm assuming the remote service also has no timeout).

The fix then is:

  • Check if we have the CID which would imply we're in this likeliest case of being the only ones that have it (e.g., I just created that content).
  • If offline warn the user that the remote service won't be able to fetch it from us and if this is the only available copy of this CID this will hang (which again on itself sounds like weird UX).

The proposed PR is indeed aligned with this.

@lidel
Copy link
Member Author

lidel commented Jan 17, 2022

Correct, that is the idea.
We want to give folks an early warning that they forgot to start daemon, so they don't waste time while waiting for a pin that most likely will never succeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good issue for new contributors 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 topic/pinning Topic Pinning (local and remote)
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants