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

fix(share/shrex): return aggregated error if context Deadline reached #2243

Merged
merged 3 commits into from May 25, 2023

Conversation

walldiss
Copy link
Member

Overview

Errors were lost on context deadline

@walldiss walldiss added area:p2p kind:fix Attached to bug-fixing PRs labels May 23, 2023
@walldiss walldiss self-assigned this May 23, 2023
share/getters/shrex.go Outdated Show resolved Hide resolved
Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, it's correct to return a context error when the caller canceled it, unless the context cancelation error comes from the internal or sub-context. Is this the latter case?

@walldiss
Copy link
Member Author

Shrex will return context error, wrapped with other errors. It helps a lot to have aggregated errors dealing with shrex issues on other people nodes.

Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, the Join kinda fixes my concern

@walldiss walldiss enabled auto-merge (squash) May 25, 2023 09:29
@codecov-commenter
Copy link

Codecov Report

Merging #2243 (39371a7) into main (ec41fcb) will decrease coverage by 0.22%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main    #2243      +/-   ##
==========================================
- Coverage   50.63%   50.42%   -0.22%     
==========================================
  Files         150      150              
  Lines        9299     9297       -2     
==========================================
- Hits         4709     4688      -21     
- Misses       4195     4211      +16     
- Partials      395      398       +3     
Impacted Files Coverage Δ
share/getters/shrex.go 65.58% <75.00%> (-0.45%) ⬇️

... and 6 files with indirect coverage changes

@walldiss walldiss merged commit 5fa0244 into celestiaorg:main May 25, 2023
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:p2p kind:fix Attached to bug-fixing PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants