Commit Graph

2781 Commits

Author SHA1 Message Date
Hector Sanjuan
0e668f60bf Update go-libp2p to 0.2.1
Fixes #845
2019-07-23 15:14:21 +02:00
Hector Sanjuan
7c636061bd
Improve pin/unpin method signatures (#843)
* Improve pin/unpin method signatures:

These changes the following Cluster Go API methods:

* -> Cluster.Pin(ctx, cid, options) (pin, error)
* -> Cluster.Unpin(ctx, cid) (pin, error)
* -> Cluster.PinPath(ctx, path, opts) (pin,error)

Pin and Unpin now return the pinned object.

The signature of the methods now matches that of the API Client, is clearer as
to what options the user can set and is aligned with PinPath, UnpinPath, which
returned pin methods.

The REST API now returns the Pinned/Unpinned object rather than 204-Accepted.

This was necessary for a cleaner pin/update approach, which I'm working on in
another branch.

Most of the changes here are updating tests to the new signatures

* Adapt load-balancing client to new Pin/Unpin signatures

* cluster.go: Fix typo

Co-Authored-By: Kishan Sagathiya <kishansagathiya@gmail.com>

* cluster.go: Fix typo

Co-Authored-By: Kishan Sagathiya <kishansagathiya@gmail.com>
2019-07-22 15:39:11 +02:00
Kishan Sagathiya
b6ba67804f Fix #448: rest api client: Load balancing client implementations
This adds a LoadBalancing rest client implementation which is initialized with a set of client configurations and can use two strategies: failover and roundrobin (more strategies can be added by implementing the LBStrategy interface).
2019-07-19 15:17:51 +02:00
Kishan Sagathiya
b96c2b664d Do not load API components removed from the config (#836)
* Do not load API components removed from the config

This commit introduces a map that would keep track of whether components
for a component were missing or not from the JSON config file. This map
can be check while creating cluster to avoid loading a component.

It would consider component only if the component is fully missing from the
config.
Say the component in question is `ipfsproxy` which is under `api`
section.
This would use defaults for `ipfsproxy` and load IPFS proxy.

```
{
"api":{
	"ipfsproxy": {}
	}
}
```

However, this would not load IPFS proxy
```
{
"api":{}
}
```
2019-07-18 17:33:14 +02:00
Hector Sanjuan
45e9a313db
Merge pull request #837 from ipfs/issue_778
JSON Config object key should match JSON tags
2019-07-15 15:58:25 +02:00
Kishan Mohanbhai Sagathiya
586253a2ce JSON Config object key should match JSON tags
License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2019-07-15 17:47:35 +05:30
Hector Sanjuan
e1e331600a
Merge pull request #833 from ipfs/fix/add-test
Fix: fix flaky add test
2019-07-09 10:09:27 +02:00
Hector Sanjuan
f1aa9eecfb
Merge pull request #831 from ipfs/feat/auto-recover
Feat: regularly trigger "recover" automatically
2019-07-09 10:09:05 +02:00
Hector Sanjuan
8d3f99a5fc Fix: fix flaky add test
This test has been failing a lot lately. Waiting for metrics might help.
2019-07-09 02:37:47 +02:00
Hector Sanjuan
997208a82f Feat: regularly trigger "recover" automatically
Interval controlled by a pin_recover_interval option in the config.
2019-07-08 16:55:05 +02:00
Hector Sanjuan
53f1a99feb
Merge pull request #830 from ipfs/update/deps-asjnkwe
Update dependencies
2019-07-05 19:40:11 +01:00
Hector Sanjuan
d8cb4cd7d8 Update dependencies 2019-07-05 18:12:57 +01:00
Hector Sanjuan
daf9672311
Merge pull request #781 from ipfs/fix/remove-gx
Fix #765: Remove gx
2019-07-04 14:03:21 +01:00
Kishan Mohanbhai Sagathiya
dce3d3e924 Remove docker_install
License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2019-07-04 13:58:38 +01:00
Kishan Mohanbhai Sagathiya
b73c3975d9 Remove gx
- remove docker_install
- set GO111MODULE=on

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2019-07-04 13:58:37 +01:00
Kishan Mohanbhai Sagathiya
1dc3e1db2c Remove gx
License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2019-07-04 13:58:17 +01:00
Protocol Labs
4c8738f585 Fix #765 Added needed gx references 2019-07-04 13:57:52 +01:00
Protocol Labs
b573074f7b Fix #765 Remove gx 2019-07-04 13:57:48 +01:00
Hector Sanjuan
411aa73944
Merge pull request #738 from ipfs/issue_497
Pin timeouts should start from the last block
2019-07-04 13:53:20 +01:00
Hector Sanjuan
4c16675a39
Release 0.11.0-rc5 2019-06-27 17:58:26 +01:00
Hector Sanjuan
b34a2d54f9
Merge pull request #820 from ipfs/fix/small-fixes-crdts
Some more small fixes
2019-06-27 17:52:03 +01:00
Hector Sanjuan
80cf0ed695
Merge pull request #815 from ipfs/fix/false-positive-alerts
fix how accrual fd treats ttls
2019-06-27 17:50:51 +01:00
Hector Sanjuan
e240c2a19f Simplify failed peer detection 2019-06-27 16:55:51 +01:00
Adrian Lanzafame
2255ba737b
fix ttl expiration check
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2019-06-25 12:54:41 +02:00
Hector Sanjuan
563a0da9ae Do alert for all metric types 2019-06-23 10:14:29 +01:00
Adrian Lanzafame
27295c10ac fix check failed
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2019-06-23 10:14:29 +01:00
Adrian Lanzafame
5e09da9d63 address pr feedback
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2019-06-23 10:14:29 +01:00
Adrian Lanzafame
e1b40d49c1 fix how accrual fd treats ttls
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2019-06-23 10:14:29 +01:00
Hector Sanjuan
1802fd9705
Merge pull request #823 from ipfs/fix/badger-deps
Fix badger breaking
2019-06-23 10:13:56 +01:00
Hector Sanjuan
353d403b3a Fix badger breaking EVERYTHING 2019-06-23 09:57:45 +01:00
Kishan Mohanbhai Sagathiya
9b98e5cd18 Addressed review
- Fixed coverage by adding progress to response in mock
- Used switch instead of ifs

License: MIT
Signed-off-by: Kishan Mohanbhai Sagathiya <kishansagathiya@gmail.com>
2019-06-20 23:19:07 +05:30
Hector Sanjuan
d5f8a30da9
Release 0.11.0-rc4 2019-06-14 14:43:31 +02:00
Hector Sanjuan
9d5a5b77c7
Merge pull request #819 from ipfs/deps/libp2p-core-refactor
Update deps along with go-libp2p-core refactor
2019-06-14 13:42:54 +01:00
Hector Sanjuan
b804e61ef0 Update deps along with go-libp2p-core refactor
Lots of rewrites in imports...
2019-06-14 13:10:45 +02:00
Hector Sanjuan
10947c837a pstoremgr: reduce verbosity
Since we bootstrap regularly know this causes lots of verbosity
in the console, specially when a bootstrap peer is not there.
2019-06-13 23:16:58 +02:00
Hector Sanjuan
97549152cc
Release 0.11.0-rc3 2019-06-13 17:31:51 +02:00
Hector Sanjuan
b1b0e119d3
Merge pull request #818 from ipfs/fix/dnsaddr
Fix importing peers using /dnsaddr/
2019-06-13 16:31:32 +01:00
Hector Sanjuan
83c4866100 Remove Leftover println 2019-06-13 17:27:31 +02:00
Hector Sanjuan
0b610dead1 Fix importing peers using /dnsaddr/
In this case we need to resolve (unlike with /dns4/), since otherwise
we may not know which peer ID the /dnsaddr is about.
2019-06-13 17:24:07 +02:00
Hector Sanjuan
0e1c0d2eb1
Merge pull request #814 from ipfs/fix/alerts-never-stop
alerting for peers stops after one alert
2019-06-11 13:09:34 +01:00
Hector Sanjuan
27368ab077 Fix: alert at most once PER METRIC
Before it would alert at most once per peer, which prevented some metrics
from alerting at all.
2019-06-11 11:44:12 +02:00
Hector Sanjuan
a0d93fc62c Change MaxAlertThreshold to 1 2019-06-11 10:54:12 +02:00
Adrian Lanzafame
14841e4e24 address pr feedback
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2019-06-11 10:54:12 +02:00
Adrian Lanzafame
7459917275 alerting for peers stops after one alert
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2019-06-11 10:54:12 +02:00
Hector Sanjuan
6d7daee875
Release 0.11.0-rc2 2019-06-10 16:18:34 +02:00
Hector Sanjuan
ad58420bdd
Merge pull request #808 from ipfs/fix/base32
Fix: default base32 in IPFS breaks cluster pin-ls
2019-06-10 14:53:48 +01:00
Hector Sanjuan
f1707e40f2
Merge pull request #811 from ipfs/rpi-fixes
Multiple fixes to CRDTs
2019-06-10 14:53:34 +01:00
Hector Sanjuan
ad710d5ca6
Merge pull request #816 from ipfs/crdt/trust-all
crdt: Allow to configure CRDT in "TrustAll" mode
2019-06-10 13:21:35 +01:00
Hector Sanjuan
b349aacc83 crdt: Allow to configure CRDT in "TrustAll" mode
Specifying "*" as part of "trusted_peers" in the configuration will
result in trusting all peers.

This is useful for private clusters where we don't want to list every
peer ID in the config.
2019-06-10 13:35:25 +02:00
Hector Sanjuan
65ad06c9c9 pstoremgr: Rename success to connectedPeers 2019-06-10 11:22:39 +02:00