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(decode_bytes): error handling led to data loss in subsequent chunks #39

Merged
merged 1 commit into from
Jul 14, 2024

Conversation

mih
Copy link
Member

@mih mih commented Jul 14, 2024

The contained new test documents how error handling in decode_bytes() caused data in a subsequent chunk to be skipped. The reason for that was that the pointer variable was not reset when a chunk (or rather the joined data of any previous chunks) was fully decoded. Decoding in the next chunk would start from the position last recorded during error handling in a previous chunk.

Refs: datalad/datalad-next#744
Closes: #38

…hunks

The contained new test documents how error handling in `decode_bytes()`
caused data in a subsequent chunk to be skipped. The reason for that
was that the pointer variable was not reset when a chunk (or rather
the joined data of any previous chunks) was fully decoded. Decoding
in the next chunk would start from the position last recorded during
error handling in a previous chunk.

Refs: datalad/datalad-next#744
Closes: #38
Copy link

codeclimate bot commented Jul 14, 2024

Code Climate has analyzed commit 722d030 and detected 0 issues on this pull request.

View more on Code Climate.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.02%. Comparing base (c01c4d8) to head (722d030).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
+ Coverage   98.01%   98.02%   +0.01%     
==========================================
  Files          19       19              
  Lines         655      659       +4     
  Branches      118      118              
==========================================
+ Hits          642      646       +4     
  Misses          7        7              
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mih mih merged commit 2633b7d into main Jul 14, 2024
8 checks passed
@mih mih deleted the decode branch July 14, 2024 10:03
@christian-monch
Copy link
Contributor

Thanks for catching that @mih!

@mih mih restored the decode branch September 8, 2024 11:41
@mih mih deleted the decode branch September 21, 2024 09:49
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.

Adopt decode_bytes test and fix from datalad-next
3 participants