filecoin-project / lassie

A minimal universal retrieval client library for IPFS and Filecoin
Other
108 stars 17 forks source link

chore: post Go 1.19 multi-error cleanup #453

Closed rvagg closed 11 months ago

rvagg commented 11 months ago

as a result of checking the errors list with "Other" taking up a very large share, we have, in places 2 and 3:

 retrieval failed; retrieval timed out after 20s
 timeout after 20s

tbh I'm not actually sure why the former is now showing up more than the latter, I suspect it must have been something I did with the context juggling I've had to do

We're also getting this now:

 failed to load root node: failed to load root CID: context canceled

Which is fine, but I think it would be preferable to show this as a timeout instead (i.e. parent retrieval has a timeout and cancels context, the protocol retriever records it as a context cancel). It may be possible to use WithCancelCause to check for DeadlineExceeded post 1.19, but this'll need some investigation.

codecov-commenter commented 11 months ago

Codecov Report

Merging #453 (8643487) into main (2cf1121) will decrease coverage by 0.23%. The diff coverage is 83.33%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/filecoin-project/lassie/pull/453/graphs/tree.svg?width=650&height=150&src=pr&token=0ELGTPSK3J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project)](https://app.codecov.io/gh/filecoin-project/lassie/pull/453?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project) ```diff @@ Coverage Diff @@ ## main #453 +/- ## ========================================== - Coverage 75.73% 75.51% -0.23% ========================================== Files 87 87 Lines 6677 6657 -20 ========================================== - Hits 5057 5027 -30 - Misses 1335 1343 +8 - Partials 285 287 +2 ``` | [Files](https://app.codecov.io/gh/filecoin-project/lassie/pull/453?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project) | Coverage Δ | | |---|---|---| | [pkg/indexerlookup/candidatefinder.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/453?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-cGtnL2luZGV4ZXJsb29rdXAvY2FuZGlkYXRlZmluZGVyLmdv) | `65.21% <100.00%> (-0.75%)` | :arrow_down: | | [pkg/retriever/bitswapretriever.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/453?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-cGtnL3JldHJpZXZlci9iaXRzd2FwcmV0cmlldmVyLmdv) | `95.83% <100.00%> (-0.14%)` | :arrow_down: | | [pkg/retriever/parallelpeerretriever.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/453?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-cGtnL3JldHJpZXZlci9wYXJhbGxlbHBlZXJyZXRyaWV2ZXIuZ28=) | `90.80% <100.00%> (-0.06%)` | :arrow_down: | | [pkg/retriever/graphsyncretriever.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/453?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-cGtnL3JldHJpZXZlci9ncmFwaHN5bmNyZXRyaWV2ZXIuZ28=) | `85.62% <66.66%> (-0.80%)` | :arrow_down: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/filecoin-project/lassie/pull/453/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project)