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

Support optional labels for local pins #4586

Closed
whyrusleeping opened this issue Jan 16, 2018 · 9 comments · Fixed by #10261
Closed

Support optional labels for local pins #4586

whyrusleeping opened this issue Jan 16, 2018 · 9 comments · Fixed by #10261
Assignees
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@whyrusleeping
Copy link
Member

When adding a pin, we should be able to add a label to it.

ipfs-desktop already does this, but stores the metadata itself. One approach would be to simply store a string tag in the pinset. Another slightly more interesting approach would be to move all pinning to be simply references within mfs, or alternatively mirror all labeled pins in mfs.

@whyrusleeping whyrusleeping added the kind/enhancement A net-new feature or improvement to an existing feature label Jan 16, 2018
@Stebalien
Copy link
Member

Stebalien commented Jan 16, 2018

We should just use mfs (modify MFS to do everything we need out of pins and then make the pin API use it).

@whyrusleeping
Copy link
Member Author

Hrm... ipfs-desktop could just start doing this now. cc @hacdias

@hacdias
Copy link
Member

hacdias commented Jan 16, 2018

Hello! Like store a file on MFS with the references? 😄 That's a great idea!
There are some things I have to improve on Desktop. The files pane isn't using MFS and it should too! I'll add this as an issue there.

@Stebalien
Copy link
Member

Like store a file on MFS with the references?

Specifically, add the files to MFS, not just create a file listing the CIDs (note, you'll still need to force IPFS to actually download the file as MFS won't do that). E.g., a directory /.applications/ipfs-desktop/pins/<pinned-files>.

@hacdias
Copy link
Member

hacdias commented Jan 18, 2018

Thanks for the points @Stebalien! It will be useful!

@hacdias
Copy link
Member

hacdias commented Jan 20, 2018

@Stebalien I've got a question in the meanwhile: what's the advantage to save the files on MFS if we pin them through ipfs.pin.add()?

P.S.: Desktop isn't showing previous pins you've made, but it should though.

@Stebalien
Copy link
Member

I've got a question in the meanwhile: what's the advantage to save the files on MFS if we pin them through ipfs.pin.add()

It gives the file a name.

I'd add them to MFS instead of pinning because MFS will give the file a name. Unfortunately, while MFS will prevent downloaded blocks from being garbage collected, it won't trigger a proactive fetch. You'll have to do that by, e.g., calling ipfs refs QmId (to force your node to download the file) or by temporarily pinning and then removing the pin (we should probably add some form of --prefetch flag to MFS).

I'd eventually like to deprecate the pin interface and only use MFS (or, more likely, reimplement the pin interface to use MFS under the covers) because it can be used in a multi-application setting.

@hacdias
Copy link
Member

hacdias commented Jan 20, 2018

I understand your points, but that way, users would start complaining that pins they made through the command line or any other way that uses the pinning service, wouldn't show up in Desktop unless I checked the pins and moved them to MFS.

What I suggest, for now, is to pin them and save the correspondent tags to MFS. And when the pin interface gets deprecated (or changed to use MFS), I'd change it on Desktop.

@hacdias
Copy link
Member

hacdias commented May 31, 2023

I'm self-assigning myself as I would like to eventually see this happen. It'll depend on bandwidth though. Additionally, boxo/pinner/dspinner has support to store a name. This shouldn't be very hard to implement.

@lidel lidel changed the title pin labels Support optional labels for local pins Aug 3, 2023
@BigLep BigLep moved this from 🥞 Todo to 🏃‍♀️ In Progress in IPFS Shipyard Team Jan 3, 2024
@github-project-automation github-project-automation bot moved this from 🏃‍♀️ In Progress to 🎉 Done in IPFS Shipyard Team Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants