-
Notifications
You must be signed in to change notification settings - Fork 27
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
v0.0.2: Pinning Summit + initial feedback #14
Conversation
This version is following spec drafted during Pinning Summit where we switched API to operate on "pin objects" with some improvements based on initial feedback and discussions received from the community this week. This is by no means the finished spec: goal is to close some of topics and kick-off discussions on remaining items.
I'm not sure if filtering based on pin depth is possible right now. As far as I'm aware all current pinning services (including Pinata) only track pinned items by the root CID. |
This overall seems fine to me, although I've got a few thoughts/questions about pinning service flow and the pinning objects we're introducing here.
|
Document the lifecycle and add missing PinStatus responses required for async status checks of ongoing pinning operations
@aschmahmann good catch! I failed to document that aspect, fixed now. Pinned data may not be present at a pinning service and at the same time pin object creation should not be a blocking operation. User may be pinning big data set that takes time to transfer and we don't want CLI and other tools to hang. Instead of waiting for remote pinning to finish, cid-of-pin-object is returned immediately in I've added Pin status/progress check can be done via Q: how specific should the status reporting be?Right now |
type: string | ||
depth: | ||
description: Defines how deep the DAG should be pinned (-1 recursive, 0 direct) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be recursive by default so depth
is only used if it's specified?
We wouldn't need to deal with depth: -1
then, which just looks a bit weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we need to filter based on depth? Having a recursive / direct depth filter wouldn't be possible on our end right now. I don't think any pinning service that currently exists keeps track of anything other than the root CID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed filter, and based on feedback (nobody supports depth other than 0 and -1) I am thinking about removing depth
field too and replacing it with recursive
boolean which is true
by default.
Will fill a separate PR after this one is merged.
I'd skip this for now. This could come back in the meta object for pins that are in progress. |
required: false | ||
schema: | ||
type: integer | ||
format: int32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add the minimum(1), maximum(1000?) and default(max?) here? While services could vary I think it would be good to just lock this in for simplicity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are sane values, I would advocate a default of 10 just for simplicity sake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@obo20 I worry 10 may be too low, making default the same as max decreases the number of things people need to think about. If you feel strongly about this, open issue or PR against master after this one is merged, and we can discuss changing the default.
I don't think % pinned is currently possible, but we could certainly provide statuses that signify the object is currently being fetched. For reference, this are the current statuses we have in Pinata's system when pinning by CID.
Obviously not all of these would apply to every service, but I do think it would be good to have a standard set of statuses that we can all agree on. |
required: false | ||
schema: | ||
type: integer | ||
format: int32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are sane values, I would advocate a default of 10 just for simplicity sake.
As per feedback in: #14 (comment)
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Additional generic states and metadata field for vendor-specific context (eg. why 'failed') Based on feedback from Pinata: #14 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed today's feedback from this PR and workshop with Core Impl WG.
I don't believe anything really controversial is left,
this PR is big enough, we can tackle the rest in standalone issues/PRs.
👉 I am going to merge this so it is easier to open issues/PRs for remaining things and discuss them in parallel.
type: string | ||
depth: | ||
description: Defines how deep the DAG should be pinned (-1 recursive, 0 direct) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed filter, and based on feedback (nobody supports depth other than 0 and -1) I am thinking about removing depth
field too and replacing it with recursive
boolean which is true
by default.
Will fill a separate PR after this one is merged.
required: false | ||
schema: | ||
type: integer | ||
format: int32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@obo20 I worry 10 may be too low, making default the same as max decreases the number of things people need to think about. If you feel strongly about this, open issue or PR against master after this one is merged, and we can discuss changing the default.
422786c
to
83bd804
Compare
83bd804
to
7f5b0a2
Compare
This version is following spec drafted during Pinning Summit where we switched API to operate on "pin objects" with some improvements based on initial feedback and discussions received from the community this week.
This is by no means the finished spec: goal is to close some topics and kick-off discussions on remaining items.
Changes in this PR
❓ – needs clarification or further discussion
⁉️ – potentially controversial
replicationParam
with a free formmeta
skip
andlimit
parameters (closes Pagination for returning large pinsets #12)Status
enum in which pin object can exist at a pinning service(for now those are just strings)
depth
It can represent direct (
0
) and recursive (-1
) pins just fine, but opens more advanced strategies in the future.GET /pins/?cid=Qm&depth=1
could return pin status of arbitrary subtreedepth
is just a simple filter (direct/recursive)Documentation Preview
Docs for
feat/pinning-summit-variant-v0.0.2
branch can be viewed at:cc @pooja @jacobheun @aschmahmann @achingbrain @autonome @Gozala @momack2 @olizilla
@obo20 @sanderpick