This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
feat: update to the latest pinning service api spec #3
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lidel
suggested changes
Sep 22, 2020
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.
LGTM, but missing docs on generation + small concerns around ergonomics:
- main
./README.md
is missing steps on how to re-generate client - nit:
./openapi/README.md
starts with long Markdown fromdescription
fiels in spec YAML, which buries the lead: the client overview docs start after 2/3 of the page - is there a generator flag to not include it? - nit:
Error
with onlyErrorError
looks weird, ideally we would flatten it and just haveError
, if generator provides such feature. If not, we will have custom error responses in go-ipfs'/api/v0/pin/remote
anyway, so I think its fine.
lidel
suggested changes
Sep 23, 2020
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.
@aschmahmann please try re-generating with v0.1.1, it should resolve the problem with ErrorError
.
This was referenced Sep 29, 2020
aschmahmann
force-pushed
the
feat/update-spec
branch
2 times, most recently
from
October 15, 2020 19:35
7ef30cd
to
9572553
Compare
lidel
suggested changes
Nov 17, 2020
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.
@aschmahmann / @petar this needs a fix for panics when remote endpoint is down (either network or DNS):
DNS lookup failure:
$ ipfs pin remote service add test_invalid_url_dns_svc https://invalid-service.example.com fake_api_key
$ ipfs pin remote ls --service=test_invalid_url_dns_svc
panic: unexpected error type: Get "https://invalid-service.example.com/pins?limit=10": dial tcp: lookup invalid-service.example.com on 127.0.0.1:53: no such host
goroutine 66 [running]:
github.com/ipfs/go-pinning-service-http-client.httperr(0x0, 0x209ee40, 0xc0007fc570, 0x0, 0x0)
pkg/mod/github.com/ipfs/go-pinning-service-http-client@v0.0.0-20201030162340-38f3baeb8878/client.go:373 +0x745
github.com/ipfs/go-pinning-service-http-client.(*Client).lsInternal(0xc0007ce018, 0x20d1880, 0xc0006db400, 0xc00065e180, 0x0, 0x0, 0x0, 0xc0000775d0, 0xb2ef1c, 0xc0000a8000)
pkg/mod/github.com/ipfs/go-pinning-service-http-client@v0.0.0-20201030162340-38f3baeb8878/client.go:232 +0x338
github.com/ipfs/go-pinning-service-http-client.(*Client).Ls.func1(0xc00065e120, 0xc00065e0c0, 0xc0007ce018, 0x20d1880, 0xc0006db400, 0xc00065e180)
pkg/mod/github.com/ipfs/go-pinning-service-http-client@v0.0.0-20201030162340-38f3baeb8878/client.go:160 +0x306
created by github.com/ipfs/go-pinning-service-http-client.(*Client).Ls
pkg/mod/github.com/ipfs/go-pinning-service-http-client@v0.0.0-20201030162340-38f3baeb8878/client.go:155 +0x1af
Service down:
$ ipfs pin remote service add test_invalid_url_down_svc https://127.0.0.1:43534 fake_api_key
$ ipfs pin remote ls --service=test_invalid_url_down_svc
panic: unexpected error type: Get "https://127.0.0.1:43534/pins?limit=10": dial tcp 127.0.0.1:43534: connect: connection refused
goroutine 25 [running]:
github.com/ipfs/go-pinning-service-http-client.httperr(0x0, 0x209ee40, 0xc0000fe3c0, 0x0, 0x0)
pkg/mod/github.com/ipfs/go-pinning-service-http-client@v0.0.0-20201030162340-38f3baeb8878/client.go:373 +0x745
github.com/ipfs/go-pinning-service-http-client.(*Client).lsInternal(0xc0000c8090, 0x20d1880, 0xc000890a80, 0xc0000e81e0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0)
pkg/mod/github.com/ipfs/go-pinning-service-http-client@v0.0.0-20201030162340-38f3baeb8878/client.go:232 +0x338
github.com/ipfs/go-pinning-service-http-client.(*Client).Ls.func1(0xc0000e8180, 0xc0000e8120, 0xc0000c8090, 0x20d1880, 0xc000890a80, 0xc0000e81e0)
pkg/mod/github.com/ipfs/go-pinning-service-http-client@v0.0.0-20201030162340-38f3baeb8878/client.go:160 +0x306
created by github.com/ipfs/go-pinning-service-http-client.(*Client).Ls
pkg/mod/github.com/ipfs/go-pinning-service-http-client@v0.0.0-20201030162340-38f3baeb8878/client.go:155 +0x1af
lidel
changed the title
feat: update to pinning service api spec v1.0.0
feat: update to the latest pinning service api spec
Nov 17, 2020
aschmahmann
commented
Nov 17, 2020
Merged
aschmahmann
force-pushed
the
feat/update-spec
branch
from
November 30, 2020 20:22
de11e98
to
422b6d3
Compare
Jorropo
pushed a commit
to ipfs/go-libipfs-rapide
that referenced
this pull request
Mar 23, 2023
…at/update-spec feat: update to the latest pinning service api spec This commit was moved from ipfs/go-pinning-service-http-client@1be53f5
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates the spec to v1.0.0.
Codegen issues/hacking:
GetRequestid
asGetRequestId
as it seemed more Go idiomatic, but could remove it@petar @lidel
Note: Do not merge until we have confirmation this works against https://github.com/ipfs-shipyard/rb-pinning-service-apiGet { "error" : "unauthorized" } when trying to run an ls using my credentialsThis seems to indicate broken authAlso, this doesn't use the error typesCould be bugs on my end but want to confirm @andrewResolved issues with the server.