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

docs: clarify replace operation #61

Merged
merged 5 commits into from
Sep 11, 2020
Merged

docs: clarify replace operation #61

merged 5 commits into from
Sep 11, 2020

Conversation

lidel
Copy link
Member

@lidel lidel commented Sep 9, 2020

This PR updates docs and renames "modify" operation with "replace":

  • "update" and "modify" do not describe what is actually happening.
  • "replace" should make it easier to reason about the purpose of this operation.

Preview: https://ipfs.github.io/pinning-services-api-spec/#specUrl=https://raw.githubusercontent.com/ipfs/pinning-services-api-spec/docs/replace-call/ipfs-pinning-service.yaml

"update" and "modify" do not describe what is actually happening.
"replace" should make it easier to reason about the purpose of this
operation.
@lidel lidel requested review from andrew, jessicaschilling, aschmahmann and a team September 9, 2020 17:50
Copy link
Contributor

@jessicaschilling jessicaschilling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor text changes but otherwise LGTM 😊

ipfs-pinning-service.yaml Outdated Show resolved Hide resolved
ipfs-pinning-service.yaml Outdated Show resolved Hide resolved
ipfs-pinning-service.yaml Outdated Show resolved Hide resolved
lidel and others added 3 commits September 9, 2020 20:08
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
Copy link

@andrew andrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth explaining why a client would want to replace (unless it is just to reduce 2 api calls to 1), the pin update http api docs also fail to explain why it's a thing (I believe it's much more efficient to use update when recursive pins are involved?)

@lidel
Copy link
Member Author

lidel commented Sep 10, 2020

@andrew good point!

Added notes about protecting against undersired garbage collection of data common to both old and new pin in a3db8e1 (feel free to tweak it if it could be worded better)

Copy link

@andrew andrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@lidel
Copy link
Member Author

lidel commented Sep 11, 2020

This is also a docs-only change, so merging

@lidel lidel merged commit 0e97a38 into master Sep 11, 2020
@lidel lidel deleted the docs/replace-call branch September 11, 2020 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants