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

uploader: reinit TeeReader on upload retry to reset pointer #56

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

emranemran
Copy link
Contributor

On an upload fail and retry, teeReader would not be reset and would point to the end of the buffer being uploaded. We need to reset teeReader to begin reading from the beginning of fileContents again.

@emranemran emranemran requested review from victorges and mjh1 March 19, 2024 20:22
Copy link
Member

@victorges victorges left a comment

Choose a reason for hiding this comment

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

good catch

On an upload fail and retry, teeReader would not be reset and would
point to the end of the buffer being uploaded. We need to reset
teeReader to begin reading from the beginning of fileContents again.
@emranemran emranemran force-pushed the emran/fix-teereader branch from b794ab7 to 5b51b98 Compare March 19, 2024 22:17
Copy link

codecov bot commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 16.57754%. Comparing base (7b1111f) to head (5b51b98).

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##                main         #56         +/-   ##
===================================================
- Coverage   16.75676%   16.57754%   -0.17922%     
===================================================
  Files              2           2                 
  Lines            185         187          +2     
===================================================
  Hits              31          31                 
- Misses           146         148          +2     
  Partials           8           8                 
Files Coverage Δ
core/uploader.go 22.96296% <0.00000%> (-0.34531%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b1111f...5b51b98. Read the comment docs.

Files Coverage Δ
core/uploader.go 22.96296% <0.00000%> (-0.34531%) ⬇️

@emranemran emranemran merged commit 301c06b into main Mar 19, 2024
10 checks passed
@emranemran emranemran deleted the emran/fix-teereader branch March 19, 2024 22:59
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.

2 participants