Hector Sanjuan
289a635105
ipfsproxy: do not pre-resolve dns addrs / support api over unix sockets
...
These two changes were made to the ipfshttp connector already.
First, node_multiaddress should not be pre-resolved, only using the first result of the resolution.
Second, we should support node_multiaddresses that are pointing to unix sockets, as the kubo daemon can listen to requests that way and
it is better than tcp for local requests.
2024-03-03 19:25:21 -06:00
Hector Sanjuan
19d1ab3d3f
Dependency upgrades ( #2026 )
...
* Update dependencies
* Update dependencies
* Update tests. Remove Pretty()
* Fix problems with new behaviour of Paths
* Typo
2024-01-30 00:58:28 +01:00
Hector Sanjuan
d4484ec3f1
Dependency upgrades ( #1980 )
...
* build(deps): bump github.com/google/uuid from 1.3.0 to 1.3.1
Bumps [github.com/google/uuid](https://github.com/google/uuid ) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/google/uuid/releases )
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md )
- [Commits](https://github.com/google/uuid/compare/v1.3.0...v1.3.1 )
---
updated-dependencies:
- dependency-name: github.com/google/uuid
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Dependency upgrades
* build(deps): bump golang.org/x/crypto from 0.12.0 to 0.13.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto ) from 0.12.0 to 0.13.0.
- [Commits](https://github.com/golang/crypto/compare/v0.12.0...v0.13.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/crypto
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/rs/cors from 1.8.3 to 1.10.1
Bumps [github.com/rs/cors](https://github.com/rs/cors ) from 1.8.3 to 1.10.1.
- [Release notes](https://github.com/rs/cors/releases )
- [Commits](https://github.com/rs/cors/compare/v1.8.3...v1.10.1 )
---
updated-dependencies:
- dependency-name: github.com/rs/cors
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/ipfs/go-block-format from 0.1.2 to 0.2.0
Bumps [github.com/ipfs/go-block-format](https://github.com/ipfs/go-block-format ) from 0.1.2 to 0.2.0.
- [Release notes](https://github.com/ipfs/go-block-format/releases )
- [Commits](https://github.com/ipfs/go-block-format/compare/v0.1.2...v0.2.0 )
---
updated-dependencies:
- dependency-name: github.com/ipfs/go-block-format
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/ipfs/go-ipfs-api from 0.5.0 to 0.7.0
Bumps [github.com/ipfs/go-ipfs-api](https://github.com/ipfs/go-ipfs-api ) from 0.5.0 to 0.7.0.
- [Release notes](https://github.com/ipfs/go-ipfs-api/releases )
- [Commits](https://github.com/ipfs/go-ipfs-api/compare/v0.5.0...v0.7.0 )
---
updated-dependencies:
- dependency-name: github.com/ipfs/go-ipfs-api
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 19:34:02 +02:00
Hector Sanjuan
7c923c32e2
client: Fix formatting in lbclient.go
2023-08-10 22:51:52 +02:00
Hector Sanjuan
ba2308765f
Avoid using rand.Seed as it is deprecated
2023-08-10 18:33:30 +02:00
Hector Sanjuan
50015947da
api.go: update comment on auth pass-through
2023-05-11 12:11:57 +02:00
Hector Sanjuan
287f285d79
api.go: only pass through GET requests to /health
2023-05-11 12:11:21 +02:00
Hector Sanjuan
9cb2219636
Add end of line to api.go
2023-05-11 12:10:50 +02:00
Arthur Gavazza
093d234da9
Merge branch 'master' into feat/add-authless-healthcheck
2023-04-20 08:54:13 -03:00
arthurgavazza
d4340a339f
fix: make lbclient implement client interface correctly
2023-04-20 08:45:09 -03:00
arthurgavazza
a15b4171d4
test: add client health method tests
2023-04-20 08:37:41 -03:00
arthurgavazza
ef23442cab
feat: add health endpoint
2023-04-20 08:18:38 -03:00
Gus Eggert
c115d29bce
chore: upgrade to boxo
2023-04-19 12:59:07 +02:00
StrathCole
6164ad35b8
Add newline to json stream to pin/ls ( #1893 )
...
* - add newline to json stream
---------
Co-authored-by: Marius Burkard <m.burkard@pixcept.de>
Co-authored-by: Hector Sanjuan <code@hector.link>
2023-03-22 14:51:54 +01:00
Hector Sanjuan
ddd51b08ca
api: fix typo in error message ( #1882 )
2023-03-06 18:57:24 +01:00
Hector Sanjuan
d553227755
Dependency upgrades ( #1880 )
...
* build(deps): bump github.com/hsanjuan/ipfs-lite from 1.5.0 to 1.6.0
Bumps [github.com/hsanjuan/ipfs-lite](https://github.com/hsanjuan/ipfs-lite ) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/hsanjuan/ipfs-lite/releases )
- [Commits](https://github.com/hsanjuan/ipfs-lite/compare/v1.5.0...v1.6.0 )
---
updated-dependencies:
- dependency-name: github.com/hsanjuan/ipfs-lite
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/golang-jwt/jwt/v4 from 4.4.3 to 4.5.0
Bumps [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt ) from 4.4.3 to 4.5.0.
- [Release notes](https://github.com/golang-jwt/jwt/releases )
- [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md )
- [Commits](https://github.com/golang-jwt/jwt/compare/v4.4.3...v4.5.0 )
---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v4
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Update pubsub too
* Fix compatiblity with latest libp2p, libipfs
* build(deps): bump github.com/libp2p/go-libp2p-raft from 0.3.0 to 0.4.0
Bumps [github.com/libp2p/go-libp2p-raft](https://github.com/libp2p/go-libp2p-raft ) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/libp2p/go-libp2p-raft/releases )
- [Commits](https://github.com/libp2p/go-libp2p-raft/compare/v0.3.0...v0.4.0 )
---
updated-dependencies:
- dependency-name: github.com/libp2p/go-libp2p-raft
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/multiformats/go-multicodec
Bumps [github.com/multiformats/go-multicodec](https://github.com/multiformats/go-multicodec ) from 0.7.0 to 0.8.1.
- [Release notes](https://github.com/multiformats/go-multicodec/releases )
- [Commits](https://github.com/multiformats/go-multicodec/compare/v0.7.0...v0.8.1 )
---
updated-dependencies:
- dependency-name: github.com/multiformats/go-multicodec
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/ipld/go-car from 0.5.0 to 0.6.0
Bumps [github.com/ipld/go-car](https://github.com/ipld/go-car ) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/ipld/go-car/releases )
- [Changelog](https://github.com/ipld/go-car/blob/master/.goreleaser.yaml )
- [Commits](https://github.com/ipld/go-car/compare/v0.5.0...v0.6.0 )
---
updated-dependencies:
- dependency-name: github.com/ipld/go-car
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump golang.org/x/crypto from 0.5.0 to 0.6.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto ) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/golang/crypto/releases )
- [Commits](https://github.com/golang/crypto/compare/v0.5.0...v0.6.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/crypto
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/ipfs/go-ds-pebble from 0.1.0 to 0.2.2
Bumps [github.com/ipfs/go-ds-pebble](https://github.com/ipfs/go-ds-pebble ) from 0.1.0 to 0.2.2.
- [Release notes](https://github.com/ipfs/go-ds-pebble/releases )
- [Commits](https://github.com/ipfs/go-ds-pebble/compare/v0.1.0...v0.2.2 )
---
updated-dependencies:
- dependency-name: github.com/ipfs/go-ds-pebble
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/ugorji/go/codec from 1.2.8 to 1.2.10
Bumps [github.com/ugorji/go/codec](https://github.com/ugorji/go ) from 1.2.8 to 1.2.10.
- [Release notes](https://github.com/ugorji/go/releases )
- [Commits](https://github.com/ugorji/go/compare/v1.2.8...v1.2.10 )
---
updated-dependencies:
- dependency-name: github.com/ugorji/go/codec
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/libp2p/go-libp2p-http from 0.4.0 to 0.5.0
Bumps [github.com/libp2p/go-libp2p-http](https://github.com/libp2p/go-libp2p-http ) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/libp2p/go-libp2p-http/releases )
- [Commits](https://github.com/libp2p/go-libp2p-http/compare/v0.4.0...v0.5.0 )
---
updated-dependencies:
- dependency-name: github.com/libp2p/go-libp2p-http
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/ipfs/go-ipfs-pinner from 0.2.1 to 0.3.0
Bumps [github.com/ipfs/go-ipfs-pinner](https://github.com/ipfs/go-ipfs-pinner ) from 0.2.1 to 0.3.0.
- [Release notes](https://github.com/ipfs/go-ipfs-pinner/releases )
- [Commits](https://github.com/ipfs/go-ipfs-pinner/compare/v0.2.1...v0.3.0 )
---
updated-dependencies:
- dependency-name: github.com/ipfs/go-ipfs-pinner
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/ipfs/go-unixfs from 0.4.3 to 0.4.4
Bumps [github.com/ipfs/go-unixfs](https://github.com/ipfs/go-unixfs ) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/ipfs/go-unixfs/releases )
- [Commits](https://github.com/ipfs/go-unixfs/compare/v0.4.3...v0.4.4 )
---
updated-dependencies:
- dependency-name: github.com/ipfs/go-unixfs
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/ipfs/go-path from 0.3.0 to 0.3.1
Bumps [github.com/ipfs/go-path](https://github.com/ipfs/go-path ) from 0.3.0 to 0.3.1.
- [Release notes](https://github.com/ipfs/go-path/releases )
- [Commits](https://github.com/ipfs/go-path/compare/v0.3.0...v0.3.1 )
---
updated-dependencies:
- dependency-name: github.com/ipfs/go-path
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/ipfs/go-ds-crdt from 0.3.9 to 0.3.10
Bumps [github.com/ipfs/go-ds-crdt](https://github.com/ipfs/go-ds-crdt ) from 0.3.9 to 0.3.10.
- [Release notes](https://github.com/ipfs/go-ds-crdt/releases )
- [Commits](https://github.com/ipfs/go-ds-crdt/compare/v0.3.9...v0.3.10 )
---
updated-dependencies:
- dependency-name: github.com/ipfs/go-ds-crdt
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump golang.org/x/crypto from 0.6.0 to 0.7.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto ) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/crypto/releases )
- [Commits](https://github.com/golang/crypto/compare/v0.6.0...v0.7.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/crypto
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/ipfs/go-ds-pebble from 0.2.2 to 0.2.3
Bumps [github.com/ipfs/go-ds-pebble](https://github.com/ipfs/go-ds-pebble ) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/ipfs/go-ds-pebble/releases )
- [Commits](https://github.com/ipfs/go-ds-pebble/compare/v0.2.2...v0.2.3 )
---
updated-dependencies:
- dependency-name: github.com/ipfs/go-ds-pebble
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 14:41:29 +01:00
Hector Sanjuan
21855c3130
Fix bad context propagation / deadlocks
...
We are propagating the wrong context (mostly from the Cluster top-level
methods). This makes that request cancellations (and cancellations of the
associated contexts) are not propagated to many methods, and can result in
deadlocks when an operation that is holding a lock is not aborted.
This affects for example the operation tracker. Getting all operations from
the tracker relies on someone reading from the out channel, or on the context
being cancelled. When a request is aborted in the middle of the response, and
the context is not cancelled, everything that wants to list operations would
become deadlocked, including operations that need write locks like
TrackNewOperation.
This fixes it.
2022-09-26 19:35:55 +02:00
Hector Sanjuan
2286ee73f8
api: return errors on stream response requests with 0 items
...
This fixes a bug in API code that made it return 204-No content when the RPC
methods failed with an error before any items were returned on the channel.
2022-09-15 16:40:34 +02:00
Hector Sanjuan
7af52bdb4e
ipfsproxy: forward block/put and dag/put with pin=false
...
Since the pin argument is interpreted and performed by cluster. Pins may be allocated to other nodes.
2022-09-09 16:41:58 +02:00
Hector Sanjuan
b2b33e8668
ipfsproxy: add missing heads to dag/put, block/put handlers
2022-09-09 16:35:55 +02:00
Hector Sanjuan
573d7e8916
ipfsproxy: add tests for block/put and dag/put intercepts
2022-09-09 16:27:09 +02:00
Hector Sanjuan
6ce90dfe47
ipfsproxy: intercept block/put and dag/put and pin to cluster on pin=true
...
This fixes #1738 . Tests still missing
2022-09-09 00:49:50 +02:00
Hector Sanjuan
5452b59a2e
Dependency upgrades ( #1755 )
...
* Update go-libp2p to v0.22.0
* Testing with go1.19
* build(deps): bump github.com/multiformats/go-multicodec
Bumps [github.com/multiformats/go-multicodec](https://github.com/multiformats/go-multicodec ) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/multiformats/go-multicodec/releases )
- [Commits](https://github.com/multiformats/go-multicodec/compare/v0.5.0...v0.6.0 )
---
updated-dependencies:
- dependency-name: github.com/multiformats/go-multicodec
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/ipld/go-car from 0.4.0 to 0.5.0
Bumps [github.com/ipld/go-car](https://github.com/ipld/go-car ) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/ipld/go-car/releases )
- [Commits](https://github.com/ipld/go-car/compare/v0.4.0...v0.5.0 )
---
updated-dependencies:
- dependency-name: github.com/ipld/go-car
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang ) from 1.12.2 to 1.13.0.
- [Release notes](https://github.com/prometheus/client_golang/releases )
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md )
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.2...v1.13.0 )
---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/hashicorp/go-hclog from 1.2.1 to 1.3.0
Bumps [github.com/hashicorp/go-hclog](https://github.com/hashicorp/go-hclog ) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/hashicorp/go-hclog/releases )
- [Commits](https://github.com/hashicorp/go-hclog/compare/v1.2.1...v1.3.0 )
---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-hclog
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/ipfs/go-ds-crdt from 0.3.6 to 0.3.7
Bumps [github.com/ipfs/go-ds-crdt](https://github.com/ipfs/go-ds-crdt ) from 0.3.6 to 0.3.7.
- [Release notes](https://github.com/ipfs/go-ds-crdt/releases )
- [Commits](https://github.com/ipfs/go-ds-crdt/compare/v0.3.6...v0.3.7 )
---
updated-dependencies:
- dependency-name: github.com/ipfs/go-ds-crdt
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/urfave/cli/v2 from 2.10.2 to 2.14.1
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli ) from 2.10.2 to 2.14.1.
- [Release notes](https://github.com/urfave/cli/releases )
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md )
- [Commits](https://github.com/urfave/cli/compare/v2.10.2...v2.14.1 )
---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/libp2p/go-libp2p-http from 0.3.0 to 0.4.0
Bumps [github.com/libp2p/go-libp2p-http](https://github.com/libp2p/go-libp2p-http ) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/libp2p/go-libp2p-http/releases )
- [Commits](https://github.com/libp2p/go-libp2p-http/compare/v0.3.0...v0.4.0 )
---
updated-dependencies:
- dependency-name: github.com/libp2p/go-libp2p-http
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/libp2p/go-libp2p-gorpc from 0.4.0 to 0.5.0
Bumps [github.com/libp2p/go-libp2p-gorpc](https://github.com/libp2p/go-libp2p-gorpc ) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/libp2p/go-libp2p-gorpc/releases )
- [Commits](https://github.com/libp2p/go-libp2p-gorpc/compare/v0.4.0...v0.5.0 )
---
updated-dependencies:
- dependency-name: github.com/libp2p/go-libp2p-gorpc
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump contrib.go.opencensus.io/exporter/prometheus
Bumps [contrib.go.opencensus.io/exporter/prometheus](https://github.com/census-ecosystem/opencensus-go-exporter-prometheus ) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/census-ecosystem/opencensus-go-exporter-prometheus/releases )
- [Commits](https://github.com/census-ecosystem/opencensus-go-exporter-prometheus/compare/v0.4.1...v0.4.2 )
---
updated-dependencies:
- dependency-name: contrib.go.opencensus.io/exporter/prometheus
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/libp2p/go-libp2p-raft from 0.1.8 to 0.2.0
Bumps [github.com/libp2p/go-libp2p-raft](https://github.com/libp2p/go-libp2p-raft ) from 0.1.8 to 0.2.0.
- [Release notes](https://github.com/libp2p/go-libp2p-raft/releases )
- [Commits](https://github.com/libp2p/go-libp2p-raft/compare/v0.1.8...v0.2.0 )
---
updated-dependencies:
- dependency-name: github.com/libp2p/go-libp2p-raft
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/urfave/cli from 1.22.9 to 1.22.10
Bumps [github.com/urfave/cli](https://github.com/urfave/cli ) from 1.22.9 to 1.22.10.
- [Release notes](https://github.com/urfave/cli/releases )
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md )
- [Commits](https://github.com/urfave/cli/compare/v1.22.9...v1.22.10 )
---
updated-dependencies:
- dependency-name: github.com/urfave/cli
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* Fix checker/linter/staticcheck warnings
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-06 16:57:17 +02:00
Hector Sanjuan
9f57f7280f
api: improve tls setup debug logging
...
Currently the debug messages are a bit confusing.
2022-06-20 21:30:54 +02:00
Hector Sanjuan
57a49fc36f
tls has also been consolidated on go-libp2p ( #1712 )
...
* Depedencies: tls security has also been consolidated on go-libp2p
* build(deps): bump github.com/urfave/cli/v2 from 2.5.1 to 2.10.1
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli ) from 2.5.1 to 2.10.1.
- [Release notes](https://github.com/urfave/cli/releases )
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md )
- [Commits](https://github.com/urfave/cli/compare/v2.5.1...v2.10.1 )
---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/multiformats/go-multicodec
Bumps [github.com/multiformats/go-multicodec](https://github.com/multiformats/go-multicodec ) from 0.4.1 to 0.5.0.
- [Release notes](https://github.com/multiformats/go-multicodec/releases )
- [Commits](https://github.com/multiformats/go-multicodec/compare/v0.4.1...v0.5.0 )
---
updated-dependencies:
- dependency-name: github.com/multiformats/go-multicodec
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang ) from 1.12.1 to 1.12.2.
- [Release notes](https://github.com/prometheus/client_golang/releases )
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md )
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.1...v1.12.2 )
---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/hashicorp/go-hclog from 1.2.0 to 1.2.1
Bumps [github.com/hashicorp/go-hclog](https://github.com/hashicorp/go-hclog ) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/hashicorp/go-hclog/releases )
- [Commits](https://github.com/hashicorp/go-hclog/compare/v1.2.0...v1.2.1 )
---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-hclog
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump github.com/urfave/cli/v2 from 2.10.1 to 2.10.2
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli ) from 2.10.1 to 2.10.2.
- [Release notes](https://github.com/urfave/cli/releases )
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md )
- [Commits](https://github.com/urfave/cli/compare/v2.10.1...v2.10.2 )
---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-20 21:14:45 +02:00
Hector Sanjuan
d7da1b6044
API: Support JWT bearer token authorization
...
The Pinning Services API standard mandates Bearer token authentication.
This adds JWT bearer token authentication to the IPFS Cluster REST and PINSVC
APIs.
The basic_auth_credentials configuration option needs to be not null and have
at least one username/passwords entry.
A user authenticated via Basic Auth can then "POST /token" and obtain a json
object:
```json { "token" : "<JWTtoken>" } ```
The JWT token has the "iss" (issuer) field set to the Basic auth user that
authorized its creation and is HMAC-signed with its password.
When basic-auth-credentials are set, the APIs will verify that requests come
with either Basic Auth authorization header or with a Bearer token
authorization header.
Bearer tokens will be decoded and the signature will be verified against the
password of the issuer.
At the moment we provide no support to revoke tokens, set "expiration date",
"not before" etc, but this may come in the future.
2022-06-20 20:04:39 +02:00
Hector Sanjuan
c9120aa672
Merge pull request #1704 from ipfs-cluster/pinsvc-compliance
...
PinSVC API: fix bugs and increase compliance
2022-06-20 18:50:16 +02:00
Hector Sanjuan
ff488e1fec
pinsvc: do not set error descriptions
...
It is duplicated with "reason".
2022-06-20 18:49:23 +02:00
Hector Sanjuan
49e770ce8c
Dependency upgrades ( #1711 )
...
Updates to libp2p and go-cid.
Cluster now conforms with go-ipfs 0.13.0 changes to block/put.
2022-06-20 18:23:50 +02:00
Hector Sanjuan
bb8e8725e8
PinSVC API: fix bugs and increase compliance
...
These changes fix a few bugs in the PinSVC API and have been discovered by
running the compliance tool at https://github.com/ipfs-shipyard/pinning-service-compliance .
In particular, the error objects did not respect the spec, filters and counts
were not done right. An additional PR will follow with fixes to the pintracker
because some pin status information was not correctly set.
2022-06-17 17:06:37 +02:00
Hector Sanjuan
57c3b180b5
Additional fixes for security warnings from CodeQL
2022-06-16 17:44:34 +02:00
Hector Sanjuan
d23240f6c8
CodeQL analysis: fix some security warnings
...
They are related to logging user-input.
2022-06-16 17:44:34 +02:00
Hector Sanjuan
e0247e4105
README: more improvements to badges
2022-06-16 17:43:30 +02:00
Hector Sanjuan
b705212ac0
Improve badges in README
2022-06-16 17:43:30 +02:00
Hector Sanjuan
755cebbe0d
Enable spell checking and fix spelling errors (using US locale)
2022-06-16 17:43:30 +02:00
Hector Sanjuan
508791b547
Migrate from ipfs/ipfs-cluster to ipfs-cluster/ipfs-cluster
...
This performs the necessary renamings.
2022-06-16 17:43:30 +02:00
Hector Sanjuan
90df0ba35e
GetMetadata: ignore linter check
2022-06-16 17:43:29 +02:00
Hector Sanjuan
7a05eeeb60
Fix #1547 : Store pin metadata in a sorted array
...
This deprecates the Metadata protobuf map and starts serializing metadata as an
array that is always sorted by the metadata key.
This should resolve the issue that an state export file can be imported
resulting in two different CRDT dags because the binary representation of the
pin can arbitrarily change depending on how the keys in the map are listed,
and thus the CID of a delta is impacted.
So with this, a state export should result in exactly the same DAG regardless
of where it is imported.
2022-06-16 17:43:29 +02:00
Hector Sanjuan
447b79093c
Fix #1655 : rest api lbclients panic on error with streaming methods
...
I think this should fix the issue. As solution we make every retry with a
temporary channel and copy results to the final channel which is only closed
by us. This only affects streaming methods.
2022-06-16 17:43:29 +02:00
Hector Sanjuan
4daece2b98
Feat: add a new "pinqueue" informer component
...
This new component broadcasts metrics about the current size of the pinqueue,
which can in turn be used to inform allocations.
It has a weight_bucket_size option that serves to divide the actual size by a
given factor. This allows considering peers with similar queue sizes to have
the same weight.
Additionally, some changes have been made to the balanced allocator so that a
combination of tags, pinqueue sizes and free-spaces can be used. When
allocating by [<tag>, pinqueue, freespace], the allocator will prioritize
choosing peers with the smallest pin queue weight first, and of those with the
same weight, it will allocate based on freespace.
2022-06-16 17:43:29 +02:00
Hector Sanjuan
e2403c682f
Merge pull request #1626 from ipfs/feat/cid-strings
...
Adopt api.Cid type - replaces cid.Cid everwhere.
2022-04-07 15:05:00 +02:00
Hector Sanjuan
6706cb9e51
Merge pull request #1628 from ipfs/feat/pin-type-json
...
types: serialize pin types as string and not as a number
2022-04-07 15:01:41 +02:00
Hector Sanjuan
f01612ca63
types: serialize pin types as string and not as a number
...
The pin type in json objects will not be understandable by humans
2022-04-07 14:44:04 +02:00
Hector Sanjuan
a97ed10d0b
Adopt api.Cid type - replaces cid.Cid everwhere.
...
This commit introduces an api.Cid type and replaces the usage of cid.Cid
everywhere.
The main motivation here is to override MarshalJSON so that Cids are
JSON-ified as '"Qm...."' instead of '{ "/": "Qm....." }', as this "ipld"
representation of IDs is horrible to work with, and our APIs are not issuing
IPLD objects to start with.
Unfortunately, there is no way to do this cleanly, and the best way is to just
switch everything to our own type.
2022-04-07 14:27:39 +02:00
Hector Sanjuan
d1ab0bd0ee
Adjust test checking for trailer errors
2022-04-04 12:45:34 +02:00
Hector Sanjuan
787aea5f31
Always include the X-Stream-Error trailer (even without errors)
...
This is to potentially address things like this:
https://github.com/nodejs/undici/issues/432#issuecomment-1047931107
2022-04-04 12:09:54 +02:00
Hector Sanjuan
1d98538411
Adders: stream blocks to destinations
...
This commit fixes #810 and adds block streaming to the final destinations when
adding. This should add major performance gains when adding data to clusters.
Before, everytime cluster issued a block, it was broadcasted individually to
all destinations (new libp2p stream), where it was block/put to IPFS (a single
block/put http roundtrip per block).
Now, blocks are streamed all the way from the adder module to the ipfs daemon,
by making every block as it arrives a single part in a multipart block/put
request.
Before, block-broadcast needed to wait for all destinations to finish in order
to process the next block. Now, buffers allow some destinations to be faster
than others while sending and receiving blocks.
Before, if a block put request failed to be broadcasted everywhere, an error
would happen at that moment.
Now, we keep streaming until the end and only then report any errors. The
operation succeeds as long as at least one stream finished successfully.
Errors block/putting to IPFS will not abort streams. Instead, subsequent
blocks are retried with a new request, although the method will return an
error when the stream finishes if there were errors at any point.
2022-03-24 17:24:58 +01:00
Hector Sanjuan
eee53bfa4f
Streaming Peers(): make Peers() a streaming call
...
This commit makes all the changes to make Peers() a streaming call.
While Peers is usually a non problematic call, for consistency, all calls
returning collections assembled through broadcast to cluster peers are now
streaming calls.
2022-03-23 01:27:57 +01:00
Hector Sanjuan
0d73d33ef5
Pintracker: streaming methods
...
This commit continues the work of taking advantage of the streaming
capabilities in go-libp2p-gorpc by improving the ipfsconnector and pintracker
components.
StatusAll and RecoverAll methods are now streaming methods, with the REST API
output changing accordingly to produce a stream of GlobalPinInfos rather than
a json array.
pin/ls request to the ipfs daemon now use ?stream=true and avoid having to
load the full pinset map on memory. StatusAllLocal and RecoverAllLocal
requests to the pin tracker stream all the way and no longer store the full
pinset, and the full PinInfo status slice before sending it out.
We have additionally switched to a pattern where streaming methods receive the
channel as an argument, allowing the caller to decide on whether to launch a
goroutine, do buffering etc.
2022-03-22 15:38:01 +01:00
Hector Sanjuan
055afbfafd
api client: do not break if streaming endpoint returns 204
2022-03-19 12:26:15 +01:00