Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: post Go 1.19 multi-error cleanup #453

Merged
merged 1 commit into from
Oct 17, 2023
Merged

chore: post Go 1.19 multi-error cleanup #453

merged 1 commit into from
Oct 17, 2023

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Oct 17, 2023

  • replace some uses of multierr with fmt.Errorf's %w;%w
  • fix up timeout error string inconsistencies: "timed out" vs "timeout"

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.

* replace some uses of multierr with fmt.Errorf's %w;%w
* fix up timeout error string inconsistencies: "timed out" vs "timeout"
@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2023

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

@@            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 Coverage Δ
pkg/indexerlookup/candidatefinder.go 65.21% <100.00%> (-0.75%) ⬇️
pkg/retriever/bitswapretriever.go 95.83% <100.00%> (-0.14%) ⬇️
pkg/retriever/parallelpeerretriever.go 90.80% <100.00%> (-0.06%) ⬇️
pkg/retriever/graphsyncretriever.go 85.62% <66.66%> (-0.80%) ⬇️

... and 3 files with indirect coverage changes

@rvagg rvagg merged commit 852b7e9 into main Oct 17, 2023
9 checks passed
@rvagg rvagg deleted the rvagg/err-modernise branch October 17, 2023 09:34
rvagg added a commit to filecoin-project/lassie-event-recorder that referenced this pull request Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants