ipfs-cluster/sharness
Hector Sanjuan 1eade4ae58 Fix #732: Introduce native pin/update
This introduces a pin/update operation which allows to Pin a new item to
cluster indicating that said pin is an update to an already-existing pin.

When this is the case, all the configuration for the existing pin is copied to
the new one (including allocations). The IPFS connector will then trigger
pin/update directly in IPFS, allowing an efficient pinning based on
DAG-differences. Since the allocations where the same for both pins,
the pin/update can proceed.

PinUpdate does not unpin the previous pin (it is not possible to do this
atomically in cluster like it happens in IPFS). The user can manually do it
after the pin/update is done.

Internally, after a lot of deliberations on what the optimal way for this is,
I opted for adding a `PinUpdate` option to the `PinOptions` type (carries the
CID to update from). In order to carry this option from the REST API to the
IPFS Connector, it is serialized in the Protobuf (and stored in the
datastore). There is no other way to do this in a simple fashion since the Pin
object is piece of information that is sent around.

Additionally, making it a PinOption plays well with the Pin/PinPath APIs which
need little changes. Effectively, you are pinning a new thing. You are just
indicating that it should be configured from an existing one.

Fixes #732
2019-08-09 16:11:52 +02:00
..
config There should be identity.json sharness/config 2019-05-16 09:39:56 +05:30
lib Sharness: run state import/export with both crdt and raft 2019-07-30 13:48:48 +02:00
test_data Consensus: add new "crdt" consensus component 2019-04-17 19:14:26 +02:00
run-sharness-tests.sh Run sharness tests verbose 2018-08-18 02:48:35 +02:00
t0010-ctl-basic-commands.sh ipfs-cluster-service state upgrade cli command 2017-11-28 22:35:48 -05:00
t0020-service-basic-commands.sh Sharness hardening: 2018-01-09 14:17:21 -05:00
t0021-service-init.sh Daemon: support remote configuration (#868) 2019-08-09 12:56:27 +02:00
t0025-ctl-status-report-commands.sh Added tests for /monitor/metrics/{metrics_type} 2018-12-21 08:24:40 +05:30
t0030-ctl-pin.sh Fix #732: Introduce native pin/update 2019-08-09 16:11:52 +02:00
t0031-ctl-add.sh Disable some sharness tests adding with cid-version=1 2019-05-17 13:58:26 +02:00
t0032-ctl-health.sh sharness: test should check agains cluster peer ID 2019-01-14 13:01:18 +01:00
t0040-ssl-simple-exchange.sh Sharness hardening: 2018-01-09 14:17:21 -05:00
t0041-ssl-enforcement.sh Sharness hardening: 2018-01-09 14:17:21 -05:00
t0042-basic-auth.sh Sharness hardening: 2018-01-09 14:17:21 -05:00
t0043-ssl-basic-auth.sh Sharness hardening: 2018-01-09 14:17:21 -05:00
t0052-service-state-export.sh Sharness: run state import/export with both crdt and raft 2019-07-30 13:48:48 +02:00
t0053-service-state-import.sh Sharness: run state import/export with both crdt and raft 2019-07-30 13:48:48 +02:00
t0054-service-state-clean.sh Sharness: run state import/export with both crdt and raft 2019-07-30 13:48:48 +02:00