Commit Graph

55 Commits

Author SHA1 Message Date
Hector Sanjuan
7b4d647267 Tests: multiple fixes, increase timings 2019-11-08 12:46:11 +01:00
Hector Sanjuan
9649664dbd Run tests by default with crdt and not with raft 2019-11-07 20:19:34 +01:00
Hector Sanjuan
1214aabf5b Allow main tests to run for 15 mins 2019-11-05 12:51:18 +01:00
Kishan Sagathiya
295915272b Tests: multiple fixes to tests reliability (#943)
This makes a number of fixes to improve the reliability of tests.
2019-10-31 21:51:13 +01:00
Hector Sanjuan
78c83f0bb5 Bump things to Go 1.13 2019-10-04 19:27:02 +02:00
Hector Sanjuan
fb2d427035 Travis: run all tests 2019-08-09 16:12:32 +02:00
Protocol Labs
b573074f7b Fix #765 Remove gx 2019-07-04 13:57:48 +01:00
Hector Sanjuan
8e6eefb714 Tests: multiple fixes
This fixes multiple issues in and around tests while
increasing ttls and delays in 100ms. Multiple issues, including
races, tests not running with consensus-crdt missing log messages
and better initialization have been fixed.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2019-05-20 23:45:04 +02:00
Hector Sanjuan
bfd4b7d3ee Tests: add failfast, bump to go1.12, adjust codecov 2019-05-17 13:54:13 +02:00
Hector Sanjuan
acbd7fda60 Consensus: add new "crdt" consensus component
This adds a new "crdt" consensus component using go-ds-crdt.

This implies several refactors to fully make cluster consensus-component
independent:

* Delete mapstate and fully adopt dsstate (after people have migrated).
* Return errors from state methods rather than ignoring them.
* Add a new "datastore" modules so that we can configure datastores in the
   main configuration like other components.
* Let the consensus components fully define the "state.State". Thus, they do
not receive the state, they receive the storage where we put the state (a
go-datastore).
* Allow to customize how the monitor component obtains Peers() (the current
  peerset), including avoiding using the current peerset. At the moment the
  crdt consensus uses the monitoring component to define the current peerset.
  Therefore the monitor component cannot rely on the consensus component to
  produce a peerset.
* Re-factor/re-implementation of "ipfs-cluster-service state"
  operations. Includes the dissapearance of the "migrate" one.

The CRDT consensus component defines creates a crdt-datastore (with ipfs-lite)
and uses it to intitialize a dssate. Thus the crdt-store is elegantly
wrapped. Any modifications to the state get automatically replicated to other
peers. We store all the CRDT DAG blocks in the local datastore.

The consensus components only expose a ReadOnly state, as any modifications to
the shared state should happen through them.

DHT and PubSub facilities must now be created outside of Cluster and passed in
so they can be re-used by different components.
2019-04-17 19:14:26 +02:00
Kishan Sagathiya
962d249e74
Remove basic monitor (#726)
Remove basic monitor

This commit removes `basic` monitor component, because it is not being
used by default since few releases ago pubsub monitor was introduced.

Issue #689
2019-03-21 22:48:40 +05:30
Hector Sanjuan
db3ff39f39 Enable go.mod for ipfs-cluster 2019-03-08 12:02:05 +00:00
Hector Sanjuan
81ab0d6c43 Move to codecov.io
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2019-02-20 14:11:58 +00:00
Hector Sanjuan
6e43d272f7 Fix #593: Remove snaps
Snap builds have broken again. It seems the credentials have expired without
warning, even though they were not so old anyways. As promised,
next time snaps would break, they would be removed.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2019-01-18 10:23:22 +01:00
Hector Sanjuan
f52a5fd702 Fix publishing snaps
Snaps won't publish with classic confimement or non-edge.
For the moment this works around that so that, at least,
there is releases on 'edge'  with strict confinement.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-25 12:40:33 +02:00
Hector Sanjuan
ce6ed6ae7a Test docker compose
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-23 18:25:43 +02:00
Hector Sanjuan
7544306ae3 Fix golint in travis
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-17 14:25:22 +02:00
Hector Sanjuan
52397f0155 Fix: snaps for tags
It seems branch = master prevents building snaps for tags (?)

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-01 20:17:24 +02:00
Hector Sanjuan
ca50393100 Snap build fixes. Re-enable multiarch builds.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-01 15:46:30 +02:00
Hector Sanjuan
b27ae72ef0 Update to go-1.11
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-01 12:03:08 +02:00
Hector Sanjuan
c8c003a208 Fix #544: Push Snaps to the right channel depending on tags
Also, make sure they are only built on master builds of the original
repo.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-09-28 21:44:05 +02:00
Hector Sanjuan
997fb939f8 Fix #520: Re-work travis CI file.
- Only push snapcraft file once
- Give names to stages

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-09-26 16:54:17 +02:00
Hector Sanjuan
b8194143c2 Test with stateless tracker. Make map tracker default for tests.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-08-14 19:18:26 +02:00
Lilith McMullen
5f3d95e51c remove env/secure section from travis yml
License: MIT
Signed-off-by: Lilith McMullen <iggnsthe@live.com>
2018-06-21 13:02:42 -05:00
Lilith McMullen
5100fe7b08 Fix #465: Remove unneeded repotoken from goveralls
License: MIT
Signed-off-by: Lilith McMullen <iggnsthe@live.com>
2018-06-20 12:34:33 -05:00
Hector Sanjuan
926a5e28cc Remove coverage.sh. Go 1.10 supports a coverprofile from multiple packages.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-27 18:19:14 +02:00
Hector Sanjuan
37a75e5e38 Test with Go 1.10
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-27 18:11:05 +02:00
Hector Sanjuan
5ca8ca39eb Monitor/tests: Allow to run tests using the basic monitor.
Do it in additional stage in Travis.

Also, test fixes.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-05-09 11:39:21 +02:00
Hector Sanjuan
c73e540b7b Pre-create and pre-connect hosts in tests
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-04-05 16:49:26 +02:00
Hector Sanjuan
a315965d38 Add cache configuration to .travis.yml
This should speed up builds a bit

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-02-08 12:23:24 +01:00
Wyatt
fc237b21d4 Feat: Enable Jenkins builds
This enables support for testing in jenkins.

Several minor adjustments have been performed to improve the probability
that the tests pass, but there are still some random
problems appearing with libp2p conections not becoming available or
stopping working (similar to travis, but perhaps more often).

MacOS and Windows builds are broken in worse ways (those issues will
need to be addressed in the future).

Thanks to @zenground0 and @victorbjelkholm for support!

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-11 18:11:46 +01:00
Hector Sanjuan
8daf54f8f4 New credentials for pushing snaps
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-10 18:33:33 +01:00
Hector Sanjuan
89b8fe106e Fix #275: Wait for Raft updates before snapshotting on shutdown
Raft will fail to take a snapshot when applied index is
different from the last index. Therefore, we wait for
all updates to be aplied before snapshotting.

If still it doesn't work, we retry a few times.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-01-09 15:02:47 +01:00
Wyatt Daviau
54f34ca36e make docker impl + launched from travis
License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2018-01-04 15:41:16 -05:00
Hector Sanjuan
bde7b4e3d9
Merge pull request #264 from ipfs/feat/code_quality
Feat/code quality
2017-12-06 18:46:53 +01:00
Wyatt
ad492d20ae fix #254, execution locking:
ipfs-cluster-service now locks before running the daemon and state
upgrade commands.  Locking mechanism heavily inspired by ipfs, see
go-ipfs fsrepo.  Unlock called on exit to free up repo.  one lockfile
per repo. A very simple sharness test checks that two service
invocations cannot occur.

A longstanding sharness/ci logging issue is addressed by exporting
verbose=t into the travis environment.  Now output of commands from
within sharness test strings are displayed during travis runs.

License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
2017-12-06 11:14:53 -05:00
Hector Sanjuan
b0d61ab9cb feat make check: add make check to run go vet and golint
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2017-12-06 15:15:43 +01:00
Leo Arias
22c1d2401f Move back the docker call to travis 2017-11-16 14:36:42 +00:00
Leo Arias
58a884373b Move the snap deploy script to a separate file 2017-11-16 01:52:06 +00:00
Leo Arias
ce574a6849 Escape the variable in the snapcraft loop 2017-11-15 23:25:22 +00:00
Leo Arias
81e1f3855e Enable the snap builds for i386, armhf and arm64 (#237)
Enable the snap builds for i386, armhf and arm64
2017-11-15 23:23:01 +01:00
Hector Sanjuan
5a7c1fc847 Re-enable snapcraft build on travis
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-11-14 19:06:05 +01:00
Hector Sanjuan
ef86f718e7 Enable travis for snapcraft builds
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-11-14 01:12:36 +01:00
Hector Sanjuan
8d3c72b766 Fix tests: Make metric broadcasting async
When a peer is down, metric broadcasting hangs, and no more
ticks are sent for a while.
2017-07-21 23:45:33 +02:00
Hector Sanjuan
4ea1777050 Fix sharness tests
Use docker to run ipfs
Improve intialization of daemons
Fix a bunch of tests
Improve run script
Make sure everything is shell-compatible (remove bash syntax)
Fit to run in travis
2017-07-21 11:24:17 +02:00
ZenGround0
99217ea84e Travis sharness (#110)
* Added travis sharness build

* ipfs-cluster-ctl help text width overflow fixed

* Expect success from fixed sharness test

* First travis-sharness PR touch up
Undoes gx rewrite of cluster-ctl dependencies
Undoess linebreaking of usage descriptions
Changes test to check for lines in excess of 120 chars instead of 80
run-sharness script now correctly tracks exit codes and exits with error
2017-07-21 11:24:17 +02:00
Hector Sanjuan
11f3e6b2d4 Fix #65: Use Go 1.8 in travis
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-14 14:22:02 +01:00
Hector Sanjuan
3f5c072e2d Small improvements to coverage.sh and travis.yml
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-02-14 19:26:48 +01:00
Hector Sanjuan
0e7091c6cb Move testing mocks to subpackage so they can be re-used
Related to #18

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-02-09 17:51:19 +01:00
Hector Sanjuan
365c549d7c Fix #5: Rename apps to ipfs-cluster-service and ipfs-cluster-ctl
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-01-23 13:34:22 +01:00