It was comparing state.GetVersion() against state.Version, which
is the same, instead of against, mapstate.Version, which is the
constant for the current Version.
It was also returning a nil error, as the scope of the variable
assigned was not that of the outer level.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
This puts some sanity in this. It's not super correct (name of facilities
depend of the component and the main cluster component should not hard
code them), but it's clear enough. Imho, better than over-engineering
a more elegant approach.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
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>
This commit adds the dag-sharding-rfc file to the docs directory.
This file outlines the DAG sharding project and currently contains
the draft posted to ipfs/notes for feedback. As suggestions are
incorporated this document will be reworked to track the consensus
on the project's goals and implementation.
License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
Better error messages in test-lib init functions and ipfshttp
Cleanup functions are now called after every test file
License: MIT
Signed-off-by: Wyatt Daviau <wdaviau@cs.stanford.edu>
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>
The --version flag is default from our cli library so I left that. The
version subcommand prints only the version number + the short commit
so it's a bit more easy to parse.
I have additionally reduced the amount of output on start up by converting
some messages to debug. I wish there was a level between INFO and DEBUG
though.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
# This is the 1st commit message:
Captain.log.update
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
# The commit message #2 will be skipped:
# Captain log
#
# License: MIT
# Signed-off-by: Hector Sanjuan <code@hector.link>
We had a problem happening when assigning the returned *api.Error
to default 'error' type.
Things like "if err != nil" would not work even when *api.Error is nil
I'm not sure why this happens, but this is very confusing for the user
integrating on top. It is better that we just return plain go errors.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
The multiaddresses protocols for websockets and dns are only registered
with init() function when loading the modules. ipfs-cluster-ctl
uses just the api, which did not load these modules so converting
from serialized types caused bad panics.
We have also ignored errors in the api library under the thinking that it
would only parse things serialized by us, but this has made parsing errors
to go unnoticed. From now, all errors are logged and some precautions
are taking to better handle the possibility of nil objects.
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>