ipfsconn: do not error when we cannot parse multiaddresses from ipfs. (#1841)

Fixes: #1835.

If IPFS introduces a new multiaddress type/string that we have not compiled,
we error. This caused issues with latest ipfs version (which we fixed by
upgrading libraries too). This makes cluster a bit more future proof with
upcoming ipfs versions.
This commit is contained in:
Hector Sanjuan 2023-01-27 13:52:21 +00:00 committed by GitHub
parent 7cc91cae4f
commit fd7e4ea336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -373,8 +373,8 @@ func (ipfs *Connector) ID(ctx context.Context) (api.IPFSID, error) {
for i, strAddr := range res.Addresses {
mAddr, err := api.NewMultiaddr(strAddr)
if err != nil {
id.Error = err.Error()
return id, err
logger.Warningf("cannot parse IPFS multiaddress: %s (%w)... ignoring", strAddr, err)
continue
}
mAddrs[i] = mAddr
}